GNOME Bugzilla – Bug 765448
Gear menu appears in the wrong place on Wayland
Last modified: 2016-05-02 18:07:46 UTC
Created attachment 326583 [details] Screenshot of incorrect menu placement under Wayland. The gear menu appears outside of the application (i.e. not near the gear button) on Wayland, but in the correct place on X11. See attached images. Operating System: Fedora 24 Alpha Details from about dialog: gnome-disk-utility 3.20.1 UDisks 2.1.7 (built against 2.1.7)
I'm seeing the same issue on Fedora 24 Alpha. Additionally, some warnings are printed to cli: Gdk-Message: Window 0x55b6e25cfa10 is a temporary window without parent, application will not be able to position it on screen. Gdk-Message: Window 0x55b6e25cfa10 is a temporary window without parent, application will not be able to position it on screen. (gnome-disks:5974): Gdk-WARNING **: Couldn't map as window 0x55b6e25cfa10 as popup because it doesn't have a parent This shows up every time I open the gear menu. I suggest using a GtkPopover for this menu anyway.
Created attachment 327137 [details] [review] [PATCH] gduwindow: Attach popup menu to the window For Wayland surfaces to be placed, they need to be subsurfaces, thus requiring a parent surface. Attach the generic menu to the corresponding toplevel widget so that the popup menu can be placed where expected.
Review of attachment 327137 [details] [review]: Thanks Oliver! ::: src/disks/gduwindow.c @@ +3472,3 @@ update_all (window); + gtk_menu_attach_to_widget (window->generic_menu, GTK_WIDGET(window), NULL); Need a space before the opening parenthesis here: GTK_WIDGET (window)
Review of attachment 327137 [details] [review]: Ah nope, my bad, attachment 327137 [details] [review] still needs work, I'll post an updated version...
Created attachment 327162 [details] [review] [PATCH] gduwindow: Attach popup menu to the window Updated patch: v2: Attach the menu to the top level only once in gdu_window_constructed(), fix space before parenthesis
Comment on attachment 327162 [details] [review] [PATCH] gduwindow: Attach popup menu to the window attachment 327162 [details] [review] pushed as commit 9cf88e6 - gduwindow: Attach popup menu to the window
Thanks, I pushed it to master, should I push it to 3.20 as well? Or do you want to do it when you'll make a new release for 3.20.x?
(In reply to Olivier Fourdan from comment #7) > Thanks, I pushed it to master, should I push it to 3.20 as well? Or do you > want to do it when you'll make a new release for 3.20.x? I've cherry-picked it just now. Thanks!