Make sure that when looking for extra ConfigureNotify events that you

check to make sure that the event that you get is actually a ConfigureNotify
event.  StructureNotifyMask includes other things, too.  "I can't believe
this ever worked."  This is not part of the build.
This commit is contained in:
blizzard%redhat.com 1999-07-10 20:51:18 +00:00
Родитель 7e508ecf17
Коммит 1767055ead
1 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -287,6 +287,7 @@ void
nsAppShell::DispatchEvent(XEvent *event)
{
nsWidget *widget;
XEvent config_event;
widget = nsWidget::GetWidgetForWindow(event->xany.window);
// switch on the type of event
switch (event->type) {
@ -296,7 +297,21 @@ nsAppShell::DispatchEvent(XEvent *event)
case ConfigureNotify:
// we need to make sure that this is the LAST of the
// config events.
while (XCheckWindowEvent(mDisplay, event->xany.window, StructureNotifyMask, event) == True);
PR_LOG(XlibWidgetsLM, PR_LOG_DEBUG, ("DispatchEvent: ConfigureNotify event for window 0x%lx %d %d %d %d\n",
event->xconfigure.window,
event->xconfigure.x, event->xconfigure.y,
event->xconfigure.width, event->xconfigure.height));
while (XCheckWindowEvent(mDisplay, event->xany.window, StructureNotifyMask, &config_event) == True) {
// make sure that we don't get other types of events. StructureNotifyMask
// includes other kinds of events, too.
if (config_event.type == ConfigureNotify) {
*event = config_event;
PR_LOG(XlibWidgetsLM, PR_LOG_DEBUG, ("DispatchEvent: Extra ConfigureNotify event for window 0x%lx %d %d %d %d\n",
event->xconfigure.window,
event->xconfigure.x, event->xconfigure.y,
event->xconfigure.width, event->xconfigure.height));
}
}
HandleConfigureNotifyEvent(event, widget);
break;
case ButtonPress: