jkh@ardent.UUCP (Jordan Hubbard) (05/10/88)
>exist in the X11R1 xterm and may be related to the fact that I >explicitly set input focus to windows. At one point, Ed Swick was >looking into the problem, Ed are you listening? Who's Ed Swick? Ralph, you have a brother you've been hiding? Jordan
tlastran@esunix.UUCP (Tom LaStrange) (06/17/88)
#! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting test in a file # 3. Execute the file with /bin/sh (not csh) to create the files: # #README #Imakefile #twm.patches # # Created by tlastran (Tom LaStrange) on Fri Jun 17 07:30:02 MDT 1988 # if test -f 'README' then echo shar: will not over-write existing file "README" else echo extracting "README" sed 's/^X//' >README <<'SHAR_EOF' XThe following things have been fixed/added since Revision 3.0 X X1. I now use XParseColor in GetColor so you can specify colors like "#ff007f". X X2. "sequence lost!" should not happen anymore. X X3. A NoTitleFocus variable has been added. If you specify this variable X you won't have input focus in the title bar but you also will not X have the typing, moving the mouse, characters appear in previous X window problem. Your xterm cursors should also "hollow out" when X the cursor leaves the xterm windows. X X4. I have included an Imakefile that was sent to me. X X5. General cleanup. X X XThings must be getting better, the number of bug reports has decreased Xsignificantly. There still appear to be some problems in running with Xmultiple displays from the same server. X XThanks again for your patience and testing. X X-- XTom LaStrange XEvans & Sutherland Computer Corporation X XUUCP Address: {ihnp4,seismo}!utah-cs!utah-gr!uplherc!esunix!tlastran XAlternate: {ihnp4,decvax}!decwrl!esunix!tlastran SHAR_EOF if test 1005 -ne "`wc -c < README`" then echo shar: error transmitting "README" '(should have been 1005 characters)' fi fi if test -f 'Imakefile' then echo shar: will not over-write existing file "Imakefile" else echo extracting "Imakefile" sed 's/^X//' >Imakefile <<'SHAR_EOF' X# X#Here is an Imakefile for twm. It depends on having TWMDIR defined X#in Imake.tmpl. I like to use Imakefiles for everything, and I am sure X#other people do also, so perhaps you could do us all a favor and X#distribute this one. X# X X PROGRAMS = twm mytitle XLOCAL_LIBRARIES = $(XLIB) X OTHERSRCS = gram.y lex.l X YFLAGS = -d X XSRCS1= add_window.c gc.c list.c twm.c parse.c\ X menus.c events.c resize.c util.c version.c X XOBJS1= gram.o lex.o add_window.o gc.o list.o twm.o parse.o\ X menus.o events.o resize.o util.o version.o X XSRCS2= mytitle.c XOBJS2= mytitle.o X XComplexProgramTarget_1(twm,$(LOCAL_LIBRARIES),) XComplexProgramTarget_2(mytitle,$(LOCAL_LIBRARIES),) X XInstallNonExec(Sample.twmrc, $(TWMDIR)) XInstallNonExec(xterm.icon, $(TWMDIR)) X Xgram.h gram.c: gram.y X yacc -d gram.y X mv y.tab.c gram.c X mv y.tab.h gram.h X Xclean:: X $(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c SHAR_EOF if test 905 -ne "`wc -c < Imakefile`" then echo shar: error transmitting "Imakefile" '(should have been 905 characters)' fi fi if test -f 'twm.patches' then echo shar: will not over-write existing file "twm.patches" else echo extracting "twm.patches" sed 's/^X//' >twm.patches <<'SHAR_EOF' Xdiff -c old/add_window.c new/add_window.c X*** old/add_window.c Fri Jun 17 07:17:19 1988 X--- new/add_window.c Fri Jun 17 07:19:56 1988 X*************** X*** 25,31 **** X X /********************************************************************** X * X! * $Header: add_window.c,v 1.25 88/06/03 10:18:55 tlastran Exp $ X * X * Add a new window, put the titlbar and other stuff around X * the window X--- 25,31 ---- X X /********************************************************************** X * X! * $Header: add_window.c,v 1.27 88/06/17 06:48:22 tlastran Exp $ X * X * Add a new window, put the titlbar and other stuff around X * the window X*************** X*** 36,42 **** X X #ifndef lint X static char RCSinfo[]= X! "$Header: add_window.c,v 1.25 88/06/03 10:18:55 tlastran Exp $"; X #endif lint X X #include <stdio.h> X--- 36,42 ---- X X #ifndef lint X static char RCSinfo[]= X! "$Header: add_window.c,v 1.27 88/06/17 06:48:22 tlastran Exp $"; X #endif lint X X #include <stdio.h> X*************** X*** 270,276 **** X strlen(tmp_win->name)); X X if (XGetWindowProperty(dpy, tmp_win->w, XA_WM_ICON_NAME, 0, 200, False, X! AnyPropertyType, &junk1, &junk2, &junk3, &len, &tmp_win->icon_name)) X tmp_win->icon_name = tmp_win->name; X X if (tmp_win->icon_name == NULL) X--- 270,276 ---- X strlen(tmp_win->name)); X X if (XGetWindowProperty(dpy, tmp_win->w, XA_WM_ICON_NAME, 0, 200, False, X! XA_STRING, &junk1, &junk2, &junk3, &len, &tmp_win->icon_name)) X tmp_win->icon_name = tmp_win->name; X X if (tmp_win->icon_name == NULL) X*************** X*** 326,333 **** X tmp_win->iconify_w = XCreateWindow(dpy, tmp_win->title_w, X TITLE_BAR_SPACE, TITLE_BAR_SPACE, X iconify_width, iconify_height, X! 0, DefaultDepth(dpy, 0), CopyFromParent, DefaultVisual(dpy,0), X! valuemask, &attributes); X X #ifndef NOFOCUS X attributes.background_pixmap = MakePixmap(tmp_win->title_w, TitleNormalGC, X--- 326,333 ---- X tmp_win->iconify_w = XCreateWindow(dpy, tmp_win->title_w, X TITLE_BAR_SPACE, TITLE_BAR_SPACE, X iconify_width, iconify_height, X! 0, d_depth, CopyFromParent, X! d_visual, valuemask, &attributes); X X #ifndef NOFOCUS X attributes.background_pixmap = MakePixmap(tmp_win->title_w, TitleNormalGC, X*************** X*** 336,343 **** X tmp_win->focus_w = XCreateWindow(dpy, tmp_win->title_w, X tmp_win->attr.width - resize_width -3 - focus_width, TITLE_BAR_SPACE, X iconify_width, iconify_height, X! 0, DefaultDepth(dpy, 0), CopyFromParent, DefaultVisual(dpy,0), X! valuemask, &attributes); X #endif X X attributes.background_pixmap = MakePixmap(tmp_win->title_w, TitleNormalGC, X--- 336,343 ---- X tmp_win->focus_w = XCreateWindow(dpy, tmp_win->title_w, X tmp_win->attr.width - resize_width -3 - focus_width, TITLE_BAR_SPACE, X iconify_width, iconify_height, X! 0, d_depth, CopyFromParent, X! d_visual, valuemask, &attributes); X #endif X X attributes.background_pixmap = MakePixmap(tmp_win->title_w, TitleNormalGC, X*************** X*** 347,354 **** X tmp_win->attr.width - resize_width - 1, X TITLE_BAR_SPACE, X resize_width, resize_height, X! 0, DefaultDepth(dpy, 0), CopyFromParent, DefaultVisual(dpy,0), X! valuemask, &attributes); X X valuemask = CWBackPixmap; X attributes.background_pixmap = MakePixmap(tmp_win->title_w, TitleNormalGC, X--- 347,354 ---- X tmp_win->attr.width - resize_width - 1, X TITLE_BAR_SPACE, X resize_width, resize_height, X! 0, d_depth, CopyFromParent, X! d_visual, valuemask, &attributes); X X valuemask = CWBackPixmap; X attributes.background_pixmap = MakePixmap(tmp_win->title_w, TitleNormalGC, X*************** X*** 357,364 **** X tmp_win->hilite_w = XCreateWindow(dpy, tmp_win->title_w, X TitleBarX, 1, X 10, hilite_height, X! 0, DefaultDepth(dpy, 0), CopyFromParent, DefaultVisual(dpy,0), X! valuemask, &attributes); X X XDefineCursor(dpy, tmp_win->title_w, ArrowCursor); X XDefineCursor(dpy, tmp_win->iconify_w, ButtonCursor); X--- 357,364 ---- X tmp_win->hilite_w = XCreateWindow(dpy, tmp_win->title_w, X TitleBarX, 1, X 10, hilite_height, X! 0, d_depth, CopyFromParent, X! d_visual, valuemask, &attributes); X X XDefineCursor(dpy, tmp_win->title_w, ArrowCursor); X XDefineCursor(dpy, tmp_win->iconify_w, ButtonCursor); X*************** X*** 418,424 **** X */ X X pm = XCreatePixmap(dpy, Root, tmp_win->icon_width, X! tmp_win->icon_height, DefaultDepth(dpy, 0)); X X /* the copy plane works on color ! */ X XCopyPlane(dpy, bm, pm, IconNormalGC, X--- 418,424 ---- X */ X X pm = XCreatePixmap(dpy, Root, tmp_win->icon_width, X! tmp_win->icon_height, d_depth); X X /* the copy plane works on color ! */ X XCopyPlane(dpy, bm, pm, IconNormalGC, X*************** X*** 447,453 **** X &tmp_win->icon_width, &tmp_win->icon_height, &JunkBW, &JunkDepth); X X pm = XCreatePixmap(dpy, Root, tmp_win->icon_width, tmp_win->icon_height, X! DefaultDepth(dpy, 0)); X X XCopyPlane(dpy, tmp_win->wmhints->icon_pixmap, pm, IconNormalGC, X 0,0, tmp_win->icon_width, tmp_win->icon_height, 0, 0, 1 ); X--- 447,453 ---- X &tmp_win->icon_width, &tmp_win->icon_height, &JunkBW, &JunkDepth); X X pm = XCreatePixmap(dpy, Root, tmp_win->icon_width, tmp_win->icon_height, X! d_depth); X X XCopyPlane(dpy, tmp_win->wmhints->icon_pixmap, pm, IconNormalGC, X 0,0, tmp_win->icon_width, tmp_win->icon_height, 0, 0, 1 ); X*************** X*** 476,482 **** X */ X X pm = XCreatePixmap(dpy, Root, tmp_win->icon_width, X! tmp_win->icon_height, DefaultDepth(dpy, 0)); X X /* the copy plane works on color ! */ X XCopyPlane(dpy, bm, pm, IconNormalGC, X--- 476,482 ---- X */ X X pm = XCreatePixmap(dpy, Root, tmp_win->icon_width, X! tmp_win->icon_height, d_depth); X X /* the copy plane works on color ! */ X XCopyPlane(dpy, bm, pm, IconNormalGC, X*************** X*** 505,511 **** X tmp_win->icon_height, AllPlanes, XYPixmap); X X pm = XCreatePixmap(dpy, Root, tmp_win->icon_width, X! tmp_win->icon_height, DefaultDepth(dpy, 0)); X X /* the copy plane works on color ! */ X XCopyPlane(dpy, UnknownPm, pm, IconNormalGC, X--- 505,511 ---- X tmp_win->icon_height, AllPlanes, XYPixmap); X X pm = XCreatePixmap(dpy, Root, tmp_win->icon_width, X! tmp_win->icon_height, d_depth); X X /* the copy plane works on color ! */ X XCopyPlane(dpy, UnknownPm, pm, IconNormalGC, X*************** X*** 573,581 **** X X tmp_win->icon_bm_w = XCreateWindow(dpy, tmp_win->icon_w, X x, 0, tmp_win->icon_width, tmp_win->icon_height, X! 0, DefaultDepth(dpy, 0), CopyFromParent, X! DefaultVisual(dpy,0), X! valuemask, &attributes); X } X X XDefineCursor(dpy, tmp_win->icon_w, ArrowCursor); X--- 573,580 ---- X X tmp_win->icon_bm_w = XCreateWindow(dpy, tmp_win->icon_w, X x, 0, tmp_win->icon_width, tmp_win->icon_height, X! 0, d_depth, CopyFromParent, X! d_visual, valuemask, &attributes); X } X X XDefineCursor(dpy, tmp_win->icon_w, ArrowCursor); Xdiff -c old/events.c new/events.c X*** old/events.c Fri Jun 17 07:17:23 1988 X--- new/events.c Fri Jun 17 07:20:00 1988 X*************** X*** 25,31 **** X X /*********************************************************************** X * X! * $Header: events.c,v 1.56 88/06/02 14:37:24 tlastran Exp $ X * X * twm event handling X * X--- 25,31 ---- X X /*********************************************************************** X * X! * $Header: events.c,v 1.59 88/06/17 06:48:15 tlastran Exp $ X * X * twm event handling X * X*************** X*** 35,41 **** X X #ifndef lint X static char RCSinfo[]= X! "$Header: events.c,v 1.56 88/06/02 14:37:24 tlastran Exp $"; X #endif X X #include <stdio.h> X--- 35,41 ---- X X #ifndef lint X static char RCSinfo[]= X! "$Header: events.c,v 1.59 88/06/17 06:48:15 tlastran Exp $"; X #endif X X #include <stdio.h> X*************** X*** 250,256 **** X &JunkBW, &JunkDepth); X X pm = XCreatePixmap(dpy, Root, tmp_win->icon_width, X! tmp_win->icon_height, DefaultDepth(dpy, screen)); X X XCopyPlane(dpy, wmhints->icon_pixmap, pm, IconNormalGC, X 0,0, tmp_win->icon_width, tmp_win->icon_height, 0, 0, 1 ); X--- 250,256 ---- X &JunkBW, &JunkDepth); X X pm = XCreatePixmap(dpy, Root, tmp_win->icon_width, X! tmp_win->icon_height, d_depth); X X XCopyPlane(dpy, wmhints->icon_pixmap, pm, IconNormalGC, X 0,0, tmp_win->icon_width, tmp_win->icon_height, 0, 0, 1 ); X*************** X*** 263,270 **** X X tmp_win->icon_bm_w = XCreateWindow(dpy, tmp_win->icon_w, X 0, 0, tmp_win->icon_width, tmp_win->icon_height, X! 0, DefaultDepth(dpy, 0), CopyFromParent, X! DefaultVisual(dpy,0), X valuemask, &attributes); X X RedoIconName(); X--- 263,269 ---- X X tmp_win->icon_bm_w = XCreateWindow(dpy, tmp_win->icon_w, X 0, 0, tmp_win->icon_width, tmp_win->icon_height, X! 0, d_depth, CopyFromParent, d_visual, X valuemask, &attributes); X X RedoIconName(); X*************** X*** 472,481 **** X fprintf(stderr, "MapRequest\n"); X #endif X X- /* X- XBell(dpy, 0); X- */ X- X stat = XFindContext(dpy, event.xmaprequest.window, TwmContext, &tmp_win); X if (stat == XCNOENT) X tmp_win = NULL; X--- 471,476 ---- X*************** X*** 905,911 **** X if (w == Root) X { X RootFunction = NULL; X! XBell(dpy, 0); X return; X } X X--- 900,906 ---- X if (w == Root) X { X RootFunction = NULL; X! XBell(dpy, screen); X return; X } X X*************** X*** 978,985 **** X XSetWindowBorder(dpy, tmp_win->frame, Foreground); X XSetWindowBorder(dpy, tmp_win->title_w, Foreground); X */ X! XSetInputFocus(dpy, tmp_win->w, RevertToPointerRoot, X! CurrentTime); X XUngrabKeyboard(dpy, CurrentTime); X Focus = tmp_win; X } X--- 973,981 ---- X XSetWindowBorder(dpy, tmp_win->frame, Foreground); X XSetWindowBorder(dpy, tmp_win->title_w, Foreground); X */ X! if (TitleFocus) X! XSetInputFocus(dpy, tmp_win->w, RevertToPointerRoot, X! CurrentTime); X XUngrabKeyboard(dpy, CurrentTime); X Focus = tmp_win; X } X*************** X*** 1068,1075 **** X */ X XGrabKeyboard(dpy, Root, True, GrabModeAsync, X GrabModeAsync, CurrentTime); X! XSetInputFocus(dpy, Root, RevertToPointerRoot, X! CurrentTime); X Focus = NULL; X } X } X--- 1064,1072 ---- X */ X XGrabKeyboard(dpy, Root, True, GrabModeAsync, X GrabModeAsync, CurrentTime); X! if (TitleFocus) X! XSetInputFocus(dpy, Root, RevertToPointerRoot, X! CurrentTime); X Focus = NULL; X } X } Xdiff -c old/gc.c new/gc.c X*** old/gc.c Fri Jun 17 07:17:20 1988 X--- new/gc.c Fri Jun 17 07:19:57 1988 X*************** X*** 25,31 **** X X /********************************************************************** X * X! * $Header: gc.c,v 1.8 88/06/03 10:31:55 tlastran Exp $ X * X * Open the fonts and create the GCs X * X--- 25,31 ---- X X /********************************************************************** X * X! * $Header: gc.c,v 1.9 88/06/13 08:05:15 tlastran Exp $ X * X * Open the fonts and create the GCs X * X*************** X*** 35,41 **** X X #ifndef lint X static char RCSinfo[]= X! "$Header: gc.c,v 1.8 88/06/03 10:31:55 tlastran Exp $"; X #endif lint X X #include <stdio.h> X--- 35,41 ---- X X #ifndef lint X static char RCSinfo[]= X! "$Header: gc.c,v 1.9 88/06/13 08:05:15 tlastran Exp $"; X #endif lint X X #include <stdio.h> X*************** X*** 98,105 **** X Background = White; X } X X- mask = Foreground ^ Background; X- X gcm = 0; X gcm |= GCFont; gcv.font = TitleBarFont->fid; X gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X--- 98,103 ---- X*************** X*** 158,167 **** X X IconNormalGC = XCreateGC(dpy, Root, gcm, &gcv); X X- mask = Foreground ^ Background; X gcm = 0; X gcm |= GCFont; gcv.font = VersionFont->fid; X! gcm |= GCPlaneMask; gcv.plane_mask = mask; X gcm |= GCForeground; gcv.foreground = Foreground; X gcm |= GCBackground; gcv.background = Background; X X--- 156,164 ---- X X IconNormalGC = XCreateGC(dpy, Root, gcm, &gcv); X X gcm = 0; X gcm |= GCFont; gcv.font = VersionFont->fid; X! gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = Foreground; X gcm |= GCBackground; gcv.background = Background; X X*************** X*** 169,175 **** X X gcm = 0; X gcm |= GCFont; gcv.font = SizeFont->fid; X! gcm |= GCPlaneMask; gcv.plane_mask = mask; X gcm |= GCForeground; gcv.foreground = Foreground; X gcm |= GCBackground; gcv.background = Background; X X--- 166,172 ---- X X gcm = 0; X gcm |= GCFont; gcv.font = SizeFont->fid; X! gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = Foreground; X gcm |= GCBackground; gcv.background = Background; X X*************** X*** 177,183 **** X X gcm = 0; X gcm |= GCFont; gcv.font = InitialFont->fid; X! gcm |= GCPlaneMask; gcv.plane_mask = mask; X gcm |= GCForeground; gcv.foreground = Foreground; X gcm |= GCBackground; gcv.background = Background; X X--- 174,180 ---- X X gcm = 0; X gcm |= GCFont; gcv.font = InitialFont->fid; X! gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = Foreground; X gcm |= GCBackground; gcv.background = Background; X Xdiff -c old/gram.h new/gram.h X*** old/gram.h Fri Jun 17 07:17:29 1988 X--- new/gram.h Fri Jun 17 07:20:06 1988 X*************** X*** 75,78 **** X # define NO_RAISE_ON_RESIZE 324 X # define COLOR 325 X # define MONOCHROME 326 X! # define STRING 327 X--- 75,79 ---- X # define NO_RAISE_ON_RESIZE 324 X # define COLOR 325 X # define MONOCHROME 326 X! # define NO_TITLE_FOCUS 327 X! # define STRING 328 Xdiff -c old/gram.y new/gram.y X*** old/gram.y Fri Jun 17 07:17:18 1988 X--- new/gram.y Fri Jun 17 07:19:54 1988 X*************** X*** 25,31 **** X X /*********************************************************************** X * X! * $Header: gram.y,v 1.26 88/06/03 10:45:44 tlastran Exp $ X * X * .twmrc command grammer X * X--- 25,31 ---- X X /*********************************************************************** X * X! * $Header: gram.y,v 1.27 88/06/09 07:51:49 tlastran Exp $ X * X * .twmrc command grammer X * X*************** X*** 35,41 **** X X %{ X static char RCSinfo[]= X! "$Header: gram.y,v 1.26 88/06/03 10:45:44 tlastran Exp $"; X X #include <stdio.h> X #include "twm.h" X--- 35,41 ---- X X %{ X static char RCSinfo[]= X! "$Header: gram.y,v 1.27 88/06/09 07:51:49 tlastran Exp $"; X X #include <stdio.h> X #include "twm.h" X*************** X*** 78,84 **** X %token <num> MENU_TITLE_FOREGROUND MENU_TITLE_BACKGROUND X %token <num> ICON_FOREGROUND ICON_BACKGROUND ICON_BORDER_COLOR X %token <num> NO_RAISE_ON_MOVE NO_RAISE_ON_DEICONIFY NO_RAISE_ON_RESIZE X! %token <num> COLOR MONOCHROME X %token <ptr> STRING X X %type <ptr> string X--- 78,84 ---- X %token <num> MENU_TITLE_FOREGROUND MENU_TITLE_BACKGROUND X %token <num> ICON_FOREGROUND ICON_BACKGROUND ICON_BORDER_COLOR X %token <num> NO_RAISE_ON_MOVE NO_RAISE_ON_DEICONIFY NO_RAISE_ON_RESIZE X! %token <num> COLOR MONOCHROME NO_TITLE_FOCUS X %token <ptr> STRING X X %type <ptr> string X*************** X*** 112,117 **** X--- 112,118 ---- X | DONT_MOVE_OFF { if (FirstTime) DontMoveOff = TRUE; } X | ZOOM { if (FirstTime) DoZoom = TRUE; } X | BORDERWIDTH number { if (FirstTime) BorderWidth = $2; } X+ | NO_TITLE_FOCUS { if (FirstTime) TitleFocus = FALSE; } X | button string { root = GetRoot($2); X Mouse[$1][C_ROOT][0].func = F_MENU; X Mouse[$1][C_ROOT][0].menu = root; Xdiff -c old/lex.l new/lex.l X*** old/lex.l Fri Jun 17 07:17:17 1988 X--- new/lex.l Fri Jun 17 07:19:53 1988 X*************** X*** 26,32 **** X X /*********************************************************************** X * X! * $Header: lex.l,v 1.29 88/06/03 10:45:41 tlastran Exp $ X * X * .twmrc lex file X * X--- 26,32 ---- X X /*********************************************************************** X * X! * $Header: lex.l,v 1.30 88/06/09 07:51:42 tlastran Exp $ X * X * .twmrc lex file X * X*************** X*** 35,41 **** X ***********************************************************************/ X X static char RCSinfo[]= X! "$Header: lex.l,v 1.29 88/06/03 10:45:41 tlastran Exp $"; X X #include <stdio.h> X #include "gram.h" X--- 35,41 ---- X ***********************************************************************/ X X static char RCSinfo[]= X! "$Header: lex.l,v 1.30 88/06/09 07:51:42 tlastran Exp $"; X X #include <stdio.h> X #include "gram.h" X*************** X*** 110,115 **** X--- 110,116 ---- X {noraise}[Rr][Ee][Ss][Ii][Zz][Ee] { return NO_RAISE_ON_RESIZE; } X [Cc][Oo][Ll][Oo][Rr] { return (COLOR); } X [Mm][Oo][Nn][Oo][Cc][Hh][Rr][Oo][Mm][Ee] { return (MONOCHROME); } X+ [Nn][Oo][Tt][Ii][Tt][Ll][Ee][Ff][Oo][Cc][Uu][Ss] { return (NO_TITLE_FOCUS); } X [Zz][Oo][Oo][Mm] { return (ZOOM); } X [Uu][Nn][Kk][Nn][Oo][Ww][Nn][Ii][Cc][Oo][Nn] { return UNKNOWN_ICON; } X [Ww][Aa][Rr][Pp][Cc][Uu][Rr][Ss][Oo][Rr] { return WARPCURSOR; } Xdiff -c old/menus.c new/menus.c X*** old/menus.c Fri Jun 17 07:17:37 1988 X--- new/menus.c Fri Jun 17 07:20:15 1988 X*************** X*** 25,31 **** X X /*********************************************************************** X * X! * $Header: menus.c,v 1.34 88/06/03 10:45:54 tlastran Exp $ X * X * twm menu code X * X--- 25,31 ---- X X /*********************************************************************** X * X! * $Header: menus.c,v 1.36 88/06/17 06:48:19 tlastran Exp $ X * X * twm menu code X * X*************** X*** 35,41 **** X X #ifndef lint X static char RCSinfo[] = X! "$Header: menus.c,v 1.34 88/06/03 10:45:54 tlastran Exp $"; X #endif X X #include <stdio.h> X--- 35,41 ---- X X #ifndef lint X static char RCSinfo[] = X! "$Header: menus.c,v 1.36 88/06/17 06:48:19 tlastran Exp $"; X #endif X X #include <stdio.h> X*************** X*** 242,249 **** X tmp->pull = XCreateWindow(dpy, tmp->w, X 0, 0, X pull_width, MenuFontHeight + 4, X! 0, DefaultDepth(dpy, 0), CopyFromParent, DefaultVisual(dpy, 0), X! valuemask, &attributes); X X XMapWindow(dpy, tmp->pull); X X--- 242,249 ---- X tmp->pull = XCreateWindow(dpy, tmp->w, X 0, 0, X pull_width, MenuFontHeight + 4, X! 0, d_depth, CopyFromParent, X! d_visual, valuemask, &attributes); X X XMapWindow(dpy, tmp->pull); X X*************** X*** 278,284 **** X MenuRoot *menu; X int x, y; X { X! int d_width, d_height, m_height; X XWindowChanges xwc, pwc; X unsigned int xwcm, pwcm; X MenuItem *tmp; X--- 278,284 ---- X MenuRoot *menu; X int x, y; X { X! int m_height; X XWindowChanges xwc, pwc; X unsigned int xwcm, pwcm; X MenuItem *tmp; X*************** X*** 325,339 **** X } X menu->mapped = TRUE; X X- d_width = DisplayWidth(dpy, DefaultScreen(dpy)); X- d_height = DisplayHeight(dpy, DefaultScreen(dpy)); X m_height = menu->items * (MenuFontHeight + 4); X X! if ((x + menu->width + 10) > d_width) X! x = (d_width - menu->width - 20); X X! if ((y + m_height + 10) > d_height) X! y = (d_height - m_height - 20); X X xwcm = 0; X xwcm |= CWX; X--- 325,337 ---- X } X menu->mapped = TRUE; X X m_height = menu->items * (MenuFontHeight + 4); X X! if ((x + menu->width + 10) > MyDisplayWidth) X! x = (MyDisplayWidth - menu->width - 20); X X! if ((y + m_height + 10) > MyDisplayHeight) X! y = (MyDisplayHeight - m_height - 20); X X xwcm = 0; X xwcm |= CWX; Xdiff -c old/twm.c new/twm.c X*** old/twm.c Fri Jun 17 07:17:21 1988 X--- new/twm.c Fri Jun 17 07:19:58 1988 X*************** X*** 25,31 **** X X /*********************************************************************** X * X! * $Header: twm.c,v 1.38 88/06/03 10:45:37 tlastran Exp $ X * X * twm - "Tom's Window Manager" X * X--- 25,31 ---- X X /*********************************************************************** X * X! * $Header: twm.c,v 1.42 88/06/17 06:48:01 tlastran Exp $ X * X * twm - "Tom's Window Manager" X * X*************** X*** 35,41 **** X X #ifndef lint X static char RCSinfo[] = X! "$Header: twm.c,v 1.38 88/06/03 10:45:37 tlastran Exp $"; X #endif X X #include <stdio.h> X--- 35,41 ---- X X #ifndef lint X static char RCSinfo[] = X! "$Header: twm.c,v 1.42 88/06/17 06:48:01 tlastran Exp $"; X #endif X X #include <stdio.h> X*************** X*** 58,63 **** X--- 58,65 ---- X X Display *dpy; /* which display are we talking to */ X int screen; /* the default screen */ X+ int d_depth; /* copy of DefaultDepth(dpy, screen) */ X+ Visual *d_visual; /* copy of DefaultVisual(dpy, screen) */ X X Window Root; /* the root window */ X Window VersionWindow; /* the twm version window */ X*************** X*** 148,153 **** X--- 150,156 ---- X int DontMoveOff = FALSE; /* don't allow windows to be moved off */ X int DoZoom = FALSE; /* zoom in and out of icons */ X int Monochrome = COLOR; /* is the display monochrome ? */ X+ int TitleFocus = TRUE; /* focus on window in title bar ? */ X char *Home; /* the HOME environment variable */ X int HomeLen; /* length of Home */ X int ParseError; /* error parsing the .twmrc file */ X*************** X*** 242,247 **** X--- 245,252 ---- X } X X screen = DefaultScreen(dpy); X+ d_depth = DefaultDepth(dpy, screen); X+ d_visual = DefaultVisual(dpy, screen); X Root = RootWindow(dpy, screen); X CMap = DefaultColormap(dpy, screen); X MyDisplayWidth = DisplayWidth(dpy, screen); X*************** X*** 251,257 **** X XSelectInput(dpy, Root, X SubstructureRedirectMask | X ButtonPressMask | ButtonReleaseMask | ExposureMask); X! XSync(dpy, 0); X X XSetErrorHandler(Error); X XSetInputFocus(dpy, Root, RevertToPointerRoot, CurrentTime); X--- 256,262 ---- X XSelectInput(dpy, Root, X SubstructureRedirectMask | X ButtonPressMask | ButtonReleaseMask | ExposureMask); X! XSync(dpy, screen); X X XSetErrorHandler(Error); X XSetInputFocus(dpy, Root, RevertToPointerRoot, CurrentTime); X*************** X*** 271,277 **** X SkullCursor = XCreateFontCursor(dpy, XC_pirate); X X XGrabServer(dpy); X! XSync(dpy, 0); X XQueryTree(dpy, Root, &root, &parent, &children, &nchildren); X X /* setup default colors */ X--- 276,282 ---- X SkullCursor = XCreateFontCursor(dpy, XC_pirate); X X XGrabServer(dpy); X! XSync(dpy, screen); X XQueryTree(dpy, Root, &root, &parent, &children, &nchildren); X X /* setup default colors */ X*************** X*** 291,297 **** X IconBackground = White; X IconBorderColor = Black; X X! if (DefaultDepth(dpy, screen) == 1) X Monochrome = MONOCHROME; X X ParseTwmrc(NULL); X--- 296,302 ---- X IconBackground = White; X IconBorderColor = Black; X X! if (d_depth == 1) X Monochrome = MONOCHROME; X X ParseTwmrc(NULL); X*************** X*** 333,340 **** X XCreateWindow(dpy, VersionWindow, X 4, 1, X twm_width, twm_height, X! 0, DefaultDepth(dpy, 0), CopyFromParent, DefaultVisual(dpy, 0), X! valuemask, &attributes); X X XSelectInput(dpy, VersionWindow, ExposureMask); X XMapSubwindows(dpy, VersionWindow); X--- 338,345 ---- X XCreateWindow(dpy, VersionWindow, X 4, 1, X twm_width, twm_height, X! 0, d_depth, CopyFromParent, X! d_visual, valuemask, &attributes); X X XSelectInput(dpy, VersionWindow, ExposureMask); X XMapSubwindows(dpy, VersionWindow); X*************** X*** 429,435 **** X /* Look for the window in the list, if it's there, remove it X * from the list, and continue on, else ignore the error. X * This is assumes that twm makes no errors. HaHa X- */ X for (tmp = TwmRoot.next; tmp != NULL; tmp = tmp->next) X { X if (tmp->w == event->resourceid) X--- 434,439 ---- X*************** X*** 459,464 **** X--- 463,469 ---- X return; X } X } X+ */ X X return; X Xdiff -c old/twm.h new/twm.h X*** old/twm.h Fri Jun 17 07:17:34 1988 X--- new/twm.h Fri Jun 17 07:20:11 1988 X*************** X*** 25,31 **** X X /*********************************************************************** X * X! * $Header: twm.h,v 1.30 88/06/03 10:45:48 tlastran Exp $ X * X * twm include file X * X--- 25,31 ---- X X /*********************************************************************** X * X! * $Header: twm.h,v 1.32 88/06/17 06:48:09 tlastran Exp $ X * X * twm include file X * X*************** X*** 118,123 **** X--- 118,125 ---- X X extern Display *dpy; X extern int screen; X+ extern int d_depth; X+ extern Visual *d_visual; X X extern Window Root; X extern Window VersionWindow; X*************** X*** 208,213 **** X--- 210,216 ---- X extern int NoRaiseResize; X extern int NoRaiseDeicon; X extern int Monochrome; X+ extern int TitleFocus; X extern char *Home; X extern int HomeLen; X extern int ParseError; Xdiff -c old/twm.man new/twm.man X*** old/twm.man Fri Jun 17 07:17:16 1988 X--- new/twm.man Fri Jun 17 07:19:52 1988 X*************** X*** 229,234 **** X--- 229,238 ---- X .IP "\fBNoRaiseOnResize\fP" 20 X If this variable is specified, windows will not be raised to the top of X the stacking order following a resize. X+ .IP "\fBNoTitleFocus\fP" 20 X+ If this variable is specified, input focus will not be directed to windows X+ when the pointer is in the title bar. The default is to focus input to X+ a client when the pointer is in the title bar. X .IP "\fBResizeFont\fP \fIstring\fP" 20 X This variable names the font to be displayed in the dimensions window X during window resize operations. Xdiff -c old/util.c new/util.c X*** old/util.c Fri Jun 17 07:17:38 1988 X--- new/util.c Fri Jun 17 07:20:16 1988 X*************** X*** 25,31 **** X X /*********************************************************************** X * X! * $Header: util.c,v 1.17 88/06/03 06:39:10 tlastran Exp $ X * X * utility routines for twm X * X--- 25,31 ---- X X /*********************************************************************** X * X! * $Header: util.c,v 1.21 88/06/17 07:15:25 tlastran Exp $ X * X * utility routines for twm X * X*************** X*** 35,41 **** X X #ifndef lint X static char RCSinfo[]= X! "$Header: util.c,v 1.17 88/06/03 06:39:10 tlastran Exp $"; X #endif X X #include <stdio.h> X--- 35,41 ---- X X #ifndef lint X static char RCSinfo[]= X! "$Header: util.c,v 1.21 88/06/17 07:15:25 tlastran Exp $"; X #endif X X #include <stdio.h> X*************** X*** 334,340 **** X Pixmap pid; X int dx, dy; X X! pid = XCreatePixmap(dpy, w, width, height, DefaultDepth(dpy, 0)); X X ximage.height = pheight; X ximage.width = pwidth; X--- 334,340 ---- X Pixmap pid; X int dx, dy; X X! pid = XCreatePixmap(dpy, w, width, height, d_depth); X X ximage.height = pheight; X ximage.width = pwidth; X*************** X*** 519,525 **** X int *what; X char *name; X { X- int stat; X XColor color, junkcolor; X X if (!FirstTime) X--- 519,524 ---- X*************** X*** 528,543 **** X if (Monochrome != kind) X return; X X! stat = XAllocNamedColor(dpy, CMap, name, &color, &junkcolor); X! switch (stat) X { X! case BadAlloc: X! case BadColor: X! case BadName: X! fprintf(stderr, "twm: invalid color \"%s\" %d\n", name, stat); X! break; X X! default: X! *what = color.pixel; X } X } X--- 527,543 ---- X if (Monochrome != kind) X return; X X! if (!XParseColor(dpy, CMap, name, &color)) X { X! fprintf(stderr, "twm: invalid color \"%s\"\n", name); X! return; X! } X X! if (!XAllocColor(dpy, CMap, &color)) X! { X! fprintf(stderr, "twm: invalid color \"%s\"\n", name); X! return; X } X+ X+ *what = color.pixel; X } Xdiff -c old/version.c new/version.c X*** old/version.c Fri Jun 17 07:17:39 1988 X--- new/version.c Fri Jun 17 07:20:16 1988 X*************** X*** 25,31 **** X X /*********************************************************************** X * X! * $Header: version.c,v 3.0 88/06/03 11:32:05 tlastran Exp $ X * X * twm version number X * X--- 25,31 ---- X X /*********************************************************************** X * X! * $Header: version.c,v 3.1 88/06/17 06:44:19 tlastran Exp $ X * X * twm version number X * X*************** X*** 34,40 **** X ***********************************************************************/ X X static char RCSinfo[]= X! "$Header: version.c,v 3.0 88/06/03 11:32:05 tlastran Exp $"; X X! char *Revision = "$Revision: 3.0 $"; X! char *Date = "$Date: 88/06/03 11:32:05 $"; X--- 34,40 ---- X ***********************************************************************/ X X static char RCSinfo[]= X! "$Header: version.c,v 3.1 88/06/17 06:44:19 tlastran Exp $"; X X! char *Revision = "$Revision: 3.1 $"; X! char *Date = "$Date: 88/06/17 06:44:19 $"; SHAR_EOF if test 28773 -ne "`wc -c < twm.patches`" then echo shar: error transmitting "twm.patches" '(should have been 28773 characters)' fi fi # end of shell archive exit 0