[Wayland-bugs] [Bug 777176] [wayland] gedit killed by protocol error "Invalid anchor rectangle size"
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Fri Jan 13 08:24:29 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=777176
Olivier Fourdan <ofourdan at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #343383|accepted-commit_now |none
status| |
Attachment #343383|0 |1
is obsolete| |
--- Comment #7 from Olivier Fourdan <ofourdan at redhat.com> ---
Created attachment 343414
--> https://bugzilla.gnome.org/attachment.cgi?id=343414&action=edit
[PATCH v2] wayland: avoid 0 width/height anchor rectangle
Passing a rectangle with zero width or height to xdg_shell-v6
set_anchor_rect() will cause a protocol error and terminate the client,
as with gedit when pressing the Win key.
Reason for this is because the rectangle used to set the anchor comes
from gtk_text_layout_get_iter_location() which uses the pango layout
width/height, which can be empty if there is not character at the given
location.
Make sure we don't use 0 as width or height as an anchor rectangle to
avoid the protocol error, and compensate the logical position of the
given rectangle if the size is changed, so that the actual position
remains as expected by the client.
--
v2: Move the trickery to a separate sanitize_anchor_rect() function
Compensate the position if the size is changed
Fix typo in commit message
--
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/20170113/53d83299/attachment-0001.html>
More information about the wayland-bugs
mailing list