aboutsummaryrefslogtreecommitdiffstats
path: root/sway/server.c
diff options
context:
space:
mode:
authorLibravatar Las <las@protonmail.ch>2019-01-26 00:45:06 +0100
committerLibravatar emersion <contact@emersion.fr>2019-01-30 19:53:59 +0100
commitcedde21c967ae5be0d1a9c7656ab8c6b3186ae42 (patch)
tree26c784ea3d6546d762a96b131a2cf23cee9a9c38 /sway/server.c
parentcriteria & scratchpad verify if show in another workspace (#3522) (diff)
downloadsway-cedde21c967ae5be0d1a9c7656ab8c6b3186ae42.tar.gz
sway-cedde21c967ae5be0d1a9c7656ab8c6b3186ae42.tar.zst
sway-cedde21c967ae5be0d1a9c7656ab8c6b3186ae42.zip
Implement pointer-constraints-unstable-v1
Diffstat (limited to 'sway/server.c')
-rw-r--r--sway/server.c9
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 @@
10#include <wlr/types/wlr_compositor.h> 10#include <wlr/types/wlr_compositor.h>
11#include <wlr/types/wlr_data_control_v1.h> 11#include <wlr/types/wlr_data_control_v1.h>
12#include <wlr/types/wlr_export_dmabuf_v1.h> 12#include <wlr/types/wlr_export_dmabuf_v1.h>
13#include <wlr/types/wlr_gamma_control_v1.h>
14#include <wlr/types/wlr_gamma_control.h> 13#include <wlr/types/wlr_gamma_control.h>
14#include <wlr/types/wlr_gamma_control_v1.h>
15#include <wlr/types/wlr_gtk_primary_selection.h> 15#include <wlr/types/wlr_gtk_primary_selection.h>
16#include <wlr/types/wlr_idle.h> 16#include <wlr/types/wlr_idle.h>
17#include <wlr/types/wlr_layer_shell_v1.h> 17#include <wlr/types/wlr_layer_shell_v1.h>
18#include <wlr/types/wlr_pointer_constraints_v1.h>
18#include <wlr/types/wlr_screencopy_v1.h> 19#include <wlr/types/wlr_screencopy_v1.h>
19#include <wlr/types/wlr_server_decoration.h> 20#include <wlr/types/wlr_server_decoration.h>
20#include <wlr/types/wlr_xcursor_manager.h> 21#include <wlr/types/wlr_xcursor_manager.h>
@@ -105,6 +106,12 @@ bool server_init(struct sway_server *server) {
105 server->xdg_decoration.notify = handle_xdg_decoration; 106 server->xdg_decoration.notify = handle_xdg_decoration;
106 wl_list_init(&server->xdg_decorations); 107 wl_list_init(&server->xdg_decorations);
107 108
109 server->pointer_constraints =
110 wlr_pointer_constraints_v1_create(server->wl_display);
111 server->pointer_constraint.notify = handle_pointer_constraint;
112 wl_signal_add(&server->pointer_constraints->events.new_constraint,
113 &server->pointer_constraint);
114
108 server->presentation = 115 server->presentation =
109 wlr_presentation_create(server->wl_display, server->backend); 116 wlr_presentation_create(server->wl_display, server->backend);
110 117