replace bad code for configurenotify
This commit is contained in:
parent
c73e0bd72e
commit
34bc4e8191
14
event.c
14
event.c
|
@ -199,22 +199,12 @@ handle_event_configurenotify(XEvent * e)
|
||||||
int screen;
|
int screen;
|
||||||
Area area;
|
Area area;
|
||||||
|
|
||||||
/* XXX this is all crap -- need to rewrite everything */
|
|
||||||
for(screen = 0; screen < ScreenCount(e->xany.display); screen++)
|
for(screen = 0; screen < ScreenCount(e->xany.display); screen++)
|
||||||
if(ev->window == RootWindow(e->xany.display, screen)
|
if(ev->window == RootWindow(e->xany.display, screen)
|
||||||
&& (ev->width != DisplayWidth(e->xany.display, screen)
|
&& (ev->width != DisplayWidth(e->xany.display, screen)
|
||||||
|| ev->height != DisplayHeight(e->xany.display, screen)))
|
|| ev->height != DisplayHeight(e->xany.display, screen)))
|
||||||
{
|
/* it's not that we panic, but restart */
|
||||||
DisplayWidth(e->xany.display, screen) = ev->width;
|
uicb_exec(0, globalconf.argv);
|
||||||
DisplayHeight(e->xany.display, screen) = ev->height;
|
|
||||||
|
|
||||||
/* update statusbar */
|
|
||||||
area = get_screen_area(screen, NULL, &globalconf.screens[screen].padding);
|
|
||||||
globalconf.screens[screen].statusbar->sw->geometry.width = area.width;
|
|
||||||
|
|
||||||
widget_invalidate_cache(screen, WIDGET_CACHE_ALL);
|
|
||||||
globalconf.screens[screen].need_arrange = True;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue