From eee37d063cf72fe130ee39e853b25022b5b38a98 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 13 Mar 2008 09:31:35 +0100 Subject: [PATCH] Use xinerama_is_active attribute and drop XineramaIsActive() usage --- client.c | 1 - event.c | 3 +-- screen.c | 8 +++----- uicb.c | 3 +-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/client.c b/client.c index f1e10871..bcb7627e 100644 --- a/client.c +++ b/client.c @@ -22,7 +22,6 @@ #include #include #include -#include #include "client.h" #include "tag.h" diff --git a/event.c b/event.c index 5d3b3790..324919fc 100644 --- a/event.c +++ b/event.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "screen.h" #include "event.h" @@ -381,7 +380,7 @@ event_handle_maprequest(XEvent *e) return; if(!client_get_bywin(globalconf.clients, ev->window)) { - if(XineramaIsActive(globalconf.display) + if(globalconf.screens_info->xinerama_is_active && XQueryPointer(e->xany.display, RootWindow(e->xany.display, screen), &dummy, &dummy, &x, &y, &d, &d, &m)) screen = screen_get_bycoord(globalconf.screens_info, screen, x, y); diff --git a/screen.c b/screen.c index 27d0a044..6e54ea08 100644 --- a/screen.c +++ b/screen.c @@ -19,8 +19,6 @@ * */ -#include - #include "screen.h" #include "tag.h" #include "focus.h" @@ -110,7 +108,7 @@ get_display_area(int screen, Statusbar *statusbar, Padding *padding) int get_phys_screen(int screen) { - if(XineramaIsActive(globalconf.display)) + if(globalconf.screens_info->xinerama_is_active) return DefaultScreen(globalconf.display); return screen; } @@ -212,7 +210,7 @@ move_client_to_screen(Client *c, int new_screen, Bool doresize) static void move_mouse_pointer_to_screen(int phys_screen) { - if(XineramaIsActive(globalconf.display)) + if(globalconf.screens_info->xinerama_is_active) { Area area = screen_get_area(phys_screen, NULL, NULL); XWarpPointer(globalconf.display, @@ -264,7 +262,7 @@ uicb_client_movetoscreen(int screen __attribute__ ((unused)), char *arg) int new_screen, prev_screen; Client *sel = globalconf.focus->client; - if(!sel || !XineramaIsActive(globalconf.display)) + if(!sel || !globalconf.screens_info->xinerama_is_active) return; if(arg) diff --git a/uicb.c b/uicb.c index bdb8978e..0a94a554 100644 --- a/uicb.c +++ b/uicb.c @@ -23,7 +23,6 @@ * @defgroup ui_callback User Interface Callbacks */ -#include #include #include "awesome.h" @@ -82,7 +81,7 @@ uicb_spawn(int screen, char *arg) if(!shell && !(shell = getenv("SHELL"))) shell = a_strdup("/bin/sh"); - if(!XineramaIsActive(globalconf.display) && (tmp = getenv("DISPLAY"))) + if(!globalconf.screens_info->xinerama_is_active && (tmp = getenv("DISPLAY"))) { display = a_strdup(tmp); if((tmp = strrchr(display, '.')))