diff options
author | okan <okan> | 2012-07-04 23:42:03 +0000 |
---|---|---|
committer | okan <okan> | 2012-07-04 23:42:03 +0000 |
commit | 287a5b2aad2fb54fbe7016fc90f8a62b1433547b (patch) | |
tree | fa018a23a605954aff1e57fcc414025ed5a08110 /mousefunc.c | |
parent | 3681b26914c3097295c37027bbf7eede76e308bf (diff) | |
download | cwm-287a5b2aad2fb54fbe7016fc90f8a62b1433547b.tar.gz cwm-287a5b2aad2fb54fbe7016fc90f8a62b1433547b.tar.xz cwm-287a5b2aad2fb54fbe7016fc90f8a62b1433547b.zip |
assign and use screen ctx where appropriate and consistently.
Diffstat (limited to 'mousefunc.c')
-rw-r--r-- | mousefunc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mousefunc.c b/mousefunc.c index c165977..713b3bc 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -137,6 +137,7 @@ mousefunc_window_move(struct client_ctx *cc, void *arg) { XEvent ev; Time ltime = 0; + struct screen_ctx *sc = cc->sc; int px, py; client_raise(cc); @@ -161,10 +162,10 @@ mousefunc_window_move(struct client_ctx *cc, void *arg) cc->geom.y = ev.xmotion.y_root - py - cc->bwidth; cc->geom.x += client_snapcalc(cc->geom.x, - cc->geom.width, cc->sc->xmax, + cc->geom.width, sc->xmax, cc->bwidth, Conf.snapdist); cc->geom.y += client_snapcalc(cc->geom.y, - cc->geom.height, cc->sc->ymax, + cc->geom.height, sc->ymax, cc->bwidth, Conf.snapdist); /* don't move more than 60 times / second */ @@ -217,13 +218,12 @@ mousefunc_menu_group(struct client_ctx *cc, void *arg) void mousefunc_menu_unhide(struct client_ctx *cc, void *arg) { - struct screen_ctx *sc; + struct screen_ctx *sc = cc->sc; struct client_ctx *old_cc; struct menu *mi; struct menu_q menuq; char *wname; - sc = cc->sc; old_cc = client_current(); TAILQ_INIT(&menuq); @@ -261,13 +261,11 @@ mousefunc_menu_unhide(struct client_ctx *cc, void *arg) void mousefunc_menu_cmd(struct client_ctx *cc, void *arg) { - struct screen_ctx *sc; + struct screen_ctx *sc = cc->sc; struct menu *mi; struct menu_q menuq; struct cmd *cmd; - sc = cc->sc; - TAILQ_INIT(&menuq); TAILQ_FOREACH(cmd, &Conf.cmdq, entry) { mi = xcalloc(1, sizeof(*mi)); |