summary refs log tree commit diff
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan <okan>2016-09-29 00:21:55 +0000
committerokan <okan>2016-09-29 00:21:55 +0000
commit0e8c7066333ffd331743658e82cfedaf3e0078a2 (patch)
tree2a9565441e857ffa4e773b87f84ad1fb972f01b2 /mousefunc.c
parent92b81d3df5d28e86e849a414eb9bc6cebe0c5f3f (diff)
downloadcwm-0e8c7066333ffd331743658e82cfedaf3e0078a2.tar.gz
cwm-0e8c7066333ffd331743658e82cfedaf3e0078a2.tar.xz
cwm-0e8c7066333ffd331743658e82cfedaf3e0078a2.zip
Mechanical change: move screen menu bits to their own struct.
Diffstat (limited to 'mousefunc.c')
-rw-r--r--mousefunc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 3366bf1..5b795cc 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -46,13 +46,13 @@ mousefunc_sweep_draw(struct client_ctx *cc)
 	XftTextExtentsUtf8(X_Dpy, sc->xftfont, (const FcChar8*)s,
 	    strlen(s), &extents);
 
-	XReparentWindow(X_Dpy, sc->menuwin, cc->win, 0, 0);
-	XMoveResizeWindow(X_Dpy, sc->menuwin, 0, 0,
+	XReparentWindow(X_Dpy, sc->menu.win, cc->win, 0, 0);
+	XMoveResizeWindow(X_Dpy, sc->menu.win, 0, 0,
 	    extents.xOff, sc->xftfont->height);
-	XMapWindow(X_Dpy, sc->menuwin);
-	XClearWindow(X_Dpy, sc->menuwin);
+	XMapWindow(X_Dpy, sc->menu.win);
+	XClearWindow(X_Dpy, sc->menu.win);
 
-	XftDrawStringUtf8(sc->xftdraw, &sc->xftcolor[CWM_COLOR_MENU_FONT],
+	XftDrawStringUtf8(sc->menu.xftdraw, &sc->xftcolor[CWM_COLOR_MENU_FONT],
 	    sc->xftfont, 0, sc->xftfont->ascent + 1,
 	    (const FcChar8*)s, strlen(s));
 }
@@ -93,8 +93,8 @@ mousefunc_client_resize(struct client_ctx *cc, union arg *arg)
 			break;
 		case ButtonRelease:
 			client_resize(cc, 1);
-			XUnmapWindow(X_Dpy, sc->menuwin);
-			XReparentWindow(X_Dpy, sc->menuwin, sc->rootwin, 0, 0);
+			XUnmapWindow(X_Dpy, sc->menu.win);
+			XReparentWindow(X_Dpy, sc->menu.win, sc->rootwin, 0, 0);
 			xu_ptr_ungrab();
 
 			/* Make sure the pointer stays within the window. */