diff options
author | oga <oga> | 2008-05-20 14:50:51 +0000 |
---|---|---|
committer | oga <oga> | 2008-05-20 14:50:51 +0000 |
commit | 1e46ba72f706d7ab2b0f7a6a14054b908348d10e (patch) | |
tree | 0efe57cdad018b6a29f0c0b65113ef08589f953d /calmwm.c | |
parent | 3bb0b451f78d13b4624e52b726f51e4847a84a2f (diff) | |
download | cwm-1e46ba72f706d7ab2b0f7a6a14054b908348d10e.tar.gz cwm-1e46ba72f706d7ab2b0f7a6a14054b908348d10e.tar.xz cwm-1e46ba72f706d7ab2b0f7a6a14054b908348d10e.zip |
Pull out the behaviour in grab_label and search_start into one utility
function menu_filter(). The plan is to eventually merge in grab_menu too. Shrinks the code a fair bit. Also, change XMaskEvent for XWindowEvent to prevent getting exposes for other windows. This is particuarly noticable on slow machines with a LOT of xterms (todd, you're an odd man). ok okan@, todd@.
Diffstat (limited to 'calmwm.c')
-rw-r--r-- | calmwm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/calmwm.c b/calmwm.c index 582c10a..db055c0 100644 --- a/calmwm.c +++ b/calmwm.c @@ -152,6 +152,10 @@ x_setupscreen(struct screen_ctx *sc, u_int which) sc->display = x_screenname(which); sc->which = which; sc->rootwin = RootWindow(X_Dpy, which); + + sc->xmax = DisplayWidth(X_Dpy, sc->which); + sc->ymax = DisplayHeight(X_Dpy, sc->which); + XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, which), "black", &sc->fgcolor, &tmp); XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, which), @@ -204,6 +208,8 @@ x_setupscreen(struct screen_ctx *sc, u_int which) font_init(sc); DefaultFont = font_getx(sc, Conf.DefaultFontName); + sc->fontheight = font_ascent(DefaultFont) + + font_descent(DefaultFont) + 1; /* * XXX - this should *really* be in screen_init(). ordering @@ -213,7 +219,6 @@ x_setupscreen(struct screen_ctx *sc, u_int which) /* Initialize menu window. */ grab_menuinit(sc); - search_init(sc); /* Deal with existing clients. */ XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins); |