Remove DontIconifyByUnmapping and IconifyByUnmapping options.

This commit is contained in:
Mike Small 2018-02-11 19:57:36 -05:00
parent fd61bea39c
commit c042bc37ee
10 changed files with 646 additions and 757 deletions

View File

@ -361,10 +361,6 @@ information windows. The default is "white".
.IP "\fBDefaultForeground\fP \fIstring\fP" 8 .IP "\fBDefaultForeground\fP \fIstring\fP" 8
This variable specifies the foreground color to be used for sizing and This variable specifies the foreground color to be used for sizing and
information windows. The default is "black". information windows. The default is "black".
.IP "\fBDontIconifyByUnmapping\fP { \fIwin-list\fP }" 8
This variable specifies a list of windows that should not be iconified by
simply unmapping the window (as would be the case if \fBIconifyByUnmapping\fP
had been set).
.IP "\fBDontMoveOff\fP" 8 .IP "\fBDontMoveOff\fP" 8
This variable indicates that windows should not be allowed to be moved off the This variable indicates that windows should not be allowed to be moved off the
screen. It can be overridden by the \fBf.forcemove\fP function. screen. It can be overridden by the \fBf.forcemove\fP function.
@ -414,15 +410,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 per-window colors may be specified. See the \fBBorderColor\fP
variable for a complete description of the \fIwin-list\fP. variable for a complete description of the \fIwin-list\fP.
The default is "black". The default is "black".
.IP "\fBIconifyByUnmapping [{ \fIwin-list\fP }]\fP" 8
This variable indicates that windows should be iconified by being unmapped
without trying to map any icons. This assumes that the user will
remap the window through the \fBf.warpto\fP function, or
the \fITwmWindows\fP menu.
If the optional \fIwin-list\fP is provided, only those windows will be
iconified by simply unmapping. Windows that have this
option set may not be accessible if no binding
to the \fITwmWindows\fP menu is set in the user's startup file.
.IP "\fBIconRegion\fP \fIgeomstring\fP \fIvgrav hgrav gridwidth gridheight\fP" .IP "\fBIconRegion\fP \fIgeomstring\fP \fIvgrav hgrav gridwidth gridheight\fP"
This variable specifies an area on the root window in which icons are placed 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 if no specific icon location is provided by the client. The \fIgeomstring\fP
@ -447,8 +434,7 @@ should be used as their icons. For example:
"xfd" "xfd_icon" "xfd" "xfd_icon"
} }
.EE .EE
Windows that match ``XTerm'' and would not be iconified by unmapping, and Windows that match ``XTerm'' would try to use
would try to use
the icon bitmap in the file ``xterm.icon''. If \fBForceIcons\fP is the icon bitmap in the file ``xterm.icon''. If \fBForceIcons\fP is
specified, this bitmap will be used even if the client has requested its specified, this bitmap will be used even if the client has requested its
own icon pixmap. own icon pixmap.
@ -1121,10 +1107,6 @@ The \fBIconRegion\fP variable should take a list.
.PP .PP
Double clicking very fast to get the constrained move function will sometimes Double clicking very fast to get the constrained move function will sometimes
cause the window to move, even though the pointer is not moved. cause the window to move, even though the pointer is not moved.
.PP
If \fBIconifyByUnmapping\fP is on and windows are not listed in
\fBDontIconifyByUnmapping\fP, they may be lost if they are iconified and
no bindings to \fBf.menu "TwmWindows"\fP or \fBf.warpto\fP are setup.
.SH FILES .SH FILES
.PP .PP
.nf .nf

View File

