summaryrefslogtreecommitdiff
path: root/src/vwm.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@gnugeneration.com>2017-03-05 17:06:12 -0800
committerVito Caputo <vcaputo@gnugeneration.com>2017-03-14 19:41:48 -0700
commit4c0ec19811a6192ae8c3739bd9caff7d91bb725f (patch)
tree026b567b8fb83ffdfa2c31c9113c183396b61b4b /src/vwm.h
parent4dc9319239a172eb9f36ca57ea539a4a28edb50f (diff)
vwm: utilize vwm_xserver_t, minor refactor
Diffstat (limited to 'src/vwm.h')
-rw-r--r--src/vwm.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/vwm.h b/src/vwm.h
index fb7ed65..14acae0 100644
--- a/src/vwm.h
+++ b/src/vwm.h
@@ -9,6 +9,7 @@
#include "context.h"
#include "list.h"
#include "util.h"
+#include "xserver.h"
#define WINDOW_BORDER_WIDTH 1
#define WM_GRAB_MODIFIER Mod1Mask /* the modifier for invoking vwm's controls */
@@ -21,15 +22,21 @@
#define CONSOLE_WM_CLASS "VWMConsoleXTerm" /* the class we specify to the "console" xterm */
#define CONSOLE_SESSION_STRING "_vwm_console.$DISPLAY" /* the unique console screen session identifier */
+#define VWM_XCMAP(_vwm) (_vwm)->xserver->cmap
+#define VWM_XDISPLAY(_vwm) (_vwm)->xserver->display
+#define VWM_XGC(_vwm) (_vwm)->xserver->gc
+#define VWM_XSCREENNUM(_vwm) (_vwm)->xserver->screen_num
+#define VWM_XROOT(_vwm) XSERVER_XROOT((_vwm)->xserver)
+#define VWM_XVISUAL(_vwm) XSERVER_XVISUAL((_vwm)->xserver)
+#define VWM_XDEPTH(_vwm) XSERVER_XDEPTH((_vwm)->xserver)
typedef struct _vwm_window_t vwm_window_t;
typedef struct _vwm_desktop_t vwm_desktop_t;
typedef struct _vwm_t {
- Display *display;
- Colormap cmap;
- int screen_num;
- GC gc;
+ vwm_xserver_t *xserver; /* global xserver instance */
+
+ /* extra X stuff needed by vwm */
Atom wm_delete_atom;
Atom wm_protocols_atom;
Atom wm_pid_atom;
© All Rights Reserved