jkh@VIOLET.BERKELEY.EDU (Jordan K. Hubbard) (12/19/87)
DESCRIPTION: Changed "Bool" type to Boolean everywhere. This works around a char -> int conversion problem with Sun's 3.4 compiler. Border color on titlebar now does the right thing. AddTitle no longer coredumps when hints aren't set. Various nits. Changes for lint. FIX: *** uwm.new/Beep.c.old Thu Dec 17 13:56:30 1987 --- uwm.new/Beep.c Thu Dec 17 14:04:39 1987 *************** *** 41,47 **** #include "uwm.h" ! Bool Beep(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 41,47 ---- #include "uwm.h" ! Boolean Beep(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *** uwm.new/CircleDown.c.old Thu Dec 17 13:56:31 1987 --- uwm.new/CircleDown.c Thu Dec 17 14:04:44 1987 *************** *** 43,49 **** #include "uwm.h" ! Bool CircleDown(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 43,49 ---- #include "uwm.h" ! Boolean CircleDown(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *** uwm.new/CircleUp.c.old Thu Dec 17 13:56:31 1987 --- uwm.new/CircleUp.c Thu Dec 17 14:04:48 1987 *************** *** 43,49 **** #include "uwm.h" ! Bool CircleUp(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 43,49 ---- #include "uwm.h" ! Boolean CircleUp(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *** uwm.new/Focus.c.old Thu Dec 17 13:56:31 1987 --- uwm.new/Focus.c Thu Dec 17 14:04:50 1987 *************** *** 43,49 **** #include "uwm.h" ! Bool Focus(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 43,49 ---- #include "uwm.h" ! Boolean Focus(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *** uwm.new/FocusChange.c.old Tue Dec 15 18:16:39 1987 --- uwm.new/FocusChange.c Thu Dec 17 14:04:52 1987 *************** *** 17,24 **** #include <time.h> #endif ! extern Bool Snatched; ! Bool Eventp(); HandleFocusIn(ev) XEvent *ev; --- 17,24 ---- #include <time.h> #endif ! extern Boolean Snatched; ! Boolean Eventp(); HandleFocusIn(ev) XEvent *ev; *************** *** 48,57 **** w = dat->parent; /* light the border */ if (Hilite) { ! if (Reverse) XSetWindowBorder(dpy, w, WhitePixel(dpy, scr)); ! else XSetWindowBorder(dpy, w, BlackPixel(dpy, scr)); if (dat != NULL) PaintTitle(dat); } --- 48,65 ---- w = dat->parent; /* light the border */ if (Hilite) { ! if (Reverse) { XSetWindowBorder(dpy, w, WhitePixel(dpy, scr)); ! if (dat) ! XSetWindowBorder(dpy, dat->title, ! WhitePixel(dpy, scr)); ! } ! else { XSetWindowBorder(dpy, w, BlackPixel(dpy, scr)); + if (dat) + XSetWindowBorder(dpy, dat->title, + BlackPixel(dpy, scr)); + } if (dat != NULL) PaintTitle(dat); } *************** *** 59,65 **** * If Autoraise is set and we're not currently using a menu, * raise that puppy.. */ ! if (Autoraise == True && Snatched == False) XRaiseWindow(e->display, w); XSync(dpy, False); } --- 67,73 ---- * If Autoraise is set and we're not currently using a menu, * raise that puppy.. */ ! if (Autoraise && !Snatched) XRaiseWindow(e->display, w); XSync(dpy, False); } *************** *** 81,86 **** --- 89,97 ---- w = dat->parent; if (Hilite) { XSetWindowBorderPixmap(dpy, w, GrayPixmap); + if (dat) + XSetWindowBorderPixmap(dpy, dat->title, + GrayPixmap); if (dat != NULL) PaintTitle(dat, False); } *************** *** 94,109 **** * hence this cruft.. It also removes from the queue if desired and seems to * work better than XCheckTypedWindowEvent too. so.. oh well.. */ ! Bool Eventp(win, evt, removep) Window win; unsigned int evt; ! Bool removep; { static struct evq { struct evq *prev; XEvent *an_event; } *head = 0, *ptr; ! Bool gotEvent = False; while (XPending(dpy) && gotEvent == False) { XEvent event; --- 105,120 ---- * hence this cruft.. It also removes from the queue if desired and seems to * work better than XCheckTypedWindowEvent too. so.. oh well.. */ ! Boolean Eventp(win, evt, removep) Window win; unsigned int evt; ! Boolean removep; { static struct evq { struct evq *prev; XEvent *an_event; } *head = 0, *ptr; ! Boolean gotEvent = False; while (XPending(dpy) && gotEvent == False) { XEvent event; *** uwm.new/GetButton.c.old Thu Dec 17 13:56:34 1987 --- uwm.new/GetButton.c Thu Dec 17 14:04:53 1987 *************** *** 64,70 **** /* Amount of padding between text in a title bar and the edge of the bar */ #define PAD 1 ! Bool GetButton(b_ev) XEvent *b_ev; /* Button event packet. */ { #define STRLEN 50 --- 64,70 ---- /* Amount of padding between text in a title bar and the edge of the bar */ #define PAD 1 ! Boolean GetButton(b_ev) XEvent *b_ev; /* Button event packet. */ { #define STRLEN 50 *************** *** 413,419 **** int x, y, w, h; XWMHints *XGetWMHints(); Window transient_for; ! Bool configureit = False; Window jW; int border_width, j; TitleData *dat = 0; --- 413,419 ---- int x, y, w, h; XWMHints *XGetWMHints(); Window transient_for; ! Boolean configureit = False; Window jW; int border_width, j; TitleData *dat = 0; *** uwm.new/Iconify.c.old Thu Dec 17 13:56:34 1987 --- uwm.new/Iconify.c Thu Dec 17 14:04:54 1987 *************** *** 43,49 **** #include "uwm.h" ! Bool Iconify(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 43,49 ---- #include "uwm.h" ! Boolean Iconify(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 62,68 **** Window assoc; /* Associated window. */ Window sub_win; /* Mouse position sub-window. */ XSegment zap[MAX_ZAP_VECTORS]; /* Zap effect vertex buffer. */ ! Bool iconifying; /* Are we iconifying? */ /* * Do not try to iconify the root window. --- 62,68 ---- Window assoc; /* Associated window. */ Window sub_win; /* Mouse position sub-window. */ XSegment zap[MAX_ZAP_VECTORS]; /* Zap effect vertex buffer. */ ! Boolean iconifying; /* Are we iconifying? */ /* * Do not try to iconify the root window. *** uwm.new/Icons.c.old Thu Dec 17 13:56:35 1987 --- uwm.new/Icons.c Thu Dec 17 14:04:58 1987 *************** *** 44,50 **** struct _windowList *next; Window window; Window icon; ! Bool own; Pixmap pixmap; } WindowListRec, *WindowList; --- 44,50 ---- struct _windowList *next; Window window; Window icon; ! Boolean own; Pixmap pixmap; } WindowListRec, *WindowList; *************** *** 102,108 **** return( NULL ); } ! Bool IsIcon(icon, x, y, mousePositioned, assoc) Window icon; Window *assoc; { --- 102,108 ---- return( NULL ); } ! Boolean IsIcon(icon, x, y, mousePositioned, assoc) Window icon; Window *assoc; { *************** *** 171,177 **** Window MakeIcon(window, x, y, mousePositioned) Window window; /* associated window. */ int x, y; /* Event mouse position. */ ! Bool mousePositioned; { Window icon; /* icon window. */ int icon_x, icon_y; /* Icon U. L. X and Y coordinates. */ --- 171,177 ---- Window MakeIcon(window, x, y, mousePositioned) Window window; /* associated window. */ int x, y; /* Event mouse position. */ ! Boolean mousePositioned; { Window icon; /* icon window. */ int icon_x, icon_y; /* Icon U. L. X and Y coordinates. */ *************** *** 269,275 **** Window AddIcon(window, icon, own, mask, background) Window window, icon; ! Bool own; int mask; Pixmap background; { --- 269,275 ---- Window AddIcon(window, icon, own, mask, background) Window window, icon; ! Boolean own; int mask; Pixmap background; { *** uwm.new/Lower.c.old Thu Dec 17 13:56:35 1987 --- uwm.new/Lower.c Thu Dec 17 14:05:01 1987 *************** *** 41,47 **** #include "uwm.h" ! Bool Lower(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 41,47 ---- #include "uwm.h" ! Boolean Lower(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *** uwm.new/Menu.c.old Thu Dec 17 13:56:36 1987 --- uwm.new/Menu.c Thu Dec 17 14:05:03 1987 *************** *** 50,56 **** #include <signal.h> #include "uwm.h" ! Bool alternateGC; /* true if only 2 colors are used */ #define DisplayLine(w, pane, width, height, str, fg, bg, inv) \ if (alternateGC) { \ --- 50,56 ---- #include <signal.h> #include "uwm.h" ! Boolean alternateGC; /* true if only 2 colors are used */ #define DisplayLine(w, pane, width, height, str, fg, bg, inv) \ if (alternateGC) { \ *************** *** 98,106 **** * Set in MapMenu and UnmapMenu. Also used by GetButton to prevent autoraise * during configure/map ops. */ ! Bool Snatched; ! Bool Menu(window, mask, button, x, y, menu) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 98,106 ---- * Set in MapMenu and UnmapMenu. Also used by GetButton to prevent autoraise * during configure/map ops. */ ! Boolean Snatched; ! Boolean Menu(window, mask, button, x, y, menu) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 109,115 **** { XEvent button_event; /* Button event packet. */ int event_x, event_y; /* location of button event */ ! Bool func_stat; /* Function status return. */ Window sub_window; /* Current subwindow. */ int cur_item = 0; /* Current menu item. */ int hi_lite = 0; /* Current highlighted item. */ --- 109,115 ---- { XEvent button_event; /* Button event packet. */ int event_x, event_y; /* location of button event */ ! Boolean func_stat; /* Function status return. */ Window sub_window; /* Current subwindow. */ int cur_item = 0; /* Current menu item. */ int hi_lite = 0; /* Current highlighted item. */ *** uwm.new/Move.c.old Thu Dec 17 13:56:36 1987 --- uwm.new/Move.c Thu Dec 17 14:05:04 1987 *************** *** 41,47 **** #include "uwm.h" ! Bool Move(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 41,47 ---- #include "uwm.h" ! Boolean Move(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *** uwm.new/MoveOpaque.c.old Thu Dec 17 13:56:37 1987 --- uwm.new/MoveOpaque.c Thu Dec 17 14:05:07 1987 *************** *** 43,49 **** #include "uwm.h" ! Bool MoveOpaque(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 43,49 ---- #include "uwm.h" ! Boolean MoveOpaque(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *** uwm.new/NewIconify.c.old Thu Dec 17 13:56:37 1987 --- uwm.new/NewIconify.c Thu Dec 17 14:05:08 1987 *************** *** 37,43 **** #include "uwm.h" ! Bool NewIconify(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 37,43 ---- #include "uwm.h" ! Boolean NewIconify(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 69,75 **** XEvent button_event; /* Button event packet. */ XSegment box[MAX_BOX_VECTORS]; /* Box vertex buffer. */ XSegment zap[MAX_ZAP_VECTORS]; /* Zap effect vertex buffer. */ ! Bool iconifying; /* Are we iconifying? */ /* * Do not lower or iconify the root window. --- 69,75 ---- XEvent button_event; /* Button event packet. */ XSegment box[MAX_BOX_VECTORS]; /* Box vertex buffer. */ XSegment zap[MAX_ZAP_VECTORS]; /* Zap effect vertex buffer. */ ! Boolean iconifying; /* Are we iconifying? */ /* * Do not lower or iconify the root window. *** uwm.new/Pause.c.old Thu Dec 17 13:56:37 1987 --- uwm.new/Pause.c Thu Dec 17 14:05:10 1987 *************** *** 43,49 **** #include "uwm.h" ! Bool Pause(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 43,49 ---- #include "uwm.h" ! Boolean Pause(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 53,59 **** return(FALSE); } ! Bool Continue(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 53,59 ---- return(FALSE); } ! Boolean Continue(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *** uwm.new/Push.c.old Thu Dec 17 13:56:38 1987 --- uwm.new/Push.c Thu Dec 17 14:05:11 1987 *************** *** 48,56 **** #define PUSH_LEFT 3 #define PUSH_RIGHT 4 ! extern Bool PushAll(); ! Bool PushDown(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 48,56 ---- #define PUSH_LEFT 3 #define PUSH_RIGHT 4 ! extern Boolean PushAll(); ! Boolean PushDown(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 59,65 **** return(PushAll(window, PUSH_DOWN)); } ! Bool PushUp(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 59,65 ---- return(PushAll(window, PUSH_DOWN)); } ! Boolean PushUp(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 68,74 **** return(PushAll(window, PUSH_UP)); } ! Bool PushLeft(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 68,74 ---- return(PushAll(window, PUSH_UP)); } ! Boolean PushLeft(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 77,83 **** return(PushAll(window, PUSH_LEFT)); } ! Bool PushRight(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 77,83 ---- return(PushAll(window, PUSH_LEFT)); } ! Boolean PushRight(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 86,92 **** return(PushAll(window, PUSH_RIGHT)); } ! Bool PushAll(w, direction) Window w; int direction; { --- 86,92 ---- return(PushAll(window, PUSH_RIGHT)); } ! Boolean PushAll(w, direction) Window w; int direction; { *** uwm.new/Raise.c.old Thu Dec 17 13:56:38 1987 --- uwm.new/Raise.c Thu Dec 17 14:05:13 1987 *************** *** 42,48 **** #include "uwm.h" ! Bool Raise(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 42,48 ---- #include "uwm.h" ! Boolean Raise(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *** uwm.new/Refresh.c.old Thu Dec 17 13:56:38 1987 --- uwm.new/Refresh.c Thu Dec 17 14:05:14 1987 *************** *** 43,49 **** #include "uwm.h" ! Bool Refresh(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 43,49 ---- #include "uwm.h" ! Boolean Refresh(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 54,60 **** ! Bool Redraw(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 54,60 ---- ! Boolean Redraw(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *** uwm.new/Resize.c.old Thu Dec 17 13:56:39 1987 --- uwm.new/Resize.c Thu Dec 17 14:05:17 1987 *************** *** 52,60 **** #define min(a,b) ( (a) > (b) ? (b) : (a) ) #define makemult(a, b) ((b==1) ? (a) : (((int)((a) / (b))) * (b)) ) ! extern Bool Snatched; ! Bool Resize(window, mask, button, x0, y0) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 52,60 ---- #define min(a,b) ( (a) > (b) ? (b) : (a) ) #define makemult(a, b) ((b==1) ? (a) : (((int)((a) / (b))) * (b)) ) ! extern Boolean Snatched; ! Boolean Resize(window, mask, button, x0, y0) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 82,88 **** XEvent button_event; /* Button event packet. */ XSegment box[MAX_BOX_VECTORS]; /* Box drawing vertex buffer. */ XSegment zap[MAX_ZAP_VECTORS]; /* Zap drawing vertex buffer. */ ! Bool stop; /* Should the window stop changing? */ XSizeHints sizehints; XWindowChanges values; int width_offset, height_offset; /* to subtract if resize increments */ --- 82,88 ---- XEvent button_event; /* Button event packet. */ XSegment box[MAX_BOX_VECTORS]; /* Box drawing vertex buffer. */ XSegment zap[MAX_ZAP_VECTORS]; /* Zap drawing vertex buffer. */ ! Boolean stop; /* Should the window stop changing? */ XSizeHints sizehints; XWindowChanges values; int width_offset, height_offset; /* to subtract if resize increments */ *** uwm.new/Restart.c.old Thu Dec 17 13:56:39 1987 --- uwm.new/Restart.c Thu Dec 17 14:15:30 1987 *************** *** 38,44 **** #include "uwm.h" ! Bool Restart(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 38,44 ---- #include "uwm.h" ! Boolean Restart(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 57,63 **** fprintf(stderr, "uwm: Restart failed!\n"); } ! Bool Quit(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ --- 57,63 ---- fprintf(stderr, "uwm: Restart failed!\n"); } ! Boolean Quit(window, mask, button, x, y) Window window; /* Event window. */ int mask; /* Button/key mask. */ int button; /* Button event detail. */ *************** *** 67,73 **** exit(0); } ! DestroyWindow(window, mask, button, x, y) Window window; int mask; int x, y; --- 67,73 ---- exit(0); } ! Boolean DestroyWindow(window, mask, button, x, y) Window window; int mask; int x, y; *** uwm.new/TitleBar.c.old Wed Dec 16 13:52:29 1987 --- uwm.new/TitleBar.c Thu Dec 17 14:15:16 1987 *************** *** 22,28 **** XContext Title_context; int Pad = PAD; int Fheight; ! static Bool init_done = False; Cursor TitleCursor; Init_Titles() --- 22,28 ---- XContext Title_context; int Pad = PAD; int Fheight; ! static Boolean init_done = False; Cursor TitleCursor; Init_Titles() *************** *** 65,71 **** } /* Function for f.title */ ! FAddTitle(w, mask, button, x, y) Window w; int mask, button, x, y; { --- 65,71 ---- } /* Function for f.title */ ! Boolean FAddTitle(w, mask, button, x, y) Window w; int mask, button, x, y; { *************** *** 101,107 **** Window AddTitle(w, map) Window w; ! Bool map; { Window root; int x, y, width, height, bw, depth; --- 101,107 ---- Window AddTitle(w, map) Window w; ! Boolean map; { Window root; int x, y, width, height, bw, depth; *************** *** 154,162 **** XSetIconName(dpy, foster, icon_name); free(icon_name); } ! wm_hints = XGetWMHints(dpy, w); ! XSetWMHints(dpy, foster, wm_hints); ! XFree(wm_hints); XGetSizeHints(dpy, w, &sz_hints, XA_WM_NORMAL_HINTS); XSetSizeHints(dpy, foster, &sz_hints, XA_WM_NORMAL_HINTS); XSaveContext(dpy, title, Title_context, tinfo); --- 154,163 ---- XSetIconName(dpy, foster, icon_name); free(icon_name); } ! if (wm_hints = XGetWMHints(dpy, w)) { ! XSetWMHints(dpy, foster, wm_hints); ! XFree(wm_hints); ! } XGetSizeHints(dpy, w, &sz_hints, XA_WM_NORMAL_HINTS); XSetSizeHints(dpy, foster, &sz_hints, XA_WM_NORMAL_HINTS); XSaveContext(dpy, title, Title_context, tinfo); *************** *** 165,171 **** return(foster); } ! FDestroyTitle(w, mask, button, x, y) Window w; int mask, button, x, y; { --- 166,172 ---- return(foster); } ! Boolean FDestroyTitle(w, mask, button, x, y) Window w; int mask, button, x, y; { *************** *** 181,187 **** DestroyTitle(t_data, mung) TitleData *t_data; ! Bool mung; { XWindowAttributes xwa; --- 182,188 ---- DestroyTitle(t_data, mung) TitleData *t_data; ! Boolean mung; { XWindowAttributes xwa; *************** *** 219,225 **** int x, y, ijunk; XWindowAttributes xwa; Window junk, chld; ! Bool reversed; XFontStruct *f_info; XGetWindowAttributes(dpy, t_data->title, &xwa); --- 220,226 ---- int x, y, ijunk; XWindowAttributes xwa; Window junk, chld; ! Boolean reversed; XFontStruct *f_info; XGetWindowAttributes(dpy, t_data->title, &xwa); *** uwm.new/globals.c.old Thu Dec 17 13:56:43 1987 --- uwm.new/globals.c Thu Dec 17 14:05:22 1987 *************** *** 106,133 **** GC DrawGC; /* graphics context for drawing */ Binding *Blist; /* Button/key binding list. */ ! Bool Autoselect; /* Warp mouse to default menu selection? */ ! Bool Autoraise; /* Raise window on input focus? */ ! Bool Freeze; /* Freeze server during move/resize? */ ! Bool Grid; /* Should the m/r box contain a 9 seg. grid. */ ! Bool Hilite; /* Should we highlight window borders on focus? */ ! Bool NWindow; /* Normalize windows? */ ! Bool NIcon; /* Normalize icons? */ ! Bool Push; /* Relative=TRUE, Absolute=FALSE. */ ! Bool RootResizeBox; /* Resize window is placed over sized window? */ ! Bool Titles; /* Title bar frob on windows? */ ! Bool Reverse; /* Reverse video? */ ! Bool Zap; /* Should the the zap effect be used. */ ! Bool WarpOnRaise; /* Warp to upper right corner on raise. */ ! Bool WarpOnIconify; /* Warp to icon center on iconify. */ ! Bool WarpOnDeIconify; /* Warp to upper right corner on de-iconify. */ ! Bool FocusSetByUser; /* True if f.focus called */ char PText[7] = INIT_PTEXT; /* Pop-up window dummy text. */ int PTextSize = sizeof(PText); /* Pop-up window dummy text size. */ int Lineno = 1; /* Line count for parser. */ ! Bool Startup_File_Error = FALSE;/* Startup file error flag. */ char Startup_File[NAME_LEN] = "";/* Startup file name. */ char IFontName[NAME_LEN]; /* Icon font name. */ char PFontName[NAME_LEN]; /* Pop-up font name. */ --- 106,133 ---- GC DrawGC; /* graphics context for drawing */ Binding *Blist; /* Button/key binding list. */ ! Boolean Autoselect; /* Warp mouse to default menu selection? */ ! Boolean Autoraise; /* Raise window on input focus? */ ! Boolean Freeze; /* Freeze server during move/resize? */ ! Boolean Grid; /* Should the m/r box contain a 9 seg. grid. */ ! Boolean Hilite; /* Should we highlight window borders on focus? */ ! Boolean NWindow; /* Normalize windows? */ ! Boolean NIcon; /* Normalize icons? */ ! Boolean Push; /* Relative=TRUE, Absolute=FALSE. */ ! Boolean RootResizeBox; /* Resize window is placed over sized window? */ ! Boolean Titles; /* Title bar frob on windows? */ ! Boolean Reverse; /* Reverse video? */ ! Boolean Zap; /* Should the the zap effect be used. */ ! Boolean WarpOnRaise; /* Warp to upper right corner on raise. */ ! Boolean WarpOnIconify; /* Warp to icon center on iconify. */ ! Boolean WarpOnDeIconify; /* Warp to upper right corner on de-iconify. */ ! Boolean FocusSetByUser; /* True if f.focus called */ char PText[7] = INIT_PTEXT; /* Pop-up window dummy text. */ int PTextSize = sizeof(PText); /* Pop-up window dummy text size. */ int Lineno = 1; /* Line count for parser. */ ! Boolean Startup_File_Error = FALSE;/* Startup file error flag. */ char Startup_File[NAME_LEN] = "";/* Startup file name. */ char IFontName[NAME_LEN]; /* Icon font name. */ char PFontName[NAME_LEN]; /* Pop-up font name. */ *** uwm.new/gram.y.old Thu Dec 17 13:52:34 1987 --- uwm.new/gram.y Thu Dec 17 14:03:08 1987 *************** *** 60,67 **** static MenuLine *ml_ptr; /* Temporary menu line pointer. */ static char *hcolors[4]; /* Color values used in menu hdrs. */ static char *mcolors[2]; /* Color values used in menus. */ ! unsigned true = -1; /* hack */ ! unsigned int false = 0; /* ditto */ MenuLink *menu_link; /* Temporary menu link pointer. */ char *calloc(); --- 60,67 ---- static MenuLine *ml_ptr; /* Temporary menu line pointer. */ static char *hcolors[4]; /* Color values used in menu hdrs. */ static char *mcolors[2]; /* Color values used in menus. */ ! Boolean true = 1; /* hack */ ! Boolean false = 0; /* ditto */ MenuLink *menu_link; /* Temporary menu link pointer. */ char *calloc(); *************** *** 805,811 **** /* * Reset all previous bindings and free the space allocated to them. */ ! Bool ResetBindings() { Binding *ptr, *nextptr; --- 805,811 ---- /* * Reset all previous bindings and free the space allocated to them. */ ! Boolean ResetBindings() { Binding *ptr, *nextptr; *************** *** 820,826 **** /* * De-allocate all menus. */ ! Bool ResetMenus() { MenuLink *mptr, *next_mptr; register MenuLine *lptr, *next_lptr; --- 820,826 ---- /* * De-allocate all menus. */ ! Boolean ResetMenus() { MenuLink *mptr, *next_mptr; register MenuLine *lptr, *next_lptr; *************** *** 842,848 **** /* * Set all numeric variables to zero and all boolean variables to FALSE. */ ! Bool ResetVariables() { register int i; --- 842,848 ---- /* * Set all numeric variables to zero and all boolean variables to FALSE. */ ! Boolean ResetVariables() { register int i; *** uwm.new/uwm.c.old Wed Dec 16 13:55:21 1987 --- uwm.new/uwm.c Thu Dec 17 14:05:24 1987 *************** *** 66,73 **** ! Bool NeedRootInput=FALSE; ! Bool ChkMline(); char *sfilename; extern FILE *yyin; TitleData *dat; --- 66,73 ---- ! Boolean NeedRootInput=FALSE; ! Boolean ChkMline(); char *sfilename; extern FILE *yyin; TitleData *dat; *************** *** 90,98 **** int pop_width, pop_height; /* Pop up window width and height. */ int context; /* Root, window, or icon context. */ int ptrmask; /* for QueryPointer */ ! Bool func_stat; /* If true, function swallowed a ButtonUp. */ ! Bool delta_done; /* If true, then delta functions are done. */ ! Bool local; /* If true, then do not use system defaults. */ register Binding *bptr; /* Pointer to Bindings list. */ char *root_name; /* Root window name. */ char *display = NULL; /* Display name pointer. */ --- 90,98 ---- int pop_width, pop_height; /* Pop up window width and height. */ int context; /* Root, window, or icon context. */ int ptrmask; /* for QueryPointer */ ! Boolean func_stat; /* If true, function swallowed a ButtonUp. */ ! Boolean delta_done; /* If true, then delta functions are done. */ ! Boolean local; /* If true, then do not use system defaults. */ register Binding *bptr; /* Pointer to Bindings list. */ char *root_name; /* Root window name. */ char *display = NULL; /* Display name pointer. */ *************** *** 107,113 **** XImage grayimage; /* for gray background */ XGCValues xgc; /* to create font GCs */ char *malloc(); ! Bool fallbackMFont = False, /* using default GC font for menus, */ fallbackPFont = False, /* popups, */ fallbackIFont = False; /* icons */ --- 107,113 ---- XImage grayimage; /* for gray background */ XGCValues xgc; /* to create font GCs */ char *malloc(); ! Boolean fallbackMFont = False, /* using default GC font for menus, */ fallbackPFont = False, /* popups, */ fallbackIFont = False; /* icons */ *************** *** 499,505 **** #ifdef DEBUG prt_info(&button_event, dat); #endif ! if (dat->title == event_win) { Window root; int junk; /* --- 499,506 ---- #ifdef DEBUG prt_info(&button_event, dat); #endif ! if (dat->title == event_win || dat->title == ! button_event.xbutton.window) { Window root; int junk; /* *************** *** 519,524 **** --- 520,529 ---- else context = WINDOW; } + #ifdef DEBUG + fprintf(stderr, "Context set to: %x for button down\n", context); + fprintf(stderr, "Coords: (%d, %d)\n", down_x, down_y); + #endif /* * Get the button event detail. *************** *** 525,531 **** */ lo = ((XButtonPressedEvent *)&button_event)->button; hi = ((XButtonPressedEvent *)&button_event)->state; ! /* * Determine which function was selected and invoke it. */ --- 530,536 ---- */ lo = ((XButtonPressedEvent *)&button_event)->button; hi = ((XButtonPressedEvent *)&button_event)->state; ! /* * Determine which function was selected and invoke it. */ *************** *** 598,604 **** if (IsIcon(event_win, 0, 0, FALSE, NULL)) context = ICON; else if ((dat = GetTitleInfo(event_win)) != NULL) { ! if (dat->title == event_win) context = TITLE; else context = WINDOW; --- 603,610 ---- if (IsIcon(event_win, 0, 0, FALSE, NULL)) context = ICON; else if ((dat = GetTitleInfo(event_win)) != NULL) { ! if (dat->title == event_win || dat->title == ! button_event.xbutton.window) context = TITLE; else context = WINDOW; *************** *** 667,673 **** if (IsIcon(event_win, 0, 0, FALSE, NULL)) context = ICON; else if ((dat = GetTitleInfo(event_win)) != NULL) { ! if (dat->title == event_win) context = TITLE; else context = WINDOW; --- 673,680 ---- if (IsIcon(event_win, 0, 0, FALSE, NULL)) context = ICON; else if ((dat = GetTitleInfo(event_win)) != NULL) { ! if (dat->title == event_win || dat->title == ! button_event.xbutton.window) context = TITLE; else context = WINDOW; *************** *** 803,809 **** CheckMenus() { MenuLink *ptr; ! Bool errflag = FALSE; for(ptr = Menus; ptr; ptr = ptr->next) { if (ChkMline(ptr->menu)) --- 810,816 ---- CheckMenus() { MenuLink *ptr; ! Boolean errflag = FALSE; for(ptr = Menus; ptr; ptr = ptr->next) { if (ChkMline(ptr->menu)) *************** *** 813,824 **** Error("Nested menu inconsistency"); } ! Bool ChkMline(menu) MenuInfo *menu; { MenuLine *ptr; MenuLink *lptr; ! Bool errflag = FALSE; for(ptr = menu->line; ptr; ptr = ptr->next) { if (ptr->type == IsMenuFunction) { --- 820,831 ---- Error("Nested menu inconsistency"); } ! Boolean ChkMline(menu) MenuInfo *menu; { MenuLine *ptr; MenuLink *lptr; ! Boolean errflag = FALSE; for(ptr = menu->line; ptr; ptr = ptr->next) { if (ptr->type == IsMenuFunction) { *** uwm.new/uwm.h.old Thu Dec 17 13:56:30 1987 --- uwm.new/uwm.h Thu Dec 17 14:13:44 1987 *************** *** 102,107 **** --- 102,109 ---- unsigned int border_width; } TitleData; + typedef unsigned char Boolean; + /* * Keyword table entry. */ *************** *** 108,117 **** typedef struct _keyword { char *name; int type; ! Bool *bptr; int *nptr; char *sptr; ! Bool (*fptr)(); } Keyword; /* --- 110,119 ---- typedef struct _keyword { char *name; int type; ! Boolean *bptr; int *nptr; char *sptr; ! Boolean (*fptr)(); } Keyword; /* *************** *** 136,142 **** int context; int mask; int button; ! Bool (*func)(); char *menuname; struct _menuinfo *menu; } Binding; --- 138,144 ---- int context; int mask; int button; ! Boolean (*func)(); char *menuname; struct _menuinfo *menu; } Binding; *************** *** 217,223 **** Window w; /* Subwindow for this line. */ char *text; /* Text string to be acted upon. */ char *aux; /* Points to aux data if there is any */ ! Bool (*func)(); /* Window manager function to be invoked. */ struct _menuinfo *menu; /* Menu to be invoked. */ char *foreground; /* Name of foreground color. */ char *background; /* Name of background color. */ --- 219,225 ---- Window w; /* Subwindow for this line. */ char *text; /* Text string to be acted upon. */ char *aux; /* Points to aux data if there is any */ ! Boolean (*func)(); /* Window manager function to be invoked. */ struct _menuinfo *menu; /* Menu to be invoked. */ char *foreground; /* Name of foreground color. */ char *background; /* Name of background color. */ *************** *** 307,334 **** extern GC MenuInvGC; /* graphics context for menu background */ extern GC DrawGC; /* graphics context for zap */ ! extern Bool Autoraise; /* Raise window on input focus? */ ! extern Bool Autoselect; /* Warp mouse to default menu selection? */ ! extern Bool Freeze; /* Freeze server during move/resize? */ ! extern Bool Grid; /* Should the m/r box contain a 9 seg. grid. */ ! extern Bool Hilite; /* Should we highlight borders on focus? */ ! extern Bool NWindow; /* Normalize windows? */ ! extern Bool NIcon; /* Normalize icons? */ ! extern Bool RootResizeBox; /* Should resize box obscure window? */ ! extern Bool Push; /* Relative=TRUE, Absolute=FALSE. */ ! extern Bool Reverse; /* Reverse video? */ ! extern Bool Titles; /* Title bars on windows? */ ! extern Bool WarpOnRaise; /* Warp to upper right corner on raise. */ ! extern Bool WarpOnIconify; /* Warp to icon center on iconify. */ ! extern Bool WarpOnDeIconify; /* Warp to upper right corner on de-iconify. */ ! extern Bool Zap; /* Should the the zap effect be used. */ ! extern Bool FocusSetByUser; /* True if f.focus called */ extern char PText[]; /* Pop-up window dummy text. */ extern int PTextSize; /* Pop-up window dummy text size. */ extern int Lineno; /* Line count for parser. */ ! extern Bool Startup_File_Error; /* Startup file error flag. */ extern char Startup_File[]; /* Startup file name. */ extern char IFontName[]; /* Icon font name. */ extern char PFontName[]; /* Pop-up font name. */ --- 309,336 ---- extern GC MenuInvGC; /* graphics context for menu background */ extern GC DrawGC; /* graphics context for zap */ ! extern Boolean Autoraise; /* Raise window on input focus? */ ! extern Boolean Autoselect; /* Warp mouse to default menu selection? */ ! extern Boolean Freeze; /* Freeze server during move/resize? */ ! extern Boolean Grid; /* Should the m/r box contain a 9 seg. grid. */ ! extern Boolean Hilite; /* Should we highlight borders on focus? */ ! extern Boolean NWindow; /* Normalize windows? */ ! extern Boolean NIcon; /* Normalize icons? */ ! extern Boolean RootResizeBox; /* Should resize box obscure window? */ ! extern Boolean Push; /* Relative=TRUE, Absolute=FALSE. */ ! extern Boolean Reverse; /* Reverse video? */ ! extern Boolean Titles; /* Title bars on windows? */ ! extern Boolean WarpOnRaise; /* Warp to upper right corner on raise. */ ! extern Boolean WarpOnIconify; /* Warp to icon center on iconify. */ ! extern Boolean WarpOnDeIconify; /* Warp to upper right corner on de-iconify. */ ! extern Boolean Zap; /* Should the the zap effect be used. */ ! extern Boolean FocusSetByUser; /* True if f.focus called */ extern char PText[]; /* Pop-up window dummy text. */ extern int PTextSize; /* Pop-up window dummy text size. */ extern int Lineno; /* Line count for parser. */ ! extern Boolean Startup_File_Error; /* Startup file error flag. */ extern char Startup_File[]; /* Startup file name. */ extern char IFontName[]; /* Icon font name. */ extern char PFontName[]; /* Pop-up font name. */ *************** *** 355,389 **** /* * External routine typing. */ ! extern Bool Beep(); ! extern Bool CircleDown(); ! extern Bool CircleUp(); ! extern Bool Continue(); ! extern Bool Focus(); ! extern Bool GetButton(); ! extern Bool Iconify(); ! extern Bool Lower(); ! extern Bool Menu(); ! extern Bool Move(); ! extern Bool MoveOpaque(); ! extern Bool NewIconify(); ! extern Bool Pause(); ! extern Bool PushDown(); ! extern Bool PushLeft(); ! extern Bool PushRight(); ! extern Bool PushUp(); ! extern Bool Quit(); ! extern Bool Raise(); ! extern Bool Redraw(); ! extern Bool Refresh(); ! extern Bool ResetBindings(); ! extern Bool ResetMenus(); ! extern Bool ResetVariables(); ! extern Bool Resize(); ! extern Bool Restart(); ! extern int FDestroyTitle(); ! extern int FAddTitle(); ! extern int DestroyWindow(); extern int StoreCursors(); extern int StoreBox(); extern int StoreGridBox(); --- 357,391 ---- /* * External routine typing. */ ! extern Boolean Beep(); ! extern Boolean CircleDown(); ! extern Boolean CircleUp(); ! extern Boolean Continue(); ! extern Boolean Focus(); ! extern Boolean GetButton(); ! extern Boolean Iconify(); ! extern Boolean Lower(); ! extern Boolean Menu(); ! extern Boolean Move(); ! extern Boolean MoveOpaque(); ! extern Boolean NewIconify(); ! extern Boolean Pause(); ! extern Boolean PushDown(); ! extern Boolean PushLeft(); ! extern Boolean PushRight(); ! extern Boolean PushUp(); ! extern Boolean Quit(); ! extern Boolean Raise(); ! extern Boolean Redraw(); ! extern Boolean Refresh(); ! extern Boolean ResetBindings(); ! extern Boolean ResetMenus(); ! extern Boolean ResetVariables(); ! extern Boolean Resize(); ! extern Boolean Restart(); ! extern Boolean FDestroyTitle(); ! extern Boolean FAddTitle(); ! extern Boolean DestroyWindow(); extern int StoreCursors(); extern int StoreBox(); extern int StoreGridBox();