xwayland: set _NET_WORKAREA property based on usable area

XWayland clients use the _NET_WORKAREA root window property to determine
how much of the screen is not covered by panels/docks. The property is
used for example by Qt to determine areas of the screen that popup menus
should not overlap (see QScreen::availableVirtualGeometry).

Depends on wlroots MR:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4406

v2: prevent calling wlr_xwayland_set_workareas() too early
v3: fix segfault at exit (server->xwayland == NULL)
This commit is contained in:
John Lindgren 2023-10-24 13:49:15 -04:00
parent 22b193254c
commit e2b844235a
3 changed files with 88 additions and 0 deletions

View file

@ -58,5 +58,7 @@ void xwayland_adjust_usable_area(struct view *view,
struct wlr_output_layout *layout, struct wlr_output *output,
struct wlr_box *usable);
void xwayland_update_workarea(struct server *server);
#endif /* HAVE_XWAYLAND */
#endif /* LABWC_XWAYLAND_H */