remove Default* where possible
This commit is contained in:
parent
969b38c63d
commit
cd2c1657f5
22
event.c
22
event.c
|
@ -64,10 +64,10 @@ movemouse(Client * c, awesome_config *awesomeconf)
|
||||||
|
|
||||||
ocx = nx = c->x;
|
ocx = nx = c->x;
|
||||||
ocy = ny = c->y;
|
ocy = ny = c->y;
|
||||||
if(XGrabPointer(c->display, DefaultRootWindow(c->display), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
if(XGrabPointer(c->display, RootWindow(c->display, c->screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
||||||
None, dc.cursor[CurMove], CurrentTime) != GrabSuccess)
|
None, dc.cursor[CurMove], CurrentTime) != GrabSuccess)
|
||||||
return;
|
return;
|
||||||
XQueryPointer(c->display, DefaultRootWindow(c->display), &dummy, &dummy, &x1, &y1, &di, &di, &dui);
|
XQueryPointer(c->display, RootWindow(c->display, c->screen), &dummy, &dummy, &x1, &y1, &di, &di, &dui);
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
XMaskEvent(c->display, MOUSEMASK | ExposureMask | SubstructureRedirectMask, &ev);
|
XMaskEvent(c->display, MOUSEMASK | ExposureMask | SubstructureRedirectMask, &ev);
|
||||||
|
@ -109,7 +109,7 @@ resizemouse(Client * c, awesome_config *awesomeconf)
|
||||||
|
|
||||||
ocx = c->x;
|
ocx = c->x;
|
||||||
ocy = c->y;
|
ocy = c->y;
|
||||||
if(XGrabPointer(c->display, DefaultRootWindow(c->display), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
if(XGrabPointer(c->display, RootWindow(c->display, c->screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
||||||
None, dc.cursor[CurResize], CurrentTime) != GrabSuccess)
|
None, dc.cursor[CurResize], CurrentTime) != GrabSuccess)
|
||||||
return;
|
return;
|
||||||
c->ismax = False;
|
c->ismax = False;
|
||||||
|
@ -183,14 +183,14 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
|
||||||
return;
|
return;
|
||||||
if(ev->button == Button1 && (IS_ARRANGE(floating) || c->isfloating))
|
if(ev->button == Button1 && (IS_ARRANGE(floating) || c->isfloating))
|
||||||
{
|
{
|
||||||
restack(e->xany.display, DefaultScreen(e->xany.display), &dc, awesomeconf);
|
restack(e->xany.display, c->screen, &dc, awesomeconf);
|
||||||
movemouse(c, awesomeconf);
|
movemouse(c, awesomeconf);
|
||||||
}
|
}
|
||||||
else if(ev->button == Button2)
|
else if(ev->button == Button2)
|
||||||
uicb_zoom(e->xany.display, &dc, awesomeconf, NULL);
|
uicb_zoom(e->xany.display, &dc, awesomeconf, NULL);
|
||||||
else if(ev->button == Button3 && (IS_ARRANGE(floating) || c->isfloating) && !c->isfixed)
|
else if(ev->button == Button3 && (IS_ARRANGE(floating) || c->isfloating) && !c->isfixed)
|
||||||
{
|
{
|
||||||
restack(e->xany.display, DefaultScreen(e->xany.display), &dc, awesomeconf);
|
restack(e->xany.display, c->screen, &dc, awesomeconf);
|
||||||
resizemouse(c, awesomeconf);
|
resizemouse(c, awesomeconf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -225,10 +225,10 @@ handle_event_configurerequest(XEvent * e, awesome_config *awesomeconf __attribut
|
||||||
c->w = ev->width;
|
c->w = ev->width;
|
||||||
if(ev->value_mask & CWHeight)
|
if(ev->value_mask & CWHeight)
|
||||||
c->h = ev->height;
|
c->h = ev->height;
|
||||||
if((c->x + c->w) > DisplayWidth(c->display, DefaultScreen(c->display)) && c->isfloating)
|
if((c->x + c->w) > DisplayWidth(c->display, c->screen) && c->isfloating)
|
||||||
c->x = DisplayWidth(c->display, DefaultScreen(c->display)) / 2 - c->w / 2; /* center in x direction */
|
c->x = DisplayWidth(c->display, c->screen) / 2 - c->w / 2; /* center in x direction */
|
||||||
if((c->y + c->h) > DisplayHeight(c->display, DefaultScreen(c->display)) && c->isfloating)
|
if((c->y + c->h) > DisplayHeight(c->display, c->screen) && c->isfloating)
|
||||||
c->y = DisplayHeight(c->display, DefaultScreen(c->display)) / 2 - c->h / 2; /* center in y direction */
|
c->y = DisplayHeight(c->display, c->screen) / 2 - c->h / 2; /* center in y direction */
|
||||||
if((ev->value_mask & (CWX | CWY)) && !(ev->value_mask & (CWWidth | CWHeight)))
|
if((ev->value_mask & (CWX | CWY)) && !(ev->value_mask & (CWWidth | CWHeight)))
|
||||||
configure(c);
|
configure(c);
|
||||||
if(isvisible(c, awesomeconf->selected_tags, awesomeconf->ntags))
|
if(isvisible(c, awesomeconf->selected_tags, awesomeconf->ntags))
|
||||||
|
@ -304,7 +304,7 @@ handle_event_expose(XEvent * e, awesome_config *awesomeconf)
|
||||||
XExposeEvent *ev = &e->xexpose;
|
XExposeEvent *ev = &e->xexpose;
|
||||||
|
|
||||||
if(!ev->count && awesomeconf->statusbar.window == ev->window)
|
if(!ev->count && awesomeconf->statusbar.window == ev->window)
|
||||||
drawstatusbar(e->xany.display, DefaultScreen(e->xany.display), &dc, awesomeconf);
|
drawstatusbar(e->xany.display, awesomeconf->statusbar.screen, &dc, awesomeconf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -370,7 +370,7 @@ handle_event_propertynotify(XEvent * e, awesome_config *awesomeconf)
|
||||||
case XA_WM_TRANSIENT_FOR:
|
case XA_WM_TRANSIENT_FOR:
|
||||||
XGetTransientForHint(e->xany.display, c->win, &trans);
|
XGetTransientForHint(e->xany.display, c->win, &trans);
|
||||||
if(!c->isfloating && (c->isfloating = (getclient(trans) != NULL)))
|
if(!c->isfloating && (c->isfloating = (getclient(trans) != NULL)))
|
||||||
arrange(e->xany.display, DefaultScreen(e->xany.display), &dc, awesomeconf);
|
arrange(e->xany.display, c->screen, &dc, awesomeconf);
|
||||||
break;
|
break;
|
||||||
case XA_WM_NORMAL_HINTS:
|
case XA_WM_NORMAL_HINTS:
|
||||||
updatesizehints(c);
|
updatesizehints(c);
|
||||||
|
|
Loading…
Reference in New Issue