[Wayland-bugs] [Bug 769402] regression in menu positioning on wayland

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Mon Aug 8 01:51:27 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=769402

--- Comment #11 from Jonas Ã…dahl <jadahl at gmail.com> ---
(In reply to William Hua from comment #10)
> Review of attachment 332693 [details] [review]:
> 
> Thanks, just a couple questions, but these patches do fix the problem.
> 
> I'm still a bit hesitant to alter the default implementation for the sake of
> the Wayland backend, which will have its own implementation at some point.
> But if it still needs a lot of work, we can do it to fix the regression. I
> didn't see any problems with this patch under X11 or Mir.

Well, we could add a dumb implementation to the Wayland backend right now, but
it'd regress sligthly (for example a window placed at poisition (0, 0) on a
single monitor gets mostly the correct menu placement simply because the real
position happens to be the same as the "fake root coordinate".

> 
> ::: gdk/gdkwindowimpl.c
> @@ +187,3 @@
> +    {
> +      if (_gdk_window_is_toplevel (window))
> +{
> 
> Is this needed if we already know window->window_type == GDK_WINDOW_CHILD?

I'm not entirely sure. I used the same loop semantics as
gdk_window_get_toplevel() which includes this part.

> 
> @@ +191,3 @@
> +      gdk_window_coords_to_parent (window, xf, yf, &xf, &yf);
> +
> +  gdouble yf = y;
> 
> Should we use gdk_window_get_effective_parent (window) instead?
> 
> The docs for gdk_window_coords_to_parent () say that for off-screen windows,
> it converts to the window's embedder instead.

Good point. Should probably use gdk_window_get_effective_parent() above then as
well.

-- 
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/20160808/7df881f4/attachment.html>


More information about the wayland-bugs mailing list