mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
Account for space taken up by XWayland panels (as indicated by the _NET_WM_STRUT_PARTIAL property) in the usable_area calculation. This makes it possible to use labwc in a "transitional" setup, where it replaces the X11 window manager and compositor, but most other parts of a existing X11 desktop environment can still be used via XWayland. (Some remaining drawbacks of such a setup would be the lack of desktop icons, and native Wayland clients not showing up in X11-based taskbars.)
71 lines
2 KiB
C
71 lines
2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef LABWC_XWAYLAND_H
|
|
#define LABWC_XWAYLAND_H
|
|
#include "config.h"
|
|
#if HAVE_XWAYLAND
|
|
#include "view.h"
|
|
|
|
struct wlr_compositor;
|
|
struct wlr_output;
|
|
struct wlr_output_layout;
|
|
|
|
struct xwayland_unmanaged {
|
|
struct server *server;
|
|
struct wlr_xwayland_surface *xwayland_surface;
|
|
struct wlr_scene_node *node;
|
|
struct wl_list link;
|
|
|
|
struct mappable mappable;
|
|
|
|
struct wl_listener associate;
|
|
struct wl_listener dissociate;
|
|
struct wl_listener request_activate;
|
|
struct wl_listener request_configure;
|
|
/* struct wl_listener request_fullscreen; */
|
|
struct wl_listener set_geometry;
|
|
struct wl_listener destroy;
|
|
struct wl_listener set_override_redirect;
|
|
};
|
|
|
|
struct xwayland_view {
|
|
struct view base;
|
|
struct wlr_xwayland_surface *xwayland_surface;
|
|
|
|
/* Events unique to XWayland views */
|
|
struct wl_listener associate;
|
|
struct wl_listener dissociate;
|
|
struct wl_listener request_activate;
|
|
struct wl_listener request_configure;
|
|
struct wl_listener set_class;
|
|
struct wl_listener set_decorations;
|
|
struct wl_listener set_override_redirect;
|
|
struct wl_listener set_strut_partial;
|
|
|
|
/* Not (yet) implemented */
|
|
/* struct wl_listener set_role; */
|
|
/* struct wl_listener set_window_type; */
|
|
/* struct wl_listener set_hints; */
|
|
};
|
|
|
|
void xwayland_unmanaged_create(struct server *server,
|
|
struct wlr_xwayland_surface *xsurface, bool mapped);
|
|
|
|
void xwayland_view_create(struct server *server,
|
|
struct wlr_xwayland_surface *xsurface, bool mapped);
|
|
|
|
void xwayland_adjust_stacking_order(struct server *server);
|
|
|
|
struct wlr_xwayland_surface *xwayland_surface_from_view(struct view *view);
|
|
|
|
void xwayland_server_init(struct server *server,
|
|
struct wlr_compositor *compositor);
|
|
void xwayland_server_finish(struct server *server);
|
|
|
|
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 */
|