aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-03 21:25:42 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-04 18:47:48 -0400
commitd2d050d59cf19c583b100e6e3637ed9a06a8863f (patch)
treee7b42d8f1c6aaae6beb004a71dd49933abbc2af3
parentAdd hidpi support to swaylock (diff)
downloadsway-d2d050d59cf19c583b100e6e3637ed9a06a8863f.tar.gz
sway-d2d050d59cf19c583b100e6e3637ed9a06a8863f.tar.zst
sway-d2d050d59cf19c583b100e6e3637ed9a06a8863f.zip
Address review feedback
-rw-r--r--include/sway/input/seat.h2
-rw-r--r--sway/input/cursor.c2
-rw-r--r--sway/input/seat.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 4b0fc3c1..d1cfbe4c 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -91,6 +91,6 @@ void seat_apply_config(struct sway_seat *seat, struct seat_config *seat_config);
91 91
92struct seat_config *seat_get_config(struct sway_seat *seat); 92struct seat_config *seat_get_config(struct sway_seat *seat);
93 93
94bool seat_allow_input(struct sway_seat *seat, struct wlr_surface *surface); 94bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface);
95 95
96#endif 96#endif
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index c56445eb..195ddce9 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -146,7 +146,7 @@ static void cursor_send_pointer_motion(struct sway_cursor *cursor,
146 146
147 // send pointer enter/leave 147 // send pointer enter/leave
148 if (surface != NULL) { 148 if (surface != NULL) {
149 if (seat_allow_input(cursor->seat, surface)) { 149 if (seat_is_input_allowed(cursor->seat, surface)) {
150 wlr_seat_pointer_notify_enter(seat, surface, sx, sy); 150 wlr_seat_pointer_notify_enter(seat, surface, sx, sy);
151 wlr_seat_pointer_notify_motion(seat, time, sx, sy); 151 wlr_seat_pointer_notify_motion(seat, time, sx, sy);
152 } 152 }
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 0e26dde4..0699324a 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -353,7 +353,8 @@ void seat_configure_xcursor(struct sway_seat *seat) {
353 seat->cursor->cursor->y); 353 seat->cursor->cursor->y);
354} 354}
355 355
356bool seat_allow_input(struct sway_seat *seat, struct wlr_surface *surface) { 356bool seat_is_input_allowed(struct sway_seat *seat,
357 struct wlr_surface *surface) {
357 struct wl_client *client = wl_resource_get_client(surface->resource); 358 struct wl_client *client = wl_resource_get_client(surface->resource);
358 return !seat->exclusive_client || seat->exclusive_client == client; 359 return !seat->exclusive_client || seat->exclusive_client == client;
359} 360}
@@ -379,7 +380,7 @@ void seat_set_focus_warp(struct sway_seat *seat,
379 wl_list_remove(&seat_con->link); 380 wl_list_remove(&seat_con->link);
380 wl_list_insert(&seat->focus_stack, &seat_con->link); 381 wl_list_insert(&seat->focus_stack, &seat_con->link);
381 382
382 if (container->type == C_VIEW && !seat_allow_input( 383 if (container->type == C_VIEW && !seat_is_input_allowed(
383 seat, container->sway_view->surface)) { 384 seat, container->sway_view->surface)) {
384 wlr_log(L_DEBUG, "Refusing to set focus, input is inhibited"); 385 wlr_log(L_DEBUG, "Refusing to set focus, input is inhibited");
385 return; 386 return;