rootston: create screenshooter interface
This commit is contained in:
parent
3eefd75e7e
commit
05096ab458
|
@ -8,6 +8,7 @@
|
||||||
#include <wlr/types/wlr_wl_shell.h>
|
#include <wlr/types/wlr_wl_shell.h>
|
||||||
#include <wlr/types/wlr_xdg_shell_v6.h>
|
#include <wlr/types/wlr_xdg_shell_v6.h>
|
||||||
#include <wlr/types/wlr_gamma_control.h>
|
#include <wlr/types/wlr_gamma_control.h>
|
||||||
|
#include <wlr/types/wlr_screenshooter.h>
|
||||||
#include <wlr/util/list.h>
|
#include <wlr/util/list.h>
|
||||||
#include "rootston/view.h"
|
#include "rootston/view.h"
|
||||||
#include "rootston/config.h"
|
#include "rootston/config.h"
|
||||||
|
@ -36,6 +37,7 @@ struct roots_desktop {
|
||||||
struct wlr_xdg_shell_v6 *xdg_shell_v6;
|
struct wlr_xdg_shell_v6 *xdg_shell_v6;
|
||||||
struct wlr_xwayland *xwayland;
|
struct wlr_xwayland *xwayland;
|
||||||
struct wlr_gamma_control_manager *gamma_control_manager;
|
struct wlr_gamma_control_manager *gamma_control_manager;
|
||||||
|
struct wlr_screenshooter *screenshooter;
|
||||||
|
|
||||||
struct wl_listener output_add;
|
struct wl_listener output_add;
|
||||||
struct wl_listener output_remove;
|
struct wl_listener output_remove;
|
||||||
|
|
|
@ -154,16 +154,15 @@ struct roots_desktop *desktop_create(struct roots_server *server,
|
||||||
wl_list_init(&desktop->output_remove.link);
|
wl_list_init(&desktop->output_remove.link);
|
||||||
desktop->output_remove.notify = output_remove_notify;
|
desktop->output_remove.notify = output_remove_notify;
|
||||||
|
|
||||||
wl_signal_add(&server->backend->events.output_add,
|
wl_signal_add(&server->backend->events.output_add, &desktop->output_add);
|
||||||
&desktop->output_add);
|
|
||||||
wl_signal_add(&server->backend->events.output_remove,
|
wl_signal_add(&server->backend->events.output_remove,
|
||||||
&desktop->output_remove);
|
&desktop->output_remove);
|
||||||
|
|
||||||
desktop->server = server;
|
desktop->server = server;
|
||||||
desktop->config = config;
|
desktop->config = config;
|
||||||
desktop->layout = wlr_output_layout_create();
|
desktop->layout = wlr_output_layout_create();
|
||||||
desktop->compositor = wlr_compositor_create(
|
desktop->compositor = wlr_compositor_create(server->wl_display,
|
||||||
server->wl_display, server->renderer);
|
server->renderer);
|
||||||
|
|
||||||
desktop->xdg_shell_v6 = wlr_xdg_shell_v6_create(server->wl_display);
|
desktop->xdg_shell_v6 = wlr_xdg_shell_v6_create(server->wl_display);
|
||||||
wl_signal_add(&desktop->xdg_shell_v6->events.new_surface,
|
wl_signal_add(&desktop->xdg_shell_v6->events.new_surface,
|
||||||
|
@ -182,7 +181,8 @@ struct roots_desktop *desktop_create(struct roots_server *server,
|
||||||
desktop->xwayland_surface.notify = handle_xwayland_surface;
|
desktop->xwayland_surface.notify = handle_xwayland_surface;
|
||||||
|
|
||||||
desktop->gamma_control_manager = wlr_gamma_control_manager_create(
|
desktop->gamma_control_manager = wlr_gamma_control_manager_create(
|
||||||
server->wl_display);
|
server->wl_display);
|
||||||
|
desktop->screenshooter = wlr_screenshooter_create(server->wl_display);
|
||||||
|
|
||||||
return desktop;
|
return desktop;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue