stop dropping EnterWindow event
and make statusbar_update_position static
This commit is contained in:
parent
81f1b96cb2
commit
2aacaa9320
2
layout.c
2
layout.c
|
@ -169,7 +169,6 @@ void
|
||||||
restack(int screen)
|
restack(int screen)
|
||||||
{
|
{
|
||||||
Client *c, *sel = globalconf.focus->client;
|
Client *c, *sel = globalconf.focus->client;
|
||||||
XEvent ev;
|
|
||||||
XWindowChanges wc;
|
XWindowChanges wc;
|
||||||
Tag **curtags;
|
Tag **curtags;
|
||||||
|
|
||||||
|
@ -202,7 +201,6 @@ restack(int screen)
|
||||||
XWarpPointer(globalconf.display, None, sel->win, 0, 0, 0, 0,
|
XWarpPointer(globalconf.display, None, sel->win, 0, 0, 0, 0,
|
||||||
sel->geometry.width / 2, sel->geometry.height / 2);
|
sel->geometry.width / 2, sel->geometry.height / 2);
|
||||||
XSync(globalconf.display, False);
|
XSync(globalconf.display, False);
|
||||||
while(XCheckMaskEvent(globalconf.display, EnterWindowMask, &ev));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
1
mouse.c
1
mouse.c
|
@ -177,7 +177,6 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
XUngrabPointer(globalconf.display, CurrentTime);
|
XUngrabPointer(globalconf.display, CurrentTime);
|
||||||
while(XCheckMaskEvent(globalconf.display, EnterWindowMask, &ev));
|
|
||||||
return;
|
return;
|
||||||
case ConfigureRequest:
|
case ConfigureRequest:
|
||||||
handle_event_configurerequest(&ev);
|
handle_event_configurerequest(&ev);
|
||||||
|
|
69
statusbar.c
69
statusbar.c
|
@ -30,6 +30,39 @@
|
||||||
|
|
||||||
extern AwesomeConf globalconf;
|
extern AwesomeConf globalconf;
|
||||||
|
|
||||||
|
static void
|
||||||
|
statusbar_update_position(Statusbar *statusbar)
|
||||||
|
{
|
||||||
|
Area area = get_screen_area(statusbar->screen,
|
||||||
|
NULL,
|
||||||
|
&globalconf.screens[statusbar->screen].padding);
|
||||||
|
|
||||||
|
XMapRaised(globalconf.display, statusbar->window);
|
||||||
|
switch(statusbar->position)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
XMoveWindow(globalconf.display, statusbar->window,
|
||||||
|
area.x, area.y);
|
||||||
|
break;
|
||||||
|
case Left:
|
||||||
|
XMoveWindow(globalconf.display, statusbar->window,
|
||||||
|
area.x, (area.y + area.height) - statusbar->width);
|
||||||
|
break;
|
||||||
|
case Right:
|
||||||
|
XMoveWindow(globalconf.display, statusbar->window,
|
||||||
|
area.x + (area.width - statusbar->height), area.y);
|
||||||
|
break;
|
||||||
|
case Bottom:
|
||||||
|
XMoveWindow(globalconf.display, statusbar->window,
|
||||||
|
area.x, area.height - statusbar->height);
|
||||||
|
break;
|
||||||
|
case Off:
|
||||||
|
XUnmapWindow(globalconf.display, statusbar->window);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
XSync(globalconf.display, False);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
statusbar_draw(Statusbar *statusbar)
|
statusbar_draw(Statusbar *statusbar)
|
||||||
{
|
{
|
||||||
|
@ -206,42 +239,6 @@ statusbar_init(Statusbar *statusbar, int screen)
|
||||||
statusbar_draw(statusbar);
|
statusbar_draw(statusbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
statusbar_update_position(Statusbar *statusbar)
|
|
||||||
{
|
|
||||||
XEvent ev;
|
|
||||||
Area area = get_screen_area(statusbar->screen,
|
|
||||||
NULL,
|
|
||||||
&globalconf.screens[statusbar->screen].padding);
|
|
||||||
|
|
||||||
XMapRaised(globalconf.display, statusbar->window);
|
|
||||||
switch(statusbar->position)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
XMoveWindow(globalconf.display, statusbar->window,
|
|
||||||
area.x, area.y);
|
|
||||||
break;
|
|
||||||
case Left:
|
|
||||||
XMoveWindow(globalconf.display, statusbar->window,
|
|
||||||
area.x, (area.y + area.height) - statusbar->width);
|
|
||||||
break;
|
|
||||||
case Right:
|
|
||||||
XMoveWindow(globalconf.display, statusbar->window,
|
|
||||||
area.x + (area.width - statusbar->height), area.y);
|
|
||||||
break;
|
|
||||||
case Bottom:
|
|
||||||
XMoveWindow(globalconf.display, statusbar->window,
|
|
||||||
area.x, area.height - statusbar->height);
|
|
||||||
break;
|
|
||||||
case Off:
|
|
||||||
XUnmapWindow(globalconf.display, statusbar->window);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
XSync(globalconf.display, False);
|
|
||||||
while(XCheckMaskEvent(globalconf.display, EnterWindowMask, &ev));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
statusbar_refresh()
|
statusbar_refresh()
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,6 @@ void statusbar_draw(Statusbar *);
|
||||||
void statusbar_init(Statusbar *, int);
|
void statusbar_init(Statusbar *, int);
|
||||||
void statusbar_display(Statusbar *);
|
void statusbar_display(Statusbar *);
|
||||||
Position statusbar_get_position_from_str(const char *);
|
Position statusbar_get_position_from_str(const char *);
|
||||||
void statusbar_update_position(Statusbar *);
|
|
||||||
|
|
||||||
Uicb uicb_statusbar_toggle;
|
Uicb uicb_statusbar_toggle;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue