diff options
Diffstat (limited to 'xorg-server/hw/xwin/winprefsyacc.y')
-rw-r--r-- | xorg-server/hw/xwin/winprefsyacc.y | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y index 683fc44ca..38bb510a8 100644 --- a/xorg-server/hw/xwin/winprefsyacc.y +++ b/xorg-server/hw/xwin/winprefsyacc.y @@ -40,6 +40,7 @@ #define _STDLIB_H 1 /* bison checks this to know if stdlib has been included */ #include <string.h> #include "winprefs.h" +#include "winmsg.h" /* The following give better error messages in bison at the cost of a few KB */ #define YYERROR_VERBOSE 1 @@ -75,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); @@ -84,6 +87,9 @@ static int yyerror (char *s); extern char *yytext; extern int yylex(void); +#define YYMALLOC malloc +#define YYFREE free + %} %union { @@ -100,6 +106,8 @@ extern int yylex(void); %token DEFAULTICON %token ICONS %token STYLES +%token TASKBAR +%token NOTAB %token TOPMOST %token MAXIMIZE %token MINIMIZE @@ -147,6 +155,7 @@ command: defaulticon | menu | icons | styles + | taskbar | sysmenu | rootmenu | defaultsysmenu @@ -222,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; } @@ -243,7 +262,7 @@ forceexit: FORCEEXIT NEWLINE { pref.fForceExit = TRUE; } silentexit: SILENTEXIT NEWLINE { pref.fSilentExit = TRUE; } ; -debug: DEBUGOUTPUT STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($2); } +debug: DEBUGOUTPUT STRING NEWLINE { winDebug("LoadPreferences: %s\n", $2); free($2); } ; @@ -352,7 +371,7 @@ static void OpenIcons (void) { if (pref.icon != NULL) { - ErrorF("LoadPreferences: Redefining icon mappings\n"); + winDebug("LoadPreferences: Redefining icon mappings\n"); free(pref.icon); pref.icon = NULL; } @@ -387,7 +406,7 @@ static void OpenStyles (void) { if (pref.style != NULL) { - ErrorF("LoadPreferences: Redefining window style\n"); + winDebug("LoadPreferences: Redefining window style\n"); free(pref.style); pref.style = NULL; } @@ -416,10 +435,17 @@ CloseStyles (void) } static void +SetNoTrayIcon (void) +{ + pref.fNoTrayIcon=TRUE; +} + + +static void OpenSysMenu (void) { if (pref.sysMenu != NULL) { - ErrorF("LoadPreferences: Redefining system menu\n"); + winDebug("LoadPreferences: Redefining system menu\n"); free(pref.sysMenu); pref.sysMenu = NULL; } |