summary refs log tree commit diff
path: root/calmwm.h
diff options
context:
space:
mode:
authoroga <oga>2008-09-29 23:16:46 +0000
committeroga <oga>2008-09-29 23:16:46 +0000
commita0739c6cd4df1890751e2527c899756d7a49b6c5 (patch)
treed0c2dd86406ecbf00616857c3b351da224e31345 /calmwm.h
parente2610449d11d3b5100aad319e8fa70c370b734bf (diff)
downloadcwm-a0739c6cd4df1890751e2527c899756d7a49b6c5.tar.gz
cwm-a0739c6cd4df1890751e2527c899756d7a49b6c5.tar.xz
cwm-a0739c6cd4df1890751e2527c899756d7a49b6c5.zip
Xinerama and XRandR dual head support for cwm(1). Now we detect the xrandr
reconfiguration events and change our sizes depending on that. We also detect
the xinerama screens for maximize, vertmaximize and initial window placement.

This could be improved by automatically resizing maximized windows when
the screen resolution changes and by moving windows that would be hidden
into visible space. Said changes will come shortly.

Tested by many. matthieu@ didn't oppose.
Diffstat (limited to 'calmwm.h')
-rw-r--r--calmwm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/calmwm.h b/calmwm.h
index c20e66d..be26b57 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -62,6 +62,9 @@ struct screen_ctx {
 
 	XftDraw		*xftdraw;
 	XftColor	 xftcolor;
+
+	int		 xinerama_no;
+	XineramaScreenInfo *xinerama;
 };
 
 TAILQ_HEAD(screen_ctx_q, screen_ctx);
@@ -369,6 +372,7 @@ void			 xev_handle_keyrelease(struct xevent *, XEvent *);
 void			 xev_handle_expose(struct xevent *, XEvent *);
 void			 xev_handle_clientmessage(struct xevent *, XEvent *);
 void			 xev_handle_shape(struct xevent *, XEvent *);
+void			 xev_handle_randr(struct xevent *, XEvent *);
 void			 xev_handle_mapping(struct xevent *, XEvent *);
 
 #define XEV_QUICK(a, b, c, d, e) do {		\
@@ -417,6 +421,7 @@ char			*xstrdup(const char *);
 struct screen_ctx	*screen_fromroot(Window);
 struct screen_ctx	*screen_current(void);
 void			 screen_updatestackingorder(void);
+void			 screen_init_xinerama(struct screen_ctx *);
 
 void			 conf_setup(struct conf *, const char *);
 void			 conf_client(struct client_ctx *);
@@ -512,6 +517,8 @@ extern u_int				 Nscreens;
 extern struct client_ctx_q		 Clientq;
 
 extern int				 Doshape, Shape_ev;
+extern int				 Doshape, Shape_ev;
+extern int				 HasXinerama, HasRandr, Randr_ev;
 extern struct conf			 Conf;
 
 #endif /* _CALMWM_H_ */