From 30fdb32a9e9467d23ad79e6602ac5b30e47e21f1 Mon Sep 17 00:00:00 2001 From: oga Date: Mon, 22 Sep 2008 14:15:03 +0000 Subject: 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! --- screen.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'screen.c') diff --git a/screen.c b/screen.c index 139c451..be4768b 100644 --- a/screen.c +++ b/screen.c @@ -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: screen.c,v 1.8 2008/07/22 19:54:57 oga Exp $ + * $Id: screen.c,v 1.9 2008/09/22 14:15:03 oga Exp $ */ #include "headers.h" @@ -67,3 +67,28 @@ screen_updatestackingorder(void) XFree(wins); } + +void +screen_init_xinerama(struct screen_ctx *sc) +{ + XineramaScreenInfo *info; + int no, fake; + + if (HasXinerama == 0 || XineramaIsActive(X_Dpy) == 0) { + HasXinerama = 0; + sc->xinerama_no = 0; + } + + info = XineramaQueryScreens(X_Dpy, &no); + if (info == NULL) { + /*is xinerama is actually off, instead of a malloc failure? */ + if (sc->xinerama == NULL) + HasXinerama = NULL; + return; + } + + if (sc->xinerama != NULL) + XFree(sc->xinerama); + sc->xinerama = info; + sc->xinerama_no = no; +} -- cgit v1.2.3-2-gb3c3