зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
c3051ddfd0
Коммит
0fb4676372
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче