Use xinerama_is_active attribute and drop XineramaIsActive() usage
This commit is contained in:
parent
355b7d67b3
commit
eee37d063c
1
client.c
1
client.c
|
@ -22,7 +22,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
#include <X11/extensions/Xinerama.h>
|
|
||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
|
|
3
event.c
3
event.c
|
@ -24,7 +24,6 @@
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
#include <X11/extensions/Xrandr.h>
|
#include <X11/extensions/Xrandr.h>
|
||||||
#include <X11/extensions/Xinerama.h>
|
|
||||||
|
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
|
@ -381,7 +380,7 @@ event_handle_maprequest(XEvent *e)
|
||||||
return;
|
return;
|
||||||
if(!client_get_bywin(globalconf.clients, ev->window))
|
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),
|
&& XQueryPointer(e->xany.display, RootWindow(e->xany.display, screen),
|
||||||
&dummy, &dummy, &x, &y, &d, &d, &m))
|
&dummy, &dummy, &x, &y, &d, &d, &m))
|
||||||
screen = screen_get_bycoord(globalconf.screens_info, screen, x, y);
|
screen = screen_get_bycoord(globalconf.screens_info, screen, x, y);
|
||||||
|
|
8
screen.c
8
screen.c
|
@ -19,8 +19,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <X11/extensions/Xinerama.h>
|
|
||||||
|
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
#include "focus.h"
|
#include "focus.h"
|
||||||
|
@ -110,7 +108,7 @@ get_display_area(int screen, Statusbar *statusbar, Padding *padding)
|
||||||
int
|
int
|
||||||
get_phys_screen(int screen)
|
get_phys_screen(int screen)
|
||||||
{
|
{
|
||||||
if(XineramaIsActive(globalconf.display))
|
if(globalconf.screens_info->xinerama_is_active)
|
||||||
return DefaultScreen(globalconf.display);
|
return DefaultScreen(globalconf.display);
|
||||||
return screen;
|
return screen;
|
||||||
}
|
}
|
||||||
|
@ -212,7 +210,7 @@ move_client_to_screen(Client *c, int new_screen, Bool doresize)
|
||||||
static void
|
static void
|
||||||
move_mouse_pointer_to_screen(int phys_screen)
|
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);
|
Area area = screen_get_area(phys_screen, NULL, NULL);
|
||||||
XWarpPointer(globalconf.display,
|
XWarpPointer(globalconf.display,
|
||||||
|
@ -264,7 +262,7 @@ uicb_client_movetoscreen(int screen __attribute__ ((unused)), char *arg)
|
||||||
int new_screen, prev_screen;
|
int new_screen, prev_screen;
|
||||||
Client *sel = globalconf.focus->client;
|
Client *sel = globalconf.focus->client;
|
||||||
|
|
||||||
if(!sel || !XineramaIsActive(globalconf.display))
|
if(!sel || !globalconf.screens_info->xinerama_is_active)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(arg)
|
if(arg)
|
||||||
|
|
3
uicb.c
3
uicb.c
|
@ -23,7 +23,6 @@
|
||||||
* @defgroup ui_callback User Interface Callbacks
|
* @defgroup ui_callback User Interface Callbacks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <X11/extensions/Xinerama.h>
|
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#include "awesome.h"
|
#include "awesome.h"
|
||||||
|
@ -82,7 +81,7 @@ uicb_spawn(int screen, char *arg)
|
||||||
if(!shell && !(shell = getenv("SHELL")))
|
if(!shell && !(shell = getenv("SHELL")))
|
||||||
shell = a_strdup("/bin/sh");
|
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);
|
display = a_strdup(tmp);
|
||||||
if((tmp = strrchr(display, '.')))
|
if((tmp = strrchr(display, '.')))
|
||||||
|
|
Loading…
Reference in New Issue