mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-15 05:34:33 -04:00
Add screencopy
This commit is contained in:
parent
69340921a4
commit
da6b6c208e
1 changed files with 10 additions and 0 deletions
10
cage.c
10
cage.c
|
|
@ -30,6 +30,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include <wlr/types/wlr_xdg_decoration_v1.h>
|
#include <wlr/types/wlr_xdg_decoration_v1.h>
|
||||||
#include <wlr/types/wlr_xdg_shell.h>
|
#include <wlr/types/wlr_xdg_shell.h>
|
||||||
|
#include <wlr/types/wlr_screencopy_v1.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#if CAGE_HAS_XWAYLAND
|
#if CAGE_HAS_XWAYLAND
|
||||||
#include <wlr/xwayland.h>
|
#include <wlr/xwayland.h>
|
||||||
|
|
@ -169,6 +170,7 @@ main(int argc, char *argv[])
|
||||||
struct wlr_data_device_manager *data_device_mgr = NULL;
|
struct wlr_data_device_manager *data_device_mgr = NULL;
|
||||||
struct wlr_server_decoration_manager *server_decoration_manager = NULL;
|
struct wlr_server_decoration_manager *server_decoration_manager = NULL;
|
||||||
struct wlr_xdg_decoration_manager_v1 *xdg_decoration_manager = NULL;
|
struct wlr_xdg_decoration_manager_v1 *xdg_decoration_manager = NULL;
|
||||||
|
struct wlr_screencopy_manager_v1 *screencopy_manager = NULL;
|
||||||
struct wlr_xdg_shell *xdg_shell = NULL;
|
struct wlr_xdg_shell *xdg_shell = NULL;
|
||||||
#if CAGE_HAS_XWAYLAND
|
#if CAGE_HAS_XWAYLAND
|
||||||
struct wlr_xwayland *xwayland = NULL;
|
struct wlr_xwayland *xwayland = NULL;
|
||||||
|
|
@ -293,6 +295,13 @@ main(int argc, char *argv[])
|
||||||
WLR_SERVER_DECORATION_MANAGER_MODE_SERVER :
|
WLR_SERVER_DECORATION_MANAGER_MODE_SERVER :
|
||||||
WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT);
|
WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT);
|
||||||
|
|
||||||
|
screencopy_manager = wlr_screencopy_manager_v1_create(server.wl_display);
|
||||||
|
if (!screencopy_manager) {
|
||||||
|
wlr_log(WLR_ERROR, "Unable to create the screencopy manager");
|
||||||
|
ret = 1;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
#if CAGE_HAS_XWAYLAND
|
#if CAGE_HAS_XWAYLAND
|
||||||
xwayland = wlr_xwayland_create(server.wl_display, compositor, true);
|
xwayland = wlr_xwayland_create(server.wl_display, compositor, true);
|
||||||
if (!xwayland) {
|
if (!xwayland) {
|
||||||
|
|
@ -374,6 +383,7 @@ end:
|
||||||
wl_event_source_remove(sigint_source);
|
wl_event_source_remove(sigint_source);
|
||||||
wl_event_source_remove(sigterm_source);
|
wl_event_source_remove(sigterm_source);
|
||||||
seat_destroy(server.seat);
|
seat_destroy(server.seat);
|
||||||
|
wlr_screencopy_manager_v1_destroy(screencopy_manager);
|
||||||
wlr_server_decoration_manager_destroy(server_decoration_manager);
|
wlr_server_decoration_manager_destroy(server_decoration_manager);
|
||||||
wlr_xdg_decoration_manager_v1_destroy(xdg_decoration_manager);
|
wlr_xdg_decoration_manager_v1_destroy(xdg_decoration_manager);
|
||||||
wlr_xdg_shell_destroy(xdg_shell);
|
wlr_xdg_shell_destroy(xdg_shell);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue