Use xinerama_is_active attribute and drop XineramaIsActive() usage

This commit is contained in:
Julien Danjou 2008-03-13 09:31:35 +01:00
parent 355b7d67b3
commit eee37d063c
4 changed files with 5 additions and 10 deletions

View File

@ -22,7 +22,6 @@
#include <stdio.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
#include <X11/extensions/Xinerama.h>
#include "client.h"
#include "tag.h"

View File

@ -24,7 +24,6 @@
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xinerama.h>
#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);

View File

@ -19,8 +19,6 @@
*
*/
#include <X11/extensions/Xinerama.h>
#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)

3
uicb.c
View File

@ -23,7 +23,6 @@
* @defgroup ui_callback User Interface Callbacks
*/
#include <X11/extensions/Xinerama.h>
#include <sys/wait.h>
#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, '.')))