diff options
author | oga | 2008-09-22 14:15:03 +0000 |
---|---|---|
committer | oga | 2008-09-22 14:15:03 +0000 |
commit | 30fdb32a9e9467d23ad79e6602ac5b30e47e21f1 (patch) | |
tree | 8c84be05c3779e1b7d776219dcd1d330f7e5d549 /calmwm.c | |
parent | 0cac11a31570d71936c55c2244a78de34ea4c5a8 (diff) | |
download | cwm-30fdb32a9e9467d23ad79e6602ac5b30e47e21f1.tar.gz |
Display the current window title not a previous one in the case of
``show all'' in the window search dialogue. Noticed and diff from Tim
van der Molen, thanks!
Diffstat (limited to '')
-rw-r--r-- | calmwm.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: calmwm.c,v 1.27 2008/07/22 21:01:54 oga Exp $ + * $Id: calmwm.c,v 1.28 2008/09/22 14:15:03 oga Exp $ */ #include "headers.h" @@ -36,6 +36,7 @@ u_int Nscreens; struct client_ctx_q Clientq; int Doshape, Shape_ev; +int HasXinerama, HasRandr, Randr_ev; int Starting; struct conf Conf; @@ -121,6 +122,8 @@ dpy_init(const char *dpyname) Doshape = XShapeQueryExtension(X_Dpy, &Shape_ev, &i); + HasRandr = XRRQueryExtension(X_Dpy, &Randr_ev, &i); + TAILQ_INIT(&Screenq); } @@ -133,7 +136,7 @@ x_setup(void) Nscreens = ScreenCount(X_Dpy); for (i = 0; i < (int)Nscreens; i++) { - XMALLOC(sc, struct screen_ctx); + XCALLOC(sc, struct screen_ctx); x_setupscreen(sc, i); TAILQ_INSERT_TAIL(&Screenq, sc, entry); } @@ -161,6 +164,7 @@ x_setupscreen(struct screen_ctx *sc, u_int which) Window *wins, w0, w1; XWindowAttributes winattr; XSetWindowAttributes rootattr; + int fake; u_int nwins, i; Curscreen = sc; @@ -246,6 +250,18 @@ x_setupscreen(struct screen_ctx *sc, u_int which) XChangeWindowAttributes(X_Dpy, sc->rootwin, CWEventMask, &rootattr); + if (XineramaQueryExtension(X_Dpy, &fake, &fake) == 1 && + ((HasXinerama = XineramaIsActive(X_Dpy)) == 1)) + HasXinerama = 1; + if (HasRandr) + XRRSelectInput(X_Dpy, sc->rootwin, RRScreenChangeNotifyMask); + /* + * initial setup of xinerama screens, if we're using RandR then we'll + * redo this whenever the screen changes since a CTRC may have been + * added or removed + */ + screen_init_xinerama(sc); + XSync(X_Dpy, False); return; |