diff options
author | Craig Fields <cfields@mit.edu> | 1995-08-22 17:14:20 +0000 |
---|---|---|
committer | Craig Fields <cfields@mit.edu> | 1995-08-22 17:14:20 +0000 |
commit | d584e95a0f81439b7d659c0e421ccd9bb0787ced (patch) | |
tree | 307687ac6e88ea9d4658600067694471e681bcbe /zwgc | |
parent | 6882c1eb988105e74debb0815d0e69eb2a6aa3d7 (diff) |
Since we effectively support 4Dwm, and 4Dwm does desks, we need
to do desks. Since there's no configuration of 4Dwm to be able to
tell it windows named zwgc should be considered global, we tell
zwgc to make its own windows global. Hopefully 4Dwm will mature
and we'll be able to remove this code.
Diffstat (limited to 'zwgc')
-rw-r--r-- | zwgc/X_gram.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/zwgc/X_gram.c b/zwgc/X_gram.c index 784130f..79586cd 100644 --- a/zwgc/X_gram.c +++ b/zwgc/X_gram.c @@ -22,6 +22,7 @@ static char rcsid_X_gram_c[] = "$Id$"; #include "xmark.h" #include <X11/Xutil.h> #include <X11/cursorfont.h> +#include <X11/Xatom.h> #include "zwgc.h" #include "X_driver.h" #include "X_fonts.h" @@ -51,6 +52,10 @@ static int border_width = 1; static int cursor_code = XC_sailboat; static int set_transient; static int enable_delete; +#ifdef SGI_DESKS +static int global_4dwm; +static Atom desks_hints, desks_always_global; +#endif static char *title_name,*icon_name; static Cursor cursor; static Window group_leader; /* In order to have transient windows, @@ -139,6 +144,18 @@ void x_gram_init(dpy) set_transient = get_bool_resource("transient", "Transient", 0); enable_delete = get_bool_resource("enableDelete", "EnableDelete", 1); +#ifdef SGI_DESKS + global_4dwm = get_bool_resource("global", "Global", 1); + + if (global_4dwm) + { + desks_hints = XInternAtom(dpy, "_SGI_DESKS_HINTS", False); + + desks_always_global = XInternAtom(dpy, "_SGI_DESKS_ALWAYS_GLOBAL", + False); + } +#endif + temp = get_string_resource("borderWidth", "BorderWidth"); /* <<<>>> */ if (temp && atoi(temp)>=0) @@ -307,7 +324,13 @@ void x_gram_create(dpy, gram, xalign, yalign, xpos, ypos, xsize, ysize, x_set_icccm_hints(dpy,w,title_name,icon_name,&sizehints,&wmhints,0); } - + +#ifdef SGI_DESKS + if (global_4dwm) + (void)XChangeProperty(dpy, w, + desks_hints, XA_ATOM, 32, PropModeAppend, + (char *)&desks_always_global, 1); +#endif XSaveContext(dpy, w, desc_context, (caddr_t)gram); |