[nautilus/gnome-3-22] list-view: fix opening background menu by keyboard
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-22] list-view: fix opening background menu by keyboard
- Date: Tue, 18 Oct 2016 11:53:17 +0000 (UTC)
commit 1a207e14a29552bb48888e00ae14c3abec7f2f12
Author: djb <db0451 gmail com>
Date: Tue Oct 18 11:50:15 2016 +0100
list-view: fix opening background menu by keyboard
This was broken by commit 1f57c5b19c099ae44b2c8ec8ca9a1904f1ed7885.
When the keyboard was used to pop up this menu, 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=773148
src/nautilus-list-view.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index d525282..fbc50d7 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -922,7 +922,6 @@ key_press_callback (GtkWidget *widget,
gpointer callback_data)
{
NautilusFilesView *view;
- GdkEventButton button_event = { 0 };
gboolean handled;
GtkTreeView *tree_view;
GtkTreePath *path;
@@ -941,7 +940,7 @@ key_press_callback (GtkWidget *widget,
{
if (event->state & GDK_CONTROL_MASK)
{
- nautilus_files_view_pop_up_background_context_menu (view, &button_event);
+ nautilus_files_view_pop_up_background_context_menu (view, NULL);
handled = TRUE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]