diff options
author | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2015-07-07 15:33:19 -0500 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2016-11-17 13:15:44 +0000 |
commit | a8dc58771476f8b59647b3ba220bebf8aeb330d3 (patch) | |
tree | 3d168a552f94f238f557f02ff0a1230b58d5ab62 | |
parent | edf9e60fbe8079bfd71366b8358d5630170ecaba (diff) |
hw/xwin: support SKIPTASKBAR style in XWinrc
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-rw-r--r-- | hw/xwin/man/XWinrc.man | 12 | ||||
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 3 | ||||
-rw-r--r-- | hw/xwin/winprefs.h | 1 | ||||
-rw-r--r-- | hw/xwin/winprefslex.l | 1 | ||||
-rw-r--r-- | hw/xwin/winprefsyacc.y | 16 |
5 files changed, 30 insertions, 3 deletions
diff --git a/hw/xwin/man/XWinrc.man b/hw/xwin/man/XWinrc.man index 0f641e92f..60b8ce1ec 100644 --- a/hw/xwin/man/XWinrc.man +++ b/hw/xwin/man/XWinrc.man @@ -200,7 +200,7 @@ will be used. .SH Style Instructions .TP 8 .B STYLES { -\fIclass-or-name-of-window\fP \fIstyle-keyword-1\fP \fIstyle-keyword-2\fP +\fIclass-or-name-of-window\fP \fIstyle-keyword-1\fP \fIstyle-keyword-2\fP \fIstyle-keyword-3\fP .br \fI...\fP .br @@ -245,8 +245,14 @@ No Windows title bar and just a thin-line border, for the class or name. .br No Windows title bar or border, for the class or name. -One keyword in \fIstyle-keyword-1\fP can be used with one keyword in \fIstyle-keyword-2\fP, -or any keyword can be used singly. +\fIstyle-keyword-3\fP + +\fBSKIPTASKBAR\fP +.br +Omit the class or name from being listed in the Windows taskbar. + +Up to one keyword from each of these three groups can be used. Not all +groups need be used, and the keywords can be given in any order. .SH EXAMPLE diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index 16d13ff36..a86a0e590 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -2110,6 +2110,9 @@ winApplyHints(WMInfoPtr pWMInfo, xcb_window_t iWindow, HWND hWnd, HWND * zstyle, (hint & ~HINT_BORDER & ~HINT_CAPTION & ~HINT_SIZEBOX) | HINT_NOFRAME; + if (style & STYLE_SKIPTASKBAR) + hint |= HINT_SKIPTASKBAR; + /* Now apply styles to window */ style = GetWindowLongPtr(hWnd, GWL_STYLE); if (!style) diff --git a/hw/xwin/winprefs.h b/hw/xwin/winprefs.h index 4897089c6..36f3f4152 100644 --- a/hw/xwin/winprefs.h +++ b/hw/xwin/winprefs.h @@ -65,6 +65,7 @@ typedef enum MENUCOMMANDTYPE { #define STYLE_MAXIMIZE (1L<<4) /* Open a window maximized */ #define STYLE_MINIMIZE (1L<<5) /* Open a window minimized */ #define STYLE_BOTTOM (1L<<6) /* Open a window at the bottom of the Z order */ +#define STYLE_SKIPTASKBAR (1L<<7) /* Omit from taskbar */ /* Where to place a system menu */ typedef enum MENUPOSITION { diff --git a/hw/xwin/winprefslex.l b/hw/xwin/winprefslex.l index 472c85658..e7547729c 100644 --- a/hw/xwin/winprefslex.l +++ b/hw/xwin/winprefslex.l @@ -77,6 +77,7 @@ BOTTOM { return BOTTOM; } NOTITLE { return NOTITLE; } OUTLINE { return OUTLINE; } NOFRAME { return NOFRAME; } +SKIPTASKBAR { return SKIPTASKBAR; } ROOTMENU { return ROOTMENU; } DEFAULTSYSMENU { return DEFAULTSYSMENU; } SYSMENU { return SYSMENU; } diff --git a/hw/xwin/winprefsyacc.y b/hw/xwin/winprefsyacc.y index 361e05de0..e4e305a0f 100644 --- a/hw/xwin/winprefsyacc.y +++ b/hw/xwin/winprefsyacc.y @@ -117,6 +117,7 @@ extern int yylex(void); %token NOTITLE %token OUTLINE %token NOFRAME +%token SKIPTASKBAR %token DEFAULTSYSMENU %token SYSMENU %token ROOTMENU @@ -140,6 +141,7 @@ extern int yylex(void); %token <sVal> STRING %type <uVal> group1 %type <uVal> group2 +%type <uVal> group3 %type <uVal> stylecombo %type <iVal> atspot @@ -246,10 +248,24 @@ group2: NOTITLE { $$=STYLE_NOTITLE; } | NOFRAME { $$=STYLE_NOFRAME; } ; +group3: SKIPTASKBAR { $$=STYLE_SKIPTASKBAR; } + ; + stylecombo: group1 { $$=$1; } | group2 { $$=$1; } + | group3 { $$=$1; } | group1 group2 { $$=$1|$2; } + | group1 group3 { $$=$1|$2; } | group2 group1 { $$=$1|$2; } + | group2 group3 { $$=$1|$2; } + | group3 group1 { $$=$1|$2; } + | group3 group2 { $$=$1|$2; } + | group1 group2 group3 { $$=$1|$2|$3; } + | group1 group3 group2 { $$=$1|$2|$3; } + | group2 group1 group3 { $$=$1|$2|$3; } + | group2 group3 group1 { $$=$1|$2|$3; } + | group3 group1 group2 { $$=$1|$2|$3; } + | group3 group2 group1 { $$=$1|$2|$3; } ; styleline: STRING stylecombo NEWLINE newline_or_nada { AddStyleLine($1, $2); free($1); } |