]> git.mdlowis.com Git - proto/labwc.git/commit
xdg: Use wlr_xdg_surface_get_geometry() to get size
authorJohn Lindgren <john@jlindgren.net>
Mon, 20 Feb 2023 22:30:17 +0000 (17:30 -0500)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 21 Feb 2023 07:30:10 +0000 (08:30 +0100)
commit84294c9cfb12a85fb5bc08fb0312ef1feb7eee4c
tree0a849388a1f796461fddd4a5bb4d8fd0eb60fd44
parent2e1c360c7179fea70f07bffdd5890e4e42d0a624
xdg: Use wlr_xdg_surface_get_geometry() to get size

This fixes an issue with havoc not having a valid size on map().

Investigation showed that xdg_surface->current.geometry is set only by
the xdg_surface::set_geometry protocol message, which is optional. If
set_geometry is not called, then we are supposed to compute the size
from the surface buffer(s). wlr_xdg_surface_get_geometry() already
accounts for this, so we just need to use wlr_xdg_surface_get_geometry()
instead of reading xdg_surface->current.geometry directly.
src/xdg.c