aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-05 09:33:39 +0100
committermarha <marha@users.sourceforge.net>2014-03-05 09:33:39 +0100
commit8badbdef38ce843dc443ddee219eda4040ef2cd5 (patch)
treee44061aeab2425b199c89ec54b5caa909228492c /xorg-server/hw/xwin
parent45392e4a0642880b569ea5d4a350cdc395a2c7db (diff)
downloadvcxsrv-8badbdef38ce843dc443ddee219eda4040ef2cd5.tar.gz
vcxsrv-8badbdef38ce843dc443ddee219eda4040ef2cd5.tar.bz2
vcxsrv-8badbdef38ce843dc443ddee219eda4040ef2cd5.zip
Now taskbar with notab can be specified in system.XWinrc
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r--xorg-server/hw/xwin/InitOutput.c2
-rw-r--r--xorg-server/hw/xwin/winnativegdi.c2
-rw-r--r--xorg-server/hw/xwin/winpfbdd.c2
-rw-r--r--xorg-server/hw/xwin/winprefs.h3
-rw-r--r--xorg-server/hw/xwin/winprefslex.l2
-rw-r--r--xorg-server/hw/xwin/winprefsyacc.y22
-rw-r--r--xorg-server/hw/xwin/winshaddd.c3
-rw-r--r--xorg-server/hw/xwin/winshadddnl.c3
-rw-r--r--xorg-server/hw/xwin/winshadgdi.c3
-rw-r--r--xorg-server/hw/xwin/winwndproc.c2
10 files changed, 37 insertions, 7 deletions
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index 91242259f..7a4f8446d 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -216,7 +216,7 @@ ddxGiveUp(enum ExitCode error)
/* Perform per-screen deinitialization */
for (i = 0; i < g_iNumScreens; ++i) {
/* Delete the tray icon */
- if (!g_ScreenInfo[i].fNoTrayIcon && g_ScreenInfo[i].pScreen)
+ if (!g_ScreenInfo[i].fNoTrayIcon && g_ScreenInfo[i].pScreen && !pref.fNoTrayIcon)
winDeleteNotifyIcon(winGetScreenPriv(g_ScreenInfo[i].pScreen));
}
diff --git a/xorg-server/hw/xwin/winnativegdi.c b/xorg-server/hw/xwin/winnativegdi.c
index e0916bb8a..60d714dc7 100644
--- a/xorg-server/hw/xwin/winnativegdi.c
+++ b/xorg-server/hw/xwin/winnativegdi.c
@@ -126,7 +126,7 @@ winCloseScreenNativeGDI(ScreenPtr pScreen)
winDebug ("winCloseScreenNativeGDI - Destroying window\n");
/* Delete tray icon, if we have one */
- if (!pScreenInfo->fNoTrayIcon)
+ if (!pScreenInfo->fNoTrayIcon && !pref.fNoTrayIcon)
winDeleteNotifyIcon(pScreenPriv);
/* Free the exit confirmation dialog box, if it exists */
diff --git a/xorg-server/hw/xwin/winpfbdd.c b/xorg-server/hw/xwin/winpfbdd.c
index 976eba9ad..b5a69cad8 100644
--- a/xorg-server/hw/xwin/winpfbdd.c
+++ b/xorg-server/hw/xwin/winpfbdd.c
@@ -287,7 +287,7 @@ winCloseScreenPrimaryDD(ScreenPtr pScreen)
winFreeFBPrimaryDD(pScreen);
/* Delete tray icon, if we have one */
- if (!pScreenInfo->fNoTrayIcon)
+ if (!pScreenInfo->fNoTrayIcon && !pref.fNoTrayIcon)
winDeleteNotifyIcon(pScreenPriv);
/* Free the exit confirmation dialog box, if it exists */
diff --git a/xorg-server/hw/xwin/winprefs.h b/xorg-server/hw/xwin/winprefs.h
index 8f4eb0807..892662777 100644
--- a/xorg-server/hw/xwin/winprefs.h
+++ b/xorg-server/hw/xwin/winprefs.h
@@ -140,6 +140,9 @@ typedef struct WINPREFS {
/* Silent exit flag */
Bool fSilentExit;
+ /* No tray icon flag */
+ Bool fNoTrayIcon;
+
} WINPREFS;
/* The global pref settings structure loaded by the winprefyacc.y parser */
diff --git a/xorg-server/hw/xwin/winprefslex.l b/xorg-server/hw/xwin/winprefslex.l
index ff4459fda..0163fb2ee 100644
--- a/xorg-server/hw/xwin/winprefslex.l
+++ b/xorg-server/hw/xwin/winprefslex.l
@@ -70,6 +70,8 @@ ICONDIRECTORY { return ICONDIRECTORY; }
DEFAULTICON { return DEFAULTICON; }
ICONS { return ICONS; }
STYLES { return STYLES; }
+TASKBAR { return TASKBAR; }
+NOTAB { return NOTAB; }
TOPMOST { return TOPMOST; }
MAXIMIZE { return MAXIMIZE; }
MINIMIZE { return MINIMIZE; }
diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y
index 73fb5d56e..38bb510a8 100644
--- a/xorg-server/hw/xwin/winprefsyacc.y
+++ b/xorg-server/hw/xwin/winprefsyacc.y
@@ -76,6 +76,8 @@ static void OpenStyles(void);
static void AddStyleLine(char *matchstr, unsigned long style);
static void CloseStyles(void);
+static void SetNoTrayIcon(void);
+
static void OpenSysMenu(void);
static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
static void CloseSysMenu(void);
@@ -104,6 +106,8 @@ extern int yylex(void);
%token DEFAULTICON
%token ICONS
%token STYLES
+%token TASKBAR
+%token NOTAB
%token TOPMOST
%token MAXIMIZE
%token MINIMIZE
@@ -151,6 +155,7 @@ command: defaulticon
| menu
| icons
| styles
+ | taskbar
| sysmenu
| rootmenu
| defaultsysmenu
@@ -226,6 +231,16 @@ stylelist: styleline
styles: STYLES LB {OpenStyles();} newline_or_nada stylelist RB {CloseStyles();}
;
+taskbarline: STRING NOTAB NEWLINE newline_or_nada { SetNoTrayIcon(); free($1); }
+ ;
+
+taskbarlist: taskbarline
+ | taskbarline taskbarlist
+ ;
+
+taskbar: TASKBAR LB newline_or_nada taskbarlist RB
+ ;
+
atspot: { $$=AT_END; }
| ATSTART { $$=AT_START; }
| ATEND { $$=AT_END; }
@@ -420,6 +435,13 @@ CloseStyles (void)
}
static void
+SetNoTrayIcon (void)
+{
+ pref.fNoTrayIcon=TRUE;
+}
+
+
+static void
OpenSysMenu (void)
{
if (pref.sysMenu != NULL) {
diff --git a/xorg-server/hw/xwin/winshaddd.c b/xorg-server/hw/xwin/winshaddd.c
index 59415515f..194449e63 100644
--- a/xorg-server/hw/xwin/winshaddd.c
+++ b/xorg-server/hw/xwin/winshaddd.c
@@ -35,6 +35,7 @@
#include <xwin-config.h>
#endif
#include "win.h"
+#include "winprefs.h"
/*
* Local prototypes
@@ -631,7 +632,7 @@ winCloseScreenShadowDD(ScreenPtr pScreen)
RemoveProp(pScreenPriv->hwndScreen, WIN_SCR_PROP);
/* Delete tray icon, if we have one */
- if (!pScreenInfo->fNoTrayIcon)
+ if (!pScreenInfo->fNoTrayIcon && !pref.fNoTrayIcon)
winDeleteNotifyIcon(pScreenPriv);
/* Free the exit confirmation dialog box, if it exists */
diff --git a/xorg-server/hw/xwin/winshadddnl.c b/xorg-server/hw/xwin/winshadddnl.c
index 1ac1af06b..047482e09 100644
--- a/xorg-server/hw/xwin/winshadddnl.c
+++ b/xorg-server/hw/xwin/winshadddnl.c
@@ -35,6 +35,7 @@
#include <xwin-config.h>
#endif
#include "win.h"
+#include "winprefs.h"
#define FAIL_MSG_MAX_BLT 10
@@ -722,7 +723,7 @@ winCloseScreenShadowDDNL(ScreenPtr pScreen)
RemoveProp(pScreenPriv->hwndScreen, WIN_SCR_PROP);
/* Delete tray icon, if we have one */
- if (!pScreenInfo->fNoTrayIcon)
+ if (!pScreenInfo->fNoTrayIcon && !pref.fNoTrayIcon)
winDeleteNotifyIcon(pScreenPriv);
/* Free the exit confirmation dialog box, if it exists */
diff --git a/xorg-server/hw/xwin/winshadgdi.c b/xorg-server/hw/xwin/winshadgdi.c
index 7d41369db..f04d2562b 100644
--- a/xorg-server/hw/xwin/winshadgdi.c
+++ b/xorg-server/hw/xwin/winshadgdi.c
@@ -32,6 +32,7 @@
#include <xwin-config.h>
#endif
#include "win.h"
+#include "winprefs.h"
/*
* Local function prototypes
@@ -587,7 +588,7 @@ winCloseScreenShadowGDI(ScreenPtr pScreen)
ReleaseDC(pScreenPriv->hwndScreen, pScreenPriv->hdcScreen);
/* Delete tray icon, if we have one */
- if (!pScreenInfo->fNoTrayIcon)
+ if (!pScreenInfo->fNoTrayIcon && !pref.fNoTrayIcon)
winDeleteNotifyIcon(pScreenPriv);
/* Free the exit confirmation dialog box, if it exists */
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index 6d4cb3a51..9444d229a 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -123,7 +123,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
SetProp(hwnd, WIN_SCR_PROP, s_pScreenPriv);
/* Setup tray icon */
- if (!s_pScreenInfo->fNoTrayIcon) {
+ if (!s_pScreenInfo->fNoTrayIcon && !pref.fNoTrayIcon) {
/*
* NOTE: The WM_CREATE message is processed before CreateWindowEx
* returns, so s_pScreenPriv->hwndScreen is invalid at this point.