<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Gtk.Popover misplacement in Wayland"
href="https://bugzilla.gnome.org/show_bug.cgi?id=774148#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Gtk.Popover misplacement in Wayland"
href="https://bugzilla.gnome.org/show_bug.cgi?id=774148">bug 774148</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=344713&action=diff" name="attach_344713" title="[PATCH] gtkwidget: return translated coords">attachment 344713</a> <a href="attachment.cgi?id=344713&action=edit" title="[PATCH] gtkwidget: return translated coords">[details]</a></span> <a href='review?bug=774148&attachment=344713'>[review]</a>
[PATCH] gtkwidget: return translated coords
hen the GtkWidget hierarchy does not match the GdkWindow hierarchy, the
GtkWidget code may find a common ancestor that cannot be found while
traversing the GdkWindow tree.
This happens with for example on Wayland, a GtkPopover has another
GtkPopover as parent, in this case, the GdkWindow parent is the root
window, whereas the GtkWidget parent is the other GtkPopover.
That confuses the gtk_widget_translate_coordinates() logic which will
bail out in this case and won't return the translated coordinates.
For this particular corner case, translate the coordinates but still
return FALSE.
The existing GTK+ API for gtk_widget_translate_coordinates() states that
it would return FALSE if either widget was not realized, or there was no
common ancestor, in which case nothing is stored in the return
variables, so this particular corner case should not affect the
documented behavior.
--
/!\ This is a corner case, some sort of a grey area in the documented behavior,
I am not sure about the possible side-effects of this patch - But it seems to
fix this particular issue with popover on Wayland...</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>