Remove NoGrabServer and IconRegion options

Update documentation, including new simplified icon placement.
This commit is contained in:
Mike Small 2021-01-31 22:47:18 -05:00
parent 893bdb5928
commit 21dcde5dd6
13 changed files with 37 additions and 51 deletions

View File

@ -1,5 +1,22 @@
2021-01-31 Mike Small <smallm@sdf.org>
* 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

9
README
View File

@ -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:

View File

@ -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.

View File

@ -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-*-*-*-*-*-*\"",

View File

@ -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;

View File

@ -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",

View File

@ -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

View File

@ -112,7 +112,7 @@ static void yyerror ( const char *s );
%token <num> ALL OR CURSORS ICONS COLOR SAVECOLOR MONOCHROME FUNCTION
%token <num> WINDOW_FUNCTION ZOOM
%token <num> MAKE_TITLE GRAYSCALE
%token <num> NO_TITLE AUTO_RAISE ICON_REGION
%token <num> NO_TITLE AUTO_RAISE
%token <num> META SHIFT LOCK CONTROL WINDOW TITLE ICON ROOT FRAME
%token <num> COLON EQUALS START_ICONIFIED
%token <num> MOVE RESIZE WAIT SELECT KILL LEFT_TITLEBUTTON RIGHT_TITLEBUTTON

View File

@ -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;

View File

@ -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;

View File

@ -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 */

View File

@ -8,7 +8,6 @@
# any windows and to use meta-keys.
#
NoGrabServer
RestartPreviousState
DecorateTransients
TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"

View File

@ -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;