mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-25 01:41:06 -05:00
add wlr_virtual_keyboard_manager_v1 and wlr_virtual_pointer_manager_v1
This commit is contained in:
parent
46f0ec1b72
commit
bd5b20e1fa
4 changed files with 86 additions and 14 deletions
20
cage.c
20
cage.c
|
|
@ -35,6 +35,8 @@
|
|||
#include <wlr/types/wlr_single_pixel_buffer_v1.h>
|
||||
#include <wlr/types/wlr_subcompositor.h>
|
||||
#include <wlr/types/wlr_viewporter.h>
|
||||
#include <wlr/types/wlr_virtual_keyboard_v1.h>
|
||||
#include <wlr/types/wlr_virtual_pointer_v1.h>
|
||||
#if CAGE_HAS_XWAYLAND
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
#endif
|
||||
|
|
@ -270,6 +272,8 @@ main(int argc, char *argv[])
|
|||
struct wlr_single_pixel_buffer_manager_v1 *single_pixel_buffer = NULL;
|
||||
struct wlr_xdg_output_manager_v1 *output_manager = NULL;
|
||||
struct wlr_gamma_control_manager_v1 *gamma_control_manager = NULL;
|
||||
struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard = NULL;
|
||||
struct wlr_virtual_pointer_manager_v1 *virtual_pointer = NULL;
|
||||
struct wlr_viewporter *viewporter = NULL;
|
||||
struct wlr_presentation *presentation = NULL;
|
||||
struct wlr_xdg_shell *xdg_shell = NULL;
|
||||
|
|
@ -482,6 +486,22 @@ main(int argc, char *argv[])
|
|||
goto end;
|
||||
}
|
||||
|
||||
virtual_keyboard = wlr_virtual_keyboard_manager_v1_create(server.wl_display);
|
||||
if (!virtual_keyboard) {
|
||||
wlr_log(WLR_ERROR, "Unable to create the virtual keyboard manager");
|
||||
ret = 1;
|
||||
goto end;
|
||||
}
|
||||
wl_signal_add(&virtual_keyboard->events.new_virtual_keyboard, &server.new_virtual_keyboard);
|
||||
|
||||
virtual_pointer = wlr_virtual_pointer_manager_v1_create(server.wl_display);
|
||||
if (!virtual_pointer) {
|
||||
wlr_log(WLR_ERROR, "Unable to create the virtual pointer manager");
|
||||
ret = 1;
|
||||
goto end;
|
||||
}
|
||||
wl_signal_add(&virtual_pointer->events.new_virtual_pointer, &server.new_virtual_pointer);
|
||||
|
||||
#if CAGE_HAS_XWAYLAND
|
||||
xwayland = wlr_xwayland_create(server.wl_display, compositor, true);
|
||||
if (!xwayland) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue