diff --git a/ChangeLog b/ChangeLog index 2523927..e4bd19b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,22 @@ 2021-01-31 Mike Small + * src/screen.h (struct ScreenInfo): Remove NoGrabServer member + + * src/gram.y: Remove ICON_REGION + + * src/menus.cc (ExecuteFunction): Remove nograbserver option + + * src/events.c (do_menu): ditto + + * src/system.twmruinedrc: ditto + + * src/deftwmrc.c: ditto + + * src/parse.c: ditto and remove IconRegion option. + + * man/twmruined.man: Remove nograbserver and IconRegion settings. + Describe simplified icon placement. + * src/util.h: move CreateMenuIcon prototype here * src/add_window.h: C++ compatibility (extern "C") @@ -10,6 +27,9 @@ * src/twm.h: ditto and move or remove some functions + * README: Mention nograbserver, IconRegion removal, and new + iconification behavior. + * src/twm.c (InitVariables): remove use of CaseSensitive variable * src/screen.h (ScreenInfo): remove CaseSensitive variable diff --git a/README b/README index b0d6bab..2736074 100644 --- a/README +++ b/README @@ -2,13 +2,16 @@ A twm fork to suit my preferences. Features removed... -1. iconmgr feature. -2. these configuration options: UsePPosition, SqueezeTitle, RandomPlacement, opaquemove, window highlight - DontIconifyByUnmapping, IconifyByUnmapping, TitlePadding, title button indent. +1. iconmgr feature and icon region (icons always land on the right edge). +2. these configuration options: UsePPosition, SqueezeTitle, RandomPlacement, + opaquemove, window highlight, DontIconifyByUnmapping, IconifyByUnmapping, + TitlePadding, title button indent, NoGrabServer (never grab), IconRegion. Changes ... - title is always squeezed and the resize button changed slightly (no box). +- icons always land on the right edge if there's space there. xconsole + lands on the bottom right. The master development code repository can be found at: diff --git a/man/twmruined.man b/man/twmruined.man index e598308..0e6b8fc 100644 --- a/man/twmruined.man +++ b/man/twmruined.man @@ -374,20 +374,6 @@ The optional \fIwin-list\fP is a list of window names and colors so that per-window colors may be specified. See the \fBBorderColor\fP variable for a complete description of the \fIwin-list\fP. The default is "black". -.IP "\fBIconRegion\fP \fIgeomstring\fP \fIvgrav hgrav gridwidth gridheight\fP" -This variable specifies an area on the root window in which icons are placed -if no specific icon location is provided by the client. The \fIgeomstring\fP -is a quoted string containing a standard geometry specification. -If more than one -\fBIconRegion\fP lines are given, -icons will be put into the succeeding icon regions when the first is full. -The \fIvgrav\fP argument should be either \fBNorth\fP or \fBSouth\fP and -control and is used to control whether icons are first filled in from the -top or bottom of the icon region. Similarly, the \fIhgrav\fP argument should -be either \fBEast\fP or \fBWest\fP and is used to control whether icons should -be filled in from left from the right. Icons are laid out within the region -in a grid with cells \fIgridwidth\fP pixels wide and \fIgridheight\fP pixels -high. .IP "\fBIcons\fP { \fIwin-list\fP }" 8 This variable specifies a list of window names and the bitmap filenames that should be used as their icons. For example: @@ -473,9 +459,6 @@ used with servers that can repaint faster than they can handle backing store. This variable indicates that \fItwm\fP should not supply the default titlebuttons and bindings. This option should only be used if the startup file contains a completely new set of bindings and definitions. -.IP "\fBNoGrabServer\fP" 8 -This variable indicates that \fItwmruined\fP should not grab the server -when popping up menus. .IP "\fBNoMenuShadows\fP" 8 This variable indicates that menus should not have drop shadows drawn behind them. This is typically used with slower servers since it speeds up menu @@ -942,16 +925,16 @@ cause the \fBWindowFunction\fP to be executed on that window. If \fBWindowFunction\fP hasn't been set, the window will be deiconified and raised. .SH ICONS -\fITwm\fP supports several different ways of manipulating iconified windows. -The common pixmap-and-text style may be laid out by hand or automatically -arranged as described by the \fBIconRegion\fP variable. +\fITwmruined\fP icons land on the right side of the screen starting at +the topmost unoccupied area. xconsole is special cased to land on the +bottom right. If no free areas remain the icon lands under the mouse +pointer. Icons can be moved by dragging with Button1 pressed and can +overlap. .PP .SH BUGS The resource manager should have been used instead of all of the window lists. .PP -The \fBIconRegion\fP variable should take a list. -.PP Double clicking very fast to get the constrained move function will sometimes cause the window to move, even though the pointer is not moved. .SH FILES @@ -970,8 +953,9 @@ This variable is used as the prefix for files that begin with a tilde and for locating the \fItwmruined\fP startup file. .SH "SEE ALSO" .PP -X(__miscmansuffix__), Xserver(__appmansuffix__), xdm(__appmansuffix__), xrdb(__appmansuffix__) +twm(__appmansuffix__), X(__miscmansuffix__), Xserver(__appmansuffix__), xdm(__appmansuffix__), xrdb(__appmansuffix__) .SH AUTHORS Tom LaStrange, Solbourne Computer; Jim Fulton, MIT X Consortium; Steve Pitschke, Stardent Computer; Keith Packard, MIT X Consortium; -Dave Sternlicht, MIT X Consortium; Dave Payne, Apple Computer. +Dave Sternlicht, MIT X Consortium; Dave Payne, Apple Computer; +Michael Small. diff --git a/src/deftwmrc.c b/src/deftwmrc.c index d70588e..52be1e4 100644 --- a/src/deftwmrc.c +++ b/src/deftwmrc.c @@ -5,7 +5,6 @@ unsigned char *defTwmrc[] = { (unsigned char *) "", - (unsigned char *) "NoGrabServer", (unsigned char *) "RestartPreviousState", (unsigned char *) "DecorateTransients", (unsigned char *) "TitleFont \"-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*\"", diff --git a/src/events.c b/src/events.c index 4ac05c8..1232350 100644 --- a/src/events.c +++ b/src/events.c @@ -1618,14 +1618,12 @@ HandleButtonRelease(void) * \param w invoking window, or None */ static void -do_menu (MenuRoot *menu, Window w) +do_menu(MenuRoot *menu, Window w) { int x = Event.xbutton.x_root; int y = Event.xbutton.y_root; Bool center; - if (!Scr->NoGrabServer) - XGrabServer(dpy); if (w) { int h = Scr->TBInfo.width - Scr->TBInfo.border; Window child; diff --git a/src/gram.c b/src/gram.c index 18a3b1d..33c26ae 100644 --- a/src/gram.c +++ b/src/gram.c @@ -159,7 +159,6 @@ extern int yydebug; GRAYSCALE = 279, NO_TITLE = 280, AUTO_RAISE = 281, - ICON_REGION = 282, META = 283, SHIFT = 284, LOCK = 285, @@ -221,7 +220,6 @@ extern int yydebug; #define GRAYSCALE 279 #define NO_TITLE 280 #define AUTO_RAISE 281 -#define ICON_REGION 282 #define META 283 #define SHIFT 284 #define LOCK 285 @@ -614,7 +612,7 @@ static const char *const yytname[] = "BUTTON", "DEFAULT_FUNCTION", "PLUS", "MINUS", "ALL", "OR", "CURSORS", "ICONS", "COLOR", "SAVECOLOR", "MONOCHROME", "FUNCTION", "WINDOW_FUNCTION", "ZOOM", "MAKE_TITLE", "GRAYSCALE", "NO_TITLE", - "AUTO_RAISE", "ICON_REGION", "META", "SHIFT", "LOCK", "CONTROL", + "AUTO_RAISE", "META", "SHIFT", "LOCK", "CONTROL", "WINDOW", "TITLE", "ICON", "ROOT", "FRAME", "COLON", "EQUALS", "START_ICONIFIED", "MOVE", "RESIZE", "WAIT", "SELECT", "KILL", "LEFT_TITLEBUTTON", "RIGHT_TITLEBUTTON", "NUMBER", "KEYWORD", "NKEYWORD", diff --git a/src/gram.h b/src/gram.h index 3c7b71d..94bb1ee 100644 --- a/src/gram.h +++ b/src/gram.h @@ -69,7 +69,6 @@ extern int yydebug; GRAYSCALE = 279, NO_TITLE = 280, AUTO_RAISE = 281, - ICON_REGION = 282, META = 283, SHIFT = 284, LOCK = 285, @@ -131,7 +130,6 @@ extern int yydebug; #define GRAYSCALE 279 #define NO_TITLE 280 #define AUTO_RAISE 281 -#define ICON_REGION 282 #define META 283 #define SHIFT 284 #define LOCK 285 diff --git a/src/gram.y b/src/gram.y index b1f060b..3a66402 100644 --- a/src/gram.y +++ b/src/gram.y @@ -112,7 +112,7 @@ static void yyerror ( const char *s ); %token ALL OR CURSORS ICONS COLOR SAVECOLOR MONOCHROME FUNCTION %token WINDOW_FUNCTION ZOOM %token MAKE_TITLE GRAYSCALE -%token NO_TITLE AUTO_RAISE ICON_REGION +%token NO_TITLE AUTO_RAISE %token META SHIFT LOCK CONTROL WINDOW TITLE ICON ROOT FRAME %token COLON EQUALS START_ICONIFIED %token MOVE RESIZE WAIT SELECT KILL LEFT_TITLEBUTTON RIGHT_TITLEBUTTON diff --git a/src/menus.cc b/src/menus.cc index 54a2082..b9ddb85 100644 --- a/src/menus.cc +++ b/src/menus.cc @@ -1863,10 +1863,6 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win, case F_EXEC: PopDownMenu(); - if (!Scr->NoGrabServer) { - XUngrabServer (dpy); - XSync (dpy, 0); - } Execute(action); break; diff --git a/src/parse.c b/src/parse.c index 3491f6c..77d722d 100644 --- a/src/parse.c +++ b/src/parse.c @@ -313,7 +313,6 @@ typedef struct _TwmKeyword { #define kw0_ForceIcons 3 #define kw0_InterpolateMenuColors 6 #define kw0_NoVersion 7 -#define kw0_NoGrabServer 9 #define kw0_NoMenuShadows 10 #define kw0_NoRaiseOnMove 11 #define kw0_NoRaiseOnResize 12 @@ -458,7 +457,6 @@ static TwmKeyword keytable[] = { { "icondirectory", SKEYWORD, kws_IconDirectory }, { "iconfont", SKEYWORD, kws_IconFont }, { "iconforeground", CLKEYWORD, kwcl_IconForeground }, - { "iconregion", ICON_REGION, 0 }, { "icons", ICONS, 0 }, { "interpolatemenucolors", KEYWORD, kw0_InterpolateMenuColors }, { "l", LOCK, 0 }, @@ -483,7 +481,6 @@ static TwmKeyword keytable[] = { { "movedelta", NKEYWORD, kwn_MoveDelta }, { "nobackingstore", KEYWORD, kw0_NoBackingStore }, { "nodefaults", KEYWORD, kw0_NoDefaults }, - { "nograbserver", KEYWORD, kw0_NoGrabServer }, { "nomenushadows", KEYWORD, kw0_NoMenuShadows }, { "noraiseondeiconify", KEYWORD, kw0_NoRaiseOnDeiconify }, { "noraiseonmove", KEYWORD, kw0_NoRaiseOnMove }, @@ -582,10 +579,6 @@ int do_single_keyword (int keyword) /* obsolete */ return 1; - case kw0_NoGrabServer: - Scr->NoGrabServer = TRUE; - return 1; - case kw0_NoMenuShadows: if (Scr->FirstTime) Scr->Shadow = FALSE; return 1; diff --git a/src/screen.h b/src/screen.h index 7aaeb57..7f2c90b 100644 --- a/src/screen.h +++ b/src/screen.h @@ -193,7 +193,6 @@ typedef struct ScreenInfo short FocusRoot; /* is the input focus on the root ? */ short WarpCursor; /* warp cursor on de-iconify ? */ short ForceIcon; /* force the icon to the user specified */ - short NoGrabServer; /* don't do server grabs */ short NoRaiseMove; /* don't raise window following move */ short NoRaiseResize; /* don't raise window following resize */ short NoRaiseDeicon; /* don't raise window on deiconify */ diff --git a/src/system.twmruinedrc b/src/system.twmruinedrc index 8c624bb..af279c9 100644 --- a/src/system.twmruinedrc +++ b/src/system.twmruinedrc @@ -8,7 +8,6 @@ # any windows and to use meta-keys. # -NoGrabServer RestartPreviousState DecorateTransients TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" diff --git a/src/twm.c b/src/twm.c index d315886..225265c 100644 --- a/src/twm.c +++ b/src/twm.c @@ -703,7 +703,6 @@ InitVariables(void) Scr->Focus = NULL; Scr->WarpCursor = FALSE; Scr->ForceIcon = FALSE; - Scr->NoGrabServer = FALSE; Scr->NoRaiseMove = FALSE; Scr->NoRaiseResize = FALSE; Scr->NoRaiseDeicon = FALSE;