summary refs log tree commit diff
path: root/screen.c
diff options
context:
space:
mode:
authorokan <okan>2016-10-18 17:03:30 +0000
committerokan <okan>2016-10-18 17:03:30 +0000
commit0bb1be86c69ea95103e1a6b38c093406a47cdb07 (patch)
treeb7aa2c4a5a2c09bb20637f0c50dd4c01377abda0 /screen.c
parent38eac7d7e9d36243271eb7f968a3152c9eb0cfbc (diff)
downloadcwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.tar.gz
cwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.tar.xz
cwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.zip
Refactor callbacks to take a void * so as to not try and generalize into
client_ctx in keypress and buttonpress event handlers; pass appropriate *ctx's
based on context.

While here, limit some globals, replace defines with appropriate variables and
fix some naming.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/screen.c b/screen.c
index b9f1ac9..4badf65 100644
--- a/screen.c
+++ b/screen.c
@@ -84,7 +84,7 @@ screen_init(int which)
 	}
 	screen_updatestackingorder(sc);
 
-	if (HasRandr)
+	if (Conf.xrandr)
 		XRRSelectInput(X_Dpy, sc->rootwin, RRScreenChangeNotifyMask);
 
 	TAILQ_INSERT_TAIL(&Screenq, sc, entry);
@@ -140,7 +140,7 @@ region_find(struct screen_ctx *sc, int x, int y)
 }
 
 struct geom
-screen_area(struct screen_ctx *sc, int x, int y, int flags)
+screen_area(struct screen_ctx *sc, int x, int y, enum apply_gap apply_gap)
 {
 	struct region_ctx	*rc;
 	struct geom		 area = sc->work;
@@ -152,7 +152,7 @@ screen_area(struct screen_ctx *sc, int x, int y, int flags)
 			break;
 		}
 	}
-	if (flags & CWM_GAP)
+	if (apply_gap)
 		area = screen_apply_gap(sc, area);
 	return(area);
 }
@@ -173,7 +173,7 @@ screen_update_geometry(struct screen_ctx *sc)
 		free(rc);
 	}
 
-	if (HasRandr) {
+	if (Conf.xrandr) {
 		XRRScreenResources *sr;
 		XRRCrtcInfo *ci;
 		int i;