From af165acb427dd166f2768cf806d28f106bc61fd7 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Tue, 24 Oct 2023 10:33:50 -0400 Subject: xwayland: add wlr_xwayland_set_workareas() This function allows compositors to set the _NET_WORKAREA property on the root window. XWayland clients use _NET_WORKAREA 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). --- include/wlr/xwayland/xwayland.h | 11 +++++++++++ include/xwayland/xwm.h | 1 + 2 files changed, 12 insertions(+) (limited to 'include') diff --git a/include/wlr/xwayland/xwayland.h b/include/wlr/xwayland/xwayland.h index 75e9cdac..cb9e35f0 100644 --- a/include/wlr/xwayland/xwayland.h +++ b/include/wlr/xwayland/xwayland.h @@ -16,6 +16,7 @@ #include #include +struct wlr_box; struct wlr_xwm; struct wlr_data_source; struct wlr_drag; @@ -285,4 +286,14 @@ bool wlr_xwayland_or_surface_wants_focus( enum wlr_xwayland_icccm_input_model wlr_xwayland_icccm_input_model( const struct wlr_xwayland_surface *xsurface); +/** + * Sets the _NET_WORKAREA root window property. The compositor should set + * one workarea per virtual desktop. This indicates the usable geometry + * (relative to the virtual desktop viewport) that is not covered by + * panels, docks, etc. Unfortunately, it is not possible to specify + * per-output workareas. + */ +void wlr_xwayland_set_workareas(struct wlr_xwayland *wlr_xwayland, + const struct wlr_box *workareas, size_t num_workareas); + #endif diff --git a/include/xwayland/xwm.h b/include/xwayland/xwm.h index 7db5d6cb..da3515da 100644 --- a/include/xwayland/xwm.h +++ b/include/xwayland/xwm.h @@ -88,6 +88,7 @@ enum atom_name { DND_ACTION_PRIVATE, NET_CLIENT_LIST, NET_CLIENT_LIST_STACKING, + NET_WORKAREA, ATOM_LAST // keep last }; -- cgit v1.2.3