[Wayland-bugs] [Bug 766722] Wayland: gtkcombox menu misplaced in master
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Wed May 25 07:00:55 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=766722
--- Comment #5 from Olivier Fourdan <ofourdan at redhat.com> ---
Ok, here's the idea, when we deal with a backend that doesn't have global
coordinates, all coordinates are relative to the toplevel, which breaks the
monitor detection. Basically (0,0) is the toplevel top left corner and not the
screen top left corner.
So the idea is to translate the coordinates to the relevant monitor, by finding
the monitor based on the window (thanks to bug 766566) and add the monitor
location to the given (relative) coordinates, to fix the computation to
constrain menus within the current monitor, then translate it back to local
coordinates once the computation is done.
For this, we'd need to:
1. Add an API to tell whether or not the current display (and backend) supports
global coordinates.,so we do not need to check which backend is actually in use
- I think it could even be a worthy addition anyway.
2. Add a private helper function to gtkprivate to do the coordinates
translation back and forth when the backend doesn't support global coordinates.
3. Use that in various menu positioning and sizing routines.
>From my initial testing here, that seems to work well enough, it fixes this bug
and bug 764310 as well.
That could be a good addition while we wait for the fixes for bug 756579 to
land, and we could even consider this as a fix for gtk+-3.20 where xdg-shell v6
is unlikely to be backported, who knows.
Patch series to follow.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20160525/d4ca9a26/attachment.html>
More information about the wayland-bugs
mailing list