@ -288,16 +288,6 @@ AddWindow(Window w)
tmp_win->full_name, tmp_win->full_name,
&tmp_win->class); &tmp_win->class);
if (tmp_win->auto_raise) Scr->NumAutoRaises++; if (tmp_win->auto_raise) Scr->NumAutoRaises++;
tmp_win->iconify_by_unmapping = Scr->IconifyByUnmapping;
if (Scr->IconifyByUnmapping)
{
tmp_win->iconify_by_unmapping =
!(short)(long) LookInList(Scr->DontIconify, tmp_win->full_name,
&tmp_win->class);
}
tmp_win->iconify_by_unmapping |=
(short)(long) LookInList(Scr->IconifyByUn, tmp_win->full_name,
&tmp_win->class);
if (LookInList(Scr->WindowRingL, tmp_win->full_name, &tmp_win->class)) { if (LookInList(Scr->WindowRingL, tmp_win->full_name, &tmp_win->class)) {
if (Scr->Ring) { if (Scr->Ring) {

1232
src/gram.c

File diff suppressed because it is too large Load Diff

View File

@ -21,50 +21,48 @@
#define ZOOM 277 #define ZOOM 277
#define MAKE_TITLE 278 #define MAKE_TITLE 278
#define GRAYSCALE 279 #define GRAYSCALE 279
#define ICONIFY_BY_UNMAPPING 280 #define NO_TITLE 280
#define DONT_ICONIFY_BY_UNMAPPING 281 #define AUTO_RAISE 281
#define NO_TITLE 282 #define NO_HILITE 282
#define AUTO_RAISE 283 #define ICON_REGION 283
#define NO_HILITE 284 #define META 284
#define ICON_REGION 285 #define SHIFT 285
#define META 286 #define LOCK 286
#define SHIFT 287 #define CONTROL 287
#define LOCK 288 #define WINDOW 288
#define CONTROL 289 #define TITLE 289
#define WINDOW 290 #define ICON 290
#define TITLE 291 #define ROOT 291
#define ICON 292 #define FRAME 292
#define ROOT 293 #define COLON 293
#define FRAME 294 #define EQUALS 294
#define COLON 295 #define SQUEEZE_TITLE 295
#define EQUALS 296 #define DONT_SQUEEZE_TITLE 296
#define SQUEEZE_TITLE 297 #define START_ICONIFIED 297
#define DONT_SQUEEZE_TITLE 298 #define NO_TITLE_HILITE 298
#define START_ICONIFIED 299 #define TITLE_HILITE 299
#define NO_TITLE_HILITE 300 #define MOVE 300
#define TITLE_HILITE 301 #define RESIZE 301
#define MOVE 302 #define WAIT 302
#define RESIZE 303 #define SELECT 303
#define WAIT 304 #define KILL 304
#define SELECT 305 #define LEFT_TITLEBUTTON 305
#define KILL 306 #define RIGHT_TITLEBUTTON 306
#define LEFT_TITLEBUTTON 307 #define NUMBER 307
#define RIGHT_TITLEBUTTON 308 #define KEYWORD 308
#define NUMBER 309 #define NKEYWORD 309
#define KEYWORD 310 #define CKEYWORD 310
#define NKEYWORD 311 #define CLKEYWORD 311
#define CKEYWORD 312 #define FKEYWORD 312
#define CLKEYWORD 313 #define FSKEYWORD 313
#define FKEYWORD 314 #define SKEYWORD 314
#define FSKEYWORD 315 #define DKEYWORD 315
#define SKEYWORD 316 #define JKEYWORD 316
#define DKEYWORD 317 #define WINDOW_RING 317
#define JKEYWORD 318 #define WARP_CURSOR 318
#define WINDOW_RING 319 #define ERRORTOKEN 319
#define WARP_CURSOR 320 #define NO_STACKMODE 320
#define ERRORTOKEN 321 #define STRING 321
#define NO_STACKMODE 322
#define STRING 323
#ifndef YYSTYPE_DEFINED #ifndef YYSTYPE_DEFINED
#define YYSTYPE_DEFINED #define YYSTYPE_DEFINED
typedef union typedef union

View File

@ -113,7 +113,6 @@ static void yyerror ( const char *s );
%token <num> ALL OR CURSORS PIXMAPS ICONS COLOR SAVECOLOR MONOCHROME FUNCTION %token <num> ALL OR CURSORS PIXMAPS ICONS COLOR SAVECOLOR MONOCHROME FUNCTION
%token <num> WINDOW_FUNCTION ZOOM %token <num> WINDOW_FUNCTION ZOOM
%token <num> MAKE_TITLE GRAYSCALE %token <num> MAKE_TITLE GRAYSCALE
%token <num> ICONIFY_BY_UNMAPPING DONT_ICONIFY_BY_UNMAPPING
%token <num> NO_TITLE AUTO_RAISE NO_HILITE ICON_REGION %token <num> NO_TITLE AUTO_RAISE NO_HILITE ICON_REGION
%token <num> META SHIFT LOCK CONTROL WINDOW TITLE ICON ROOT FRAME %token <num> META SHIFT LOCK CONTROL WINDOW TITLE ICON ROOT FRAME
%token <num> COLON EQUALS SQUEEZE_TITLE DONT_SQUEEZE_TITLE %token <num> COLON EQUALS SQUEEZE_TITLE DONT_SQUEEZE_TITLE
@ -157,10 +156,6 @@ stmt : error
Scr->DoZoom = TRUE; } Scr->DoZoom = TRUE; }
| PIXMAPS pixmap_list {} | PIXMAPS pixmap_list {}
| CURSORS cursor_list {} | CURSORS cursor_list {}
| ICONIFY_BY_UNMAPPING { list = &Scr->IconifyByUn; }
win_list
| ICONIFY_BY_UNMAPPING { if (Scr->FirstTime)
Scr->IconifyByUnmapping = TRUE; }
| LEFT_TITLEBUTTON string EQUALS action { | LEFT_TITLEBUTTON string EQUALS action {
GotTitleButton ($2, $4, False); GotTitleButton ($2, $4, False);
} }
@ -189,8 +184,6 @@ stmt : error
} }
| string fullkey { GotKey($1, $2); } | string fullkey { GotKey($1, $2); }
| button full { GotButton($1, $2); } | button full { GotButton($1, $2); }
| DONT_ICONIFY_BY_UNMAPPING { list = &Scr->DontIconify; }
win_list
| NO_TITLE_HILITE { list = &Scr->NoTitleHighlight; } | NO_TITLE_HILITE { list = &Scr->NoTitleHighlight; }
win_list win_list
| NO_TITLE_HILITE { if (Scr->FirstTime) | NO_TITLE_HILITE { if (Scr->FirstTime)

View File

@ -2375,19 +2375,14 @@ void
Iconify(TwmWindow *tmp_win, int def_x, int def_y) Iconify(TwmWindow *tmp_win, int def_x, int def_y)
{ {
TwmWindow *t; TwmWindow *t;
int iconify;
XWindowAttributes winattrs; XWindowAttributes winattrs;
unsigned long eventMask; unsigned long eventMask;
iconify = ((!tmp_win->iconify_by_unmapping) || tmp_win->transient); if (tmp_win->icon_w == (Window) 0)
if (iconify) CreateIconWindow(tmp_win, def_x, def_y);
{ else
if (tmp_win->icon_w == (Window) 0) IconUp(tmp_win);
CreateIconWindow(tmp_win, def_x, def_y); XMapRaised(dpy, tmp_win->icon_w);
else
IconUp(tmp_win);
XMapRaised(dpy, tmp_win->icon_w);
}
XGetWindowAttributes(dpy, tmp_win->w, &winattrs); XGetWindowAttributes(dpy, tmp_win->w, &winattrs);
eventMask = winattrs.your_event_mask; eventMask = winattrs.your_event_mask;
@ -2397,13 +2392,10 @@ Iconify(TwmWindow *tmp_win, int def_x, int def_y)
{ {
if (t->transient && t->transientfor == tmp_win->w) if (t->transient && t->transientfor == tmp_win->w)
{ {
if (iconify) if (t->icon_on)
{ Zoom(t->icon_w, tmp_win->icon_w);
if (t->icon_on) else
Zoom(t->icon_w, tmp_win->icon_w); Zoom(t->frame, tmp_win->icon_w);
else
Zoom(t->frame, tmp_win->icon_w);
}
/* /*
* Prevent the receipt of an UnmapNotify, since that would * Prevent the receipt of an UnmapNotify, since that would
@ -2429,8 +2421,7 @@ Iconify(TwmWindow *tmp_win, int def_x, int def_y)
} }
} }
if (iconify) Zoom(tmp_win->frame, tmp_win->icon_w);
Zoom(tmp_win->frame, tmp_win->icon_w);
/* /*
* Prevent the receipt of an UnmapNotify, since that would * Prevent the receipt of an UnmapNotify, since that would
@ -2451,10 +2442,7 @@ Iconify(TwmWindow *tmp_win, int def_x, int def_y)
Scr->FocusRoot = TRUE; Scr->FocusRoot = TRUE;
} }
tmp_win->icon = TRUE; tmp_win->icon = TRUE;
if (iconify) tmp_win->icon_on = TRUE;
tmp_win->icon_on = TRUE;
else
tmp_win->icon_on = FALSE;
XSync (dpy, 0); XSync (dpy, 0);
} }
@ -2539,8 +2527,7 @@ SetMapStateProp(TwmWindow *tmp_win, int state)
unsigned long data[2]; /* "suggested" by ICCCM version 1 */ unsigned long data[2]; /* "suggested" by ICCCM version 1 */
data[0] = (unsigned long) state; data[0] = (unsigned long) state;
data[1] = (unsigned long) (tmp_win->iconify_by_unmapping ? None : data[1] = (unsigned long) tmp_win->icon_w;
tmp_win->icon_w);
XChangeProperty (dpy, tmp_win->w, _XA_WM_STATE, _XA_WM_STATE, 32, XChangeProperty (dpy, tmp_win->w, _XA_WM_STATE, _XA_WM_STATE, 32,
PropModeReplace, (unsigned char *) data, 2); PropModeReplace, (unsigned char *) data, 2);

View File

@ -400,7 +400,6 @@ static TwmKeyword keytable[] = {
{ "defaultforeground", CKEYWORD, kwc_DefaultForeground }, { "defaultforeground", CKEYWORD, kwc_DefaultForeground },
{ "defaultfunction", DEFAULT_FUNCTION, 0 }, { "defaultfunction", DEFAULT_FUNCTION, 0 },
{ "destroy", KILL, 0 }, { "destroy", KILL, 0 },
{ "donticonifybyunmapping", DONT_ICONIFY_BY_UNMAPPING, 0 },
{ "dontmoveoff", KEYWORD, kw0_DontMoveOff }, { "dontmoveoff", KEYWORD, kw0_DontMoveOff },
{ "dontsqueezetitle", DONT_SQUEEZE_TITLE, 0 }, { "dontsqueezetitle", DONT_SQUEEZE_TITLE, 0 },
{ "east", DKEYWORD, D_EAST }, { "east", DKEYWORD, D_EAST },
@ -473,7 +472,6 @@ static TwmKeyword keytable[] = {
{ "icondirectory", SKEYWORD, kws_IconDirectory }, { "icondirectory", SKEYWORD, kws_IconDirectory },
{ "iconfont", SKEYWORD, kws_IconFont }, { "iconfont", SKEYWORD, kws_IconFont },
{ "iconforeground", CLKEYWORD, kwcl_IconForeground }, { "iconforeground", CLKEYWORD, kwcl_IconForeground },
{ "iconifybyunmapping", ICONIFY_BY_UNMAPPING, 0 },
{ "iconregion", ICON_REGION, 0 }, { "iconregion", ICON_REGION, 0 },
{ "icons", ICONS, 0 }, { "icons", ICONS, 0 },
{ "interpolatemenucolors", KEYWORD, kw0_InterpolateMenuColors }, { "interpolatemenucolors", KEYWORD, kw0_InterpolateMenuColors },

View File

@ -161,8 +161,6 @@ typedef struct ScreenInfo
name_list *NoHighlight; /* list of windows to not highlight */ name_list *NoHighlight; /* list of windows to not highlight */
name_list *NoStackModeL; /* windows to ignore stack mode requests */ name_list *NoStackModeL; /* windows to ignore stack mode requests */
name_list *NoTitleHighlight;/* list of windows to not highlight the TB*/ name_list *NoTitleHighlight;/* list of windows to not highlight the TB*/
name_list *DontIconify; /* don't iconify by unmapping */
name_list *IconifyByUn; /* windows to iconify by unmapping */
name_list *StartIconified; /* windows to start iconic */ name_list *StartIconified; /* windows to start iconic */
name_list *SqueezeTitleL; /* windows of which to squeeze title */ name_list *SqueezeTitleL; /* windows of which to squeeze title */
name_list *DontSqueezeTitleL; /* windows of which not to squeeze */ name_list *DontSqueezeTitleL; /* windows of which not to squeeze */
@ -214,7 +212,6 @@ typedef struct ScreenInfo
short TitleFocus; /* focus on window in title bar ? */ short TitleFocus; /* focus on window in title bar ? */
short NoTitlebar; /* put title bars on windows */ short NoTitlebar; /* put title bars on windows */
short DecorateTransients; /* put title bars on transients */ short DecorateTransients; /* put title bars on transients */
short IconifyByUnmapping; /* simply unmap windows when iconifying */
short BackingStore; /* use backing store for menus */ short BackingStore; /* use backing store for menus */
short SaveUnder; /* use save under's for menus */ short SaveUnder; /* use save under's for menus */
short RandomPlacement; /* randomly place windows that no give hints */ short RandomPlacement; /* randomly place windows that no give hints */

View File

@ -447,8 +447,6 @@ main(int argc, char *argv[])
Scr->NoHighlight = NULL; Scr->NoHighlight = NULL;
Scr->NoStackModeL = NULL; Scr->NoStackModeL = NULL;
Scr->NoTitleHighlight = NULL; Scr->NoTitleHighlight = NULL;
Scr->DontIconify = NULL;
Scr->IconifyByUn = NULL;
Scr->StartIconified = NULL; Scr->StartIconified = NULL;
Scr->SqueezeTitleL = NULL; Scr->SqueezeTitleL = NULL;
Scr->DontSqueezeTitleL = NULL; Scr->DontSqueezeTitleL = NULL;
@ -661,8 +659,6 @@ InitVariables(void)
FreeList(&Scr->NoHighlight); FreeList(&Scr->NoHighlight);
FreeList(&Scr->NoStackModeL); FreeList(&Scr->NoStackModeL);
FreeList(&Scr->NoTitleHighlight); FreeList(&Scr->NoTitleHighlight);
FreeList(&Scr->DontIconify);
FreeList(&Scr->IconifyByUn);
FreeList(&Scr->StartIconified); FreeList(&Scr->StartIconified);
FreeList(&Scr->SqueezeTitleL); FreeList(&Scr->SqueezeTitleL);
FreeList(&Scr->DontSqueezeTitleL); FreeList(&Scr->DontSqueezeTitleL);
@ -732,7 +728,6 @@ InitVariables(void)
Scr->TitleFocus = TRUE; Scr->TitleFocus = TRUE;
Scr->NoTitlebar = FALSE; Scr->NoTitlebar = FALSE;
Scr->DecorateTransients = FALSE; Scr->DecorateTransients = FALSE;
Scr->IconifyByUnmapping = FALSE;
Scr->BackingStore = TRUE; Scr->BackingStore = TRUE;
Scr->SaveUnder = TRUE; Scr->SaveUnder = TRUE;
Scr->RandomPlacement = FALSE; Scr->RandomPlacement = FALSE;

View File

@ -272,7 +272,6 @@ typedef struct TwmWindow
short icon_moved; /* user explicitly moved the icon */ short icon_moved; /* user explicitly moved the icon */
short highlight; /* should highlight this window */ short highlight; /* should highlight this window */
short stackmode; /* honor stackmode requests */ short stackmode; /* honor stackmode requests */
short iconify_by_unmapping; /* unmap window to iconify it */
short transient; /* this is a transient window */ short transient; /* this is a transient window */
Window transientfor; /* window contained in XA_XM_TRANSIENT_FOR */ Window transientfor; /* window contained in XA_XM_TRANSIENT_FOR */
short titlehighlight; /* should I highlight the title bar */ short titlehighlight; /* should I highlight the title bar */