william@oahu.cs.ucla.edu (William Cheng) (06/17/90)
I've just put tgif-1.8 in the `contrib' directory of `expo.lcs.ucla.edu' and the `pub' directory of `rye.cs.ucla.edu'. The only change from tgif-1.7 is that I retracted the changes in "select.c". It runs funny when the load of the machine is high. Following is a patch file to bring tgif from release 1.7 to 1.8. -------------------------------> cut here <----------------------------------- *** select.c.orig Sat Jun 16 15:48:11 1990 --- select.c Sat Jun 16 15:48:12 1990 *************** *** 6,10 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/select.c,v 1.2 90/06/15 01:16:11 william Exp $"; #endif --- 6,10 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/select.c,v 1.3 90/06/16 14:25:00 william Exp $"; #endif *************** *** 350,356 **** /* XOff and YOff are screen offsets, and they are not on grid */ { int end_x, end_y; int done = FALSE, ltx, lty, rbx, rby, dx, dy; ! XEvent input; end_x = XOff; --- 350,359 ---- /* XOff and YOff are screen offsets, and they are not on grid */ { + Window root_win, child_win; + int root_x, root_y; + unsigned int status; int end_x, end_y; int done = FALSE, ltx, lty, rbx, rby, dx, dy; ! int new_end_x, new_end_y; end_x = XOff; *************** *** 358,363 **** SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); ! XGrabPointer (mainDisplay, drawWindow, False, ! PointerMotionMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, handCursor, CurrentTime); --- 361,365 ---- SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); ! XGrabPointer (mainDisplay, drawWindow, False, None, GrabModeAsync, GrabModeAsync, None, handCursor, CurrentTime); *************** *** 364,382 **** while (!done) { ! XNextEvent (mainDisplay, &input); SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); ! if (input.type == ButtonRelease) { XUngrabPointer (mainDisplay, CurrentTime); MarkRulers (end_x, end_y); done = TRUE; } ! else if (input.type == MotionNotify) ! { ! end_x = input.xmotion.x; ! end_y = input.xmotion.y; ! SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); ! } ! MarkRulers (end_x, end_y); } --- 366,389 ---- while (!done) { ! XQueryPointer (mainDisplay, drawWindow, &root_win, &child_win, ! &root_x, &root_y, &new_end_x, &new_end_y, &status); ! ! if (new_end_x==end_x && new_end_y==end_y && (status & Button1Mask)!=0) ! continue; ! SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); ! end_x = new_end_x; end_y = new_end_y; ! ! SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); ! ! if ((status & Button1Mask) == 0) { XUngrabPointer (mainDisplay, CurrentTime); MarkRulers (end_x, end_y); + SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); done = TRUE; } ! else ! MarkRulers (end_x, end_y); } *** version.c.orig Sat Jun 16 15:48:30 1990 --- version.c Sat Jun 16 15:48:31 1990 *************** *** 6,11 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/version.c,v 1.10 90/06/13 14:33:07 william Exp $"; #endif ! char * version_string = "1.7"; --- 6,11 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/version.c,v 1.11 90/06/16 14:30:48 william Exp $"; #endif ! char * version_string = "1.8"; *** Imakefile.orig Sat Jun 16 15:48:41 1990 --- Imakefile Sat Jun 16 15:48:42 1990 *************** *** 4,11 **** /**/# Copyright (C) 1990, William Cheng. /**/# ! /**/# @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/Imakefile,v 1.14 90/06/13 14:32:56 william Exp $ /**/# ! TGIFVERSION = 1.7 PROGRAMS = tgif prtgif tgif2ps frontend11.o CDEBUGFLAGS = -g --- 4,11 ---- /**/# Copyright (C) 1990, William Cheng. /**/# ! /**/# @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/Imakefile,v 1.15 90/06/16 14:30:40 william Exp $ /**/# ! TGIFVERSION = 1.8 PROGRAMS = tgif prtgif tgif2ps frontend11.o CDEBUGFLAGS = -g -------------------------------> cut here <----------------------------------- -- -- Bill Cheng // UCLA Computer Science Department // (213) 206-7135 3277 Boelter Hall // Los Angeles, California 90024 // USA william@CS.UCLA.EDU ...!{uunet|ucbvax}!cs.ucla.edu!william