mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-27 01:41:02 -05:00
Add XWayland support
With Cage becoming more popular since its mention on Phoronix and
therefore getting more use-cases than just my own project, add XWayland
support. The refactoring of 2cf40f7 makes this much easier. Note that
this is a no-cost addition for those of us not using XWayland as it is a
compile-time option that needs to be explicitly enabled by adding
`-Dxwayland=true` to your meson command.
This commit is contained in:
parent
48f8f69556
commit
a34c726a1c
10 changed files with 213 additions and 3 deletions
10
output.c
10
output.c
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <wayland-server.h>
|
||||
|
|
@ -19,6 +21,9 @@
|
|||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include <wlr/util/log.h>
|
||||
#if CAGE_HAS_XWAYLAND
|
||||
#include <wlr/xwayland.h>
|
||||
#endif
|
||||
|
||||
#include "output.h"
|
||||
#include "server.h"
|
||||
|
|
@ -76,6 +81,11 @@ view_for_each_surface(struct cg_view *view, struct render_data *rdata,
|
|||
case CAGE_XDG_SHELL_VIEW:
|
||||
wlr_xdg_surface_for_each_surface(view->xdg_surface, iterator, rdata);
|
||||
break;
|
||||
#ifdef CAGE_HAS_XWAYLAND
|
||||
case CAGE_XWAYLAND_VIEW:
|
||||
wlr_surface_for_each_surface(view->wlr_surface, iterator, rdata);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
wlr_log(WLR_ERROR, "Unrecognized view type: %d", view->type);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue