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 769669 - Wayland: Resizing window can result in Popover pointing to nothing
Wayland: Resizing window can result in Popover pointing to nothing
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 769936
Blocks: WaylandRelated
 
 
Reported: 2016-08-09 12:20 UTC by Timm Bäder
Modified: 2018-05-02 17:23 UTC
See Also:
GNOME target: 3.26
GNOME version: ---


Attachments
gedit screenshot showing the problem (32.55 KB, image/png)
2016-08-09 12:20 UTC, Timm Bäder
Details
Screenshot (19.65 KB, image/png)
2017-08-21 18:53 UTC, André Klapper
Details
Screencast showing the original issue with gtk+ 3.22.18 (449.99 KB, video/webm)
2017-08-22 07:17 UTC, Timm Bäder
Details

Description Timm Bäder 2016-08-09 12:20:12 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.
Comment 1 Jonas Ådahl 2016-08-09 12:31:21 UTC
Fixing this will require xdg-shell v6, and porting popovers to use the gdk_window_move_to_rect() API.
Comment 2 Michael Catanzaro 2016-08-23 13:00:57 UTC
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.
Comment 3 Jonas Ådahl 2016-08-23 13:26:59 UTC
(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.
Comment 4 Jonas Ådahl 2016-08-25 05:14:49 UTC
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.
Comment 5 Timm Bäder 2017-03-12 11:57:52 UTC
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.
Comment 6 André Klapper 2017-08-21 18:53:53 UTC
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
Comment 7 Timm Bäder 2017-08-22 07:17:40 UTC
Created attachment 358111 [details]
Screencast showing the original issue with gtk+ 3.22.18
Comment 8 Daniel Boles 2017-09-11 11:20:52 UTC
*** Bug 768256 has been marked as a duplicate of this bug. ***
Comment 9 Daniel Boles 2017-09-13 21:36:35 UTC
retitling for the original issue; let's use Bug 768256 for the edge-of-screen one
Comment 10 GNOME Infrastructure Team 2018-05-02 17:23:56 UTC
-- 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.