After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773148 - Fix Ctrl+F10 keyboard shortcut to open background context menu in list view
Fix Ctrl+F10 keyboard shortcut to open background context menu in list view
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Keyboardability
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-18 10:45 UTC by Daniel Boles
Modified: 2016-10-18 11:19 UTC
See Also:
GNOME target: ---
GNOME version: 3.21/3.22


Attachments
list-view: fix opening background menu by keyboard (1.63 KB, patch)
2016-10-18 10:55 UTC, Daniel Boles
committed Details | Review

Description Daniel Boles 2016-10-18 10:45:17 UTC
Out of https://bugzilla.gnome.org/show_bug.cgi?id=773120 Ernestas noticed that this accelerator does not work in list view. It should be implemented in order to mirror the shortcuts available in canvas view.

See also this old one: https://bugzilla.gnome.org/show_bug.cgi?id=385896
Comment 1 Daniel Boles 2016-10-18 10:48:04 UTC
Same as for the canvas view in bug 773120:

(nautilus:1046): Gtk-CRITICAL **: gtk_menu_popup_at_rect: assertion 'GDK_IS_WINDOW (rect_window)' failed

Thread 1 "nautilus" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff3e38241 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
(gdb) bt
  • #0 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #1 g_logv
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #2 g_log
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #3 gtk_menu_popup_at_rect
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #4 gtk_menu_popup_at_pointer
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #5 nautilus_pop_up_context_menu
    at nautilus-ui-utilities.c line 182
  • #6 nautilus_files_view_pop_up_background_context_menu
    at nautilus-files-view.c line 7835
  • #7 key_press_callback
    at nautilus-list-view.c line 944
  • #8 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #9 g_closure_invoke
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #10 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #11 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #12 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #13 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #14 gtk_window_propagate_key_event
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #15 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #16 nautilus_window_key_press_event
    at nautilus-window.c line 2543
  • #17 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #18 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #19 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #20 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #21 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #22 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #23 gtk_main_do_event
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #24 ??
    from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
  • #25 ??
    from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
  • #26 g_main_context_dispatch
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #27 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #28 g_main_context_iteration
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #29 g_application_run
    from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
  • #30 main
    at nautilus-main.c line 102

Comment 2 Daniel Boles 2016-10-18 10:55:31 UTC
Created attachment 337933 [details] [review]
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.
Comment 3 Ernestas Kulik 2016-10-18 11:14:01 UTC
Review of attachment 337933 [details] [review]:

LGTM, thanks!
Comment 4 Ernestas Kulik 2016-10-18 11:19:29 UTC
Attachment 337933 [details] pushed as d75c0f9 - list-view: fix opening background menu by keyboard