replace bad code for configurenotify

This commit is contained in:
Julien Danjou 2008-01-25 23:15:27 +01:00
parent c73e0bd72e
commit 34bc4e8191
1 changed files with 2 additions and 12 deletions

14
event.c
View File

@ -199,22 +199,12 @@ handle_event_configurenotify(XEvent * e)
int screen;
Area area;
/* XXX this is all crap -- need to rewrite everything */
for(screen = 0; screen < ScreenCount(e->xany.display); screen++)
if(ev->window == RootWindow(e->xany.display, screen)
&& (ev->width != DisplayWidth(e->xany.display, screen)
|| ev->height != DisplayHeight(e->xany.display, screen)))
{
DisplayWidth(e->xany.display, screen) = ev->width;
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;
}
/* it's not that we panic, but restart */
uicb_exec(0, globalconf.argv);
}
void