GNOME Bugzilla – Bug 769669
Wayland: Resizing window can result in Popover pointing to nothing
Last modified: 2018-05-02 17:23:56 UTC
Created attachment 332995 [details] gedit screenshot showing the problem On Wayland, popover can extend their toplevel window, but if the popover is rather large and the window rather small, that capability is unused and instead the popver gets moved up and now points to nothing. When playing around with the menu in gedit and a small window, one can find a few such corner cases.
Fixing this will require xdg-shell v6, and porting popovers to use the gdk_window_move_to_rect() API.
Another problem is that when the window is positioned on the edge of the screen, popovers can get drawn off the edge of the screen. So long as it's not possible for clients to known their position onscreen, the popover probably needs to stay within the main window, unfortunately.
(In reply to Michael Catanzaro from comment #2) > Another problem is that when the window is positioned on the edge of the > screen, popovers can get drawn off the edge of the screen. So long as it's > not possible for clients to known their position onscreen, the popover > probably needs to stay within the main window, unfortunately. After bug 769936 has landed, and by using "gdk_window_move_to_rect()" to position the popup, it should be possible to allow popovers to be potentially positioned outside the window without having them ending up outside of the screen on the Wayland backend.
On current master I can't reproduce the original issue. The issue Michael I can reproduce on both X11 and Wayland, so I'd say thats different from this one.
To be clear, the issue still appears in gtk+ 3.22 (and I assume master) when first opening the popover and then resizing gedit's window (using super+mouse) to a small height.
Created attachment 358089 [details] Screenshot Cannot reproduce the original issue, but edge of screen is still a problem. gedit-3.22.1-1.fc26.x86_64 gtk3-3.22.18-1.fc26.x86_64
Created attachment 358111 [details] Screencast showing the original issue with gtk+ 3.22.18
*** Bug 768256 has been marked as a duplicate of this bug. ***
retitling for the original issue; let's use Bug 768256 for the edge-of-screen one
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/655.