mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
use get_real_screen() in a lot of places
This commit is contained in:
parent
9692e398d5
commit
659adaab5e
3 changed files with 8 additions and 26 deletions
|
@ -189,12 +189,7 @@ static void
|
|||
setup(Display *disp, int screen, DC *drawcontext, awesome_config *awesomeconf)
|
||||
{
|
||||
XSetWindowAttributes wa;
|
||||
int real_screen;
|
||||
|
||||
if(XineramaIsActive(disp))
|
||||
real_screen = DefaultScreen(disp);
|
||||
else
|
||||
real_screen = screen;
|
||||
int real_screen = get_real_screen(disp, screen);
|
||||
|
||||
/* init cursors */
|
||||
drawcontext->cursor[CurNormal] = XCreateFontCursor(disp, XC_left_ptr);
|
||||
|
|
20
event.c
20
event.c
|
@ -60,10 +60,7 @@ movemouse(Client * c, awesome_config *awesomeconf)
|
|||
XEvent ev;
|
||||
ScreenInfo *si;
|
||||
|
||||
if(XineramaIsActive(c->display))
|
||||
real_screen = DefaultScreen(c->display);
|
||||
else
|
||||
real_screen = awesomeconf->screen;
|
||||
real_screen = get_real_screen(c->display, awesomeconf->screen);
|
||||
|
||||
si = get_display_info(c->display, real_screen, NULL);
|
||||
|
||||
|
@ -108,17 +105,13 @@ movemouse(Client * c, awesome_config *awesomeconf)
|
|||
static void
|
||||
resizemouse(Client * c, awesome_config *awesomeconf)
|
||||
{
|
||||
int ocx, ocy, nw, nh, real_screen;
|
||||
int ocx, ocy, nw, nh;
|
||||
XEvent ev;
|
||||
|
||||
if(XineramaIsActive(c->display))
|
||||
real_screen = DefaultScreen(c->display);
|
||||
else
|
||||
real_screen = awesomeconf->screen;
|
||||
|
||||
ocx = c->x;
|
||||
ocy = c->y;
|
||||
if(XGrabPointer(c->display, RootWindow(c->display, real_screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
||||
if(XGrabPointer(c->display, RootWindow(c->display, get_real_screen(c->display, awesomeconf->screen)),
|
||||
False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
||||
None, dc[c->screen].cursor[CurResize], CurrentTime) != GrabSuccess)
|
||||
return;
|
||||
c->ismax = False;
|
||||
|
@ -243,10 +236,7 @@ handle_event_configurerequest(XEvent * e, awesome_config *awesomeconf)
|
|||
c->border = ev->border_width;
|
||||
if(c->isfixed || c->isfloating || IS_ARRANGE(layout_floating))
|
||||
{
|
||||
if(XineramaIsActive(c->display))
|
||||
real_screen = DefaultScreen(c->display);
|
||||
else
|
||||
real_screen = c->screen;
|
||||
real_screen = get_real_screen(c->display, c->screen);
|
||||
if(ev->value_mask & CWX)
|
||||
c->x = ev->x;
|
||||
if(ev->value_mask & CWY)
|
||||
|
|
|
@ -111,12 +111,9 @@ initstatusbar(Display *disp, int screen, DC *drawcontext, Statusbar *statusbar)
|
|||
int screen_number, real_screen;
|
||||
ScreenInfo *si;
|
||||
|
||||
statusbar->screen = screen;
|
||||
real_screen = get_real_screen(disp, screen);
|
||||
|
||||
if(XineramaIsActive(disp))
|
||||
real_screen = DefaultScreen(disp);
|
||||
else
|
||||
real_screen = screen;
|
||||
statusbar->screen = screen;
|
||||
|
||||
si = get_screen_info(disp, screen, NULL, &screen_number);
|
||||
|
||||
|
|
Loading…
Reference in a new issue