diff options
author | Las <[email protected]> | 2019-01-26 00:45:06 +0100 |
---|---|---|
committer | emersion <[email protected]> | 2019-01-30 19:53:59 +0100 |
commit | cedde21c967ae5be0d1a9c7656ab8c6b3186ae42 (patch) | |
tree | 26c784ea3d6546d762a96b131a2cf23cee9a9c38 /sway/server.c | |
parent | 5cb3d4769cb055f542e6cb5fc979dd8f0fb9a8f3 (diff) |
Implement pointer-constraints-unstable-v1
Diffstat (limited to 'sway/server.c')
-rw-r--r-- | sway/server.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sway/server.c b/sway/server.c index 43dc3900..82262585 100644 --- a/sway/server.c +++ b/sway/server.c @@ -10,11 +10,12 @@ #include <wlr/types/wlr_compositor.h> #include <wlr/types/wlr_data_control_v1.h> #include <wlr/types/wlr_export_dmabuf_v1.h> -#include <wlr/types/wlr_gamma_control_v1.h> #include <wlr/types/wlr_gamma_control.h> +#include <wlr/types/wlr_gamma_control_v1.h> #include <wlr/types/wlr_gtk_primary_selection.h> #include <wlr/types/wlr_idle.h> #include <wlr/types/wlr_layer_shell_v1.h> +#include <wlr/types/wlr_pointer_constraints_v1.h> #include <wlr/types/wlr_screencopy_v1.h> #include <wlr/types/wlr_server_decoration.h> #include <wlr/types/wlr_xcursor_manager.h> @@ -105,6 +106,12 @@ bool server_init(struct sway_server *server) { server->xdg_decoration.notify = handle_xdg_decoration; wl_list_init(&server->xdg_decorations); + server->pointer_constraints = + wlr_pointer_constraints_v1_create(server->wl_display); + server->pointer_constraint.notify = handle_pointer_constraint; + wl_signal_add(&server->pointer_constraints->events.new_constraint, + &server->pointer_constraint); + server->presentation = wlr_presentation_create(server->wl_display, server->backend); |