about summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2013-04-29 00:56:47 +0000
committerokan <okan>2013-04-29 00:56:47 +0000
commit94e341725b9e44c4ce1b15135b5b825c5c2b2dd3 (patch)
tree9453355d5af8b7b2e57212484d342b562e7dafb9
parent006a29e61773b02855e3c4e4a85d0e05f2837c6e (diff)
downloadcwm-94e341725b9e44c4ce1b15135b5b825c5c2b2dd3.tar.gz
cwm-94e341725b9e44c4ce1b15135b5b825c5c2b2dd3.tar.xz
cwm-94e341725b9e44c4ce1b15135b5b825c5c2b2dd3.zip
use an int in screen_init and avoid needing to cast for screen number (which).
-rw-r--r--calmwm.h4
-rw-r--r--screen.c2
-rw-r--r--xevents.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/calmwm.h b/calmwm.h
index 4eb1e69..b0a7c12 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -205,7 +205,7 @@ TAILQ_HEAD(autogroupwin_q, autogroupwin);
 
 struct screen_ctx {
 	TAILQ_ENTRY(screen_ctx)	 entry;
-	u_int			 which;
+	int			 which;
 	Visual			*visual;
 	Colormap		 colormap;
 	Window			 rootwin;
@@ -374,7 +374,7 @@ void			 search_print_client(struct menu *, int);
 
 struct geom		 screen_find_xinerama(struct screen_ctx *, int, int);
 struct screen_ctx	*screen_fromroot(Window);
-void			 screen_init(u_int);
+void			 screen_init(int);
 void			 screen_update_geometry(struct screen_ctx *);
 void			 screen_updatestackingorder(struct screen_ctx *);
 
diff --git a/screen.c b/screen.c
index 7eac18d..6940958 100644
--- a/screen.c
+++ b/screen.c
@@ -31,7 +31,7 @@
 #include "calmwm.h"
 
 void
-screen_init(u_int which)
+screen_init(int which)
 {
 	struct screen_ctx	*sc;
 	Window			*wins, w0, w1;
diff --git a/xevents.c b/xevents.c
index f19d10c..96d51d2 100644
--- a/xevents.c
+++ b/xevents.c
@@ -362,7 +362,7 @@ xev_handle_randr(XEvent *ee)
 
 	i = XRRRootToScreen(X_Dpy, rev->root);
 	TAILQ_FOREACH(sc, &Screenq, entry) {
-		if (sc->which == (u_int)i) {
+		if (sc->which == i) {
 			XRRUpdateConfiguration(ee);
 			screen_update_geometry(sc);
 		}