[nautilus/gnome-3-22] canvas-container: fix opening menus using keyboard
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-22] canvas-container: fix opening menus using keyboard
- Date: Tue, 18 Oct 2016 11:53:12 +0000 (UTC)
commit fd0c521081f3583cb94c250efbbd607312cd1c16
Author: djb <db0451 gmail com>
Date: Tue Oct 18 11:29:45 2016 +0100
canvas-container: fix opening menus using keyboard
This was broken by commit 1f57c5b19c099ae44b2c8ec8ca9a1904f1ed7885.
When the keyboard was used to pop up these menus, a zero-initialised
GdkEventButton was passed to gtk_menu_popup_at_pointer, which led to
this warning:
Gtk-CRITICAL **: gtk_menu_popup_at_rect: assertion 'GDK_IS_WINDOW
(rect_window)' failed"
As suggested by Ernestas Kulik, we can fix this by passing a NULL event
pointer instead, which leads to the GtkMenu function falling back to the
current cursor position anyway, and the menu opens OK at that location.
https://bugzilla.gnome.org/show_bug.cgi?id=773120
src/nautilus-canvas-container.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-canvas-container.c b/src/nautilus-canvas-container.c
index 67196f4..e15630e 100644
--- a/src/nautilus-canvas-container.c
+++ b/src/nautilus-canvas-container.c
@@ -5092,12 +5092,10 @@ handle_popups (NautilusCanvasContainer *container,
GdkEventKey *event,
const char *signal)
{
- GdkEventButton button_event = { 0 };
-
/* ensure we clear the drag state before showing the menu */
clear_drag_state (container);
- g_signal_emit_by_name (container, signal, &button_event);
+ g_signal_emit_by_name (container, signal, NULL);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]