restack does not need Display as arg
This commit is contained in:
parent
0026bd3813
commit
fefa16611a
6
event.c
6
event.c
|
@ -202,7 +202,7 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
|
|||
{
|
||||
if (ev->button == Button1)
|
||||
{
|
||||
restack(c->display, &awesomeconf[c->screen]);
|
||||
restack(&awesomeconf[c->screen]);
|
||||
grabbuttons(c, True, True, awesomeconf->modkey, awesomeconf->numlockmask);
|
||||
}
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
|
|||
if(!IS_ARRANGE(c->screen, layout_floating) && !c->isfloating)
|
||||
uicb_togglefloating(&awesomeconf[c->screen], NULL);
|
||||
else
|
||||
restack(e->xany.display, &awesomeconf[c->screen]);
|
||||
restack(&awesomeconf[c->screen]);
|
||||
movemouse(c, awesomeconf);
|
||||
}
|
||||
else if(ev->button == Button2)
|
||||
|
@ -226,7 +226,7 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
|
|||
if(!IS_ARRANGE(c->screen, layout_floating) && !c->isfloating)
|
||||
uicb_togglefloating(&awesomeconf[c->screen], NULL);
|
||||
else
|
||||
restack(e->xany.display, &awesomeconf[c->screen]);
|
||||
restack(&awesomeconf[c->screen]);
|
||||
resizemouse(c, awesomeconf);
|
||||
}
|
||||
else if(ev->button == Button4)
|
||||
|
|
22
layout.c
22
layout.c
|
@ -48,7 +48,7 @@ arrange(awesome_config *awesomeconf)
|
|||
}
|
||||
awesomeconf->current_layout->arrange(awesomeconf);
|
||||
focus(NULL, True, awesomeconf);
|
||||
restack(awesomeconf->display, awesomeconf);
|
||||
restack(awesomeconf);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -65,7 +65,7 @@ uicb_focusnext(awesome_config * awesomeconf,
|
|||
if(c)
|
||||
{
|
||||
focus(c, True, awesomeconf);
|
||||
restack(c->display, awesomeconf);
|
||||
restack(awesomeconf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ uicb_focusprev(awesome_config *awesomeconf,
|
|||
if(c)
|
||||
{
|
||||
focus(c, True, awesomeconf);
|
||||
restack(c->display, awesomeconf);
|
||||
restack(awesomeconf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ loadawesomeprops(awesome_config * awesomeconf)
|
|||
}
|
||||
|
||||
void
|
||||
restack(Display * disp, awesome_config *awesomeconf)
|
||||
restack(awesome_config *awesomeconf)
|
||||
{
|
||||
Client *c;
|
||||
XEvent ev;
|
||||
|
@ -123,33 +123,33 @@ restack(Display * disp, awesome_config *awesomeconf)
|
|||
if(!*awesomeconf->client_sel)
|
||||
return;
|
||||
if(awesomeconf->allow_lower_floats)
|
||||
XRaiseWindow(disp, (*awesomeconf->client_sel)->win);
|
||||
XRaiseWindow(awesomeconf->display, (*awesomeconf->client_sel)->win);
|
||||
else
|
||||
{
|
||||
if((*awesomeconf->client_sel)->isfloating || IS_ARRANGE(0, layout_floating))
|
||||
XRaiseWindow(disp, (*awesomeconf->client_sel)->win);
|
||||
XRaiseWindow(awesomeconf->display, (*awesomeconf->client_sel)->win);
|
||||
if(!IS_ARRANGE(0, layout_floating))
|
||||
{
|
||||
wc.stack_mode = Below;
|
||||
wc.sibling = awesomeconf->statusbar.window;
|
||||
if(!(*awesomeconf->client_sel)->isfloating)
|
||||
{
|
||||
XConfigureWindow(disp, (*awesomeconf->client_sel)->win, CWSibling | CWStackMode, &wc);
|
||||
XConfigureWindow(awesomeconf->display, (*awesomeconf->client_sel)->win, CWSibling | CWStackMode, &wc);
|
||||
wc.sibling = (*awesomeconf->client_sel)->win;
|
||||
}
|
||||
for(c = *awesomeconf->clients; c; c = c->next)
|
||||
{
|
||||
if(!IS_TILED(c, awesomeconf->screen, awesomeconf->tags, awesomeconf->ntags) || c == *awesomeconf->client_sel)
|
||||
continue;
|
||||
XConfigureWindow(disp, c->win, CWSibling | CWStackMode, &wc);
|
||||
XConfigureWindow(awesomeconf->display, c->win, CWSibling | CWStackMode, &wc);
|
||||
wc.sibling = c->win;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(awesomeconf->focus_move_pointer)
|
||||
XWarpPointer(disp, None, (*awesomeconf->client_sel)->win, 0, 0, 0, 0, (*awesomeconf->client_sel)->w / 2, (*awesomeconf->client_sel)->h / 2);
|
||||
XSync(disp, False);
|
||||
while(XCheckMaskEvent(disp, EnterWindowMask, &ev));
|
||||
XWarpPointer(awesomeconf->display, None, (*awesomeconf->client_sel)->win, 0, 0, 0, 0, (*awesomeconf->client_sel)->w / 2, (*awesomeconf->client_sel)->h / 2);
|
||||
XSync(awesomeconf->display, False);
|
||||
while(XCheckMaskEvent(awesomeconf->display, EnterWindowMask, &ev));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
2
layout.h
2
layout.h
|
@ -30,7 +30,7 @@
|
|||
#define AWESOMEPROPS_ATOM(disp) XInternAtom(disp, "_AWESOME_PROPERTIES", False)
|
||||
|
||||
void arrange(awesome_config *); /* arranges all windows depending on the layout in use */
|
||||
void restack(Display *, awesome_config *); /* restores z layers of all clients */
|
||||
void restack(awesome_config *); /* restores z layers of all clients */
|
||||
void loadawesomeprops(awesome_config *);
|
||||
void saveawesomeprops(awesome_config *);
|
||||
|
||||
|
|
4
screen.c
4
screen.c
|
@ -198,7 +198,7 @@ uicb_focusnextscreen(awesome_config * awesomeconf,
|
|||
if(c)
|
||||
{
|
||||
focus(c, True, &awesomeconf[next_screen - awesomeconf->screen]);
|
||||
restack(c->display, &awesomeconf[next_screen - awesomeconf->screen]);
|
||||
restack(&awesomeconf[next_screen - awesomeconf->screen]);
|
||||
}
|
||||
move_mouse_pointer_to_screen(awesomeconf->display, next_screen);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ uicb_focusprevscreen(awesome_config * awesomeconf,
|
|||
if(c)
|
||||
{
|
||||
focus(c, True, &awesomeconf[prev_screen - awesomeconf->screen]);
|
||||
restack(c->display, &awesomeconf[prev_screen - awesomeconf->screen]);
|
||||
restack(&awesomeconf[prev_screen - awesomeconf->screen]);
|
||||
}
|
||||
move_mouse_pointer_to_screen(awesomeconf->display, prev_screen);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue