Fix context menus in thread pane on Linux by making sure not to re-use an event struct (and its changed event flags) after dispatching it. Bug 179172, r=varga, sr=blizzard.

This commit is contained in:
bryner%netscape.com 2002-11-12 22:59:06 +00:00
Родитель c3051ddfd0
Коммит 0fb4676372
2 изменённых файлов: 6 добавлений и 5 удалений

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

@ -1868,9 +1868,9 @@ nsWidget::OnButtonPressSignal(GdkEventButton * aGdkButtonEvent)
// if we're a right-button-down on linux, we're trying to
// popup a context menu. send that event to gecko also.
if (eventType == NS_MOUSE_RIGHT_BUTTON_DOWN) {
eventType = NS_CONTEXTMENU;
InitMouseEvent(aGdkButtonEvent, event, eventType);
DispatchMouseEvent(event);
nsMouseEvent contextMenuEvent;
InitMouseEvent(aGdkButtonEvent, contextMenuEvent, NS_CONTEXTMENU);
DispatchMouseEvent(contextMenuEvent);
}
Release();

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

@ -1367,8 +1367,9 @@ nsWindow::OnButtonPressEvent(GtkWidget *aWidget, GdkEventButton *aEvent)
// right menu click on linux should also pop up a context menu
if (eventType == NS_MOUSE_RIGHT_BUTTON_DOWN) {
InitButtonEvent(event, NS_CONTEXTMENU, aEvent);
DispatchEvent(&event, status);
nsMouseEvent contextMenuEvent;
InitButtonEvent(contextMenuEvent, NS_CONTEXTMENU, aEvent);
DispatchEvent(&contextMenuEvent, status);
}
}