mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
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.
This commit is contained in:
parent
2e1c360c71
commit
84294c9cfb
1 changed files with 4 additions and 4 deletions
|
|
@ -325,10 +325,10 @@ xdg_toplevel_view_map(struct view *view)
|
||||||
* dimensions remain zero until handle_commit().
|
* dimensions remain zero until handle_commit().
|
||||||
*/
|
*/
|
||||||
if (wlr_box_empty(&view->pending)) {
|
if (wlr_box_empty(&view->pending)) {
|
||||||
view->pending.width =
|
struct wlr_box size;
|
||||||
xdg_surface->current.geometry.width;
|
wlr_xdg_surface_get_geometry(xdg_surface, &size);
|
||||||
view->pending.height =
|
view->pending.width = size.width;
|
||||||
xdg_surface->current.geometry.height;
|
view->pending.height = size.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue