aboutsummaryrefslogtreecommitdiffstats
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan2009-12-08 16:52:17 +0000
committerokan2009-12-08 16:52:17 +0000
commit4c4c8d61c662cfe45e4aa6b6662a1c00947225db (patch)
tree31347967d8bbbcff21f607b81356ef16b863a6f4 /mousefunc.c
parent0b0dd2e0d919b5b7aeede0dfc2c20b1c9147753d (diff)
downloadcwm-4c4c8d61c662cfe45e4aa6b6662a1c00947225db.tar.gz
start fixing screen_ctx usage, for it is utterly broken. bring font
into screen_ctx and start passing screen_ctx around to in order get rid of Curscreen; fixup per-screen config colors the same way. diff mostly from oga@, with a bit harsher reaction to the state of screen_ctx. "please commit" oga@
Diffstat (limited to 'mousefunc.c')
-rw-r--r--mousefunc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 98fc858..bee700d 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: mousefunc.c,v 1.15 2009/08/27 01:38:08 okan Exp $
+ * $Id: mousefunc.c,v 1.16 2009/12/08 16:52:17 okan Exp $
*/
#include "headers.h"
@@ -51,10 +51,10 @@ mousefunc_sweep_draw(struct client_ctx *cc)
snprintf(asize, sizeof(asize), "%dx%d",
(cc->geom.width - cc->geom.basew) / cc->geom.incw,
(cc->geom.height - cc->geom.baseh) / cc->geom.inch);
- width_size = font_width(asize, strlen(asize)) + 4;
- width_name = font_width(cc->name, strlen(cc->name)) + 4;
+ width_size = font_width(sc, asize, strlen(asize)) + 4;
+ width_name = font_width(sc, cc->name, strlen(cc->name)) + 4;
width = MAX(width_size, width_name);
- height = font_ascent() + font_descent() + 1;
+ height = font_ascent(sc) + font_descent(sc) + 1;
XMoveResizeWindow(X_Dpy, sc->menuwin, cc->geom.x, cc->geom.y,
width, height * 2);
@@ -62,9 +62,9 @@ mousefunc_sweep_draw(struct client_ctx *cc)
XReparentWindow(X_Dpy, sc->menuwin, cc->win, 0, 0);
XClearWindow(X_Dpy, sc->menuwin);
font_draw(sc, cc->name, strlen(cc->name), sc->menuwin,
- 2, font_ascent() + 1);
+ 2, font_ascent(sc) + 1);
font_draw(sc, asize, strlen(asize), sc->menuwin,
- width / 2 - width_size / 2, height + font_ascent() + 1);
+ width / 2 - width_size / 2, height + font_ascent(sc) + 1);
}
void