aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Alexander Orzechowski <alex@ozal.ski>2024-01-18 10:04:26 -0500
committerLibravatar Kirill Primak <vyivel@eclair.cafe>2024-01-18 18:36:54 +0300
commit9a579666068d62b9354a39941e1ac8c1f4a58093 (patch)
tree79d5d36f27b43f1d68969242211a0e01395c6bfc /sway/input/seat.c
parentscene_graph: Port seatop_move_tiling indicators (diff)
downloadsway-9a579666068d62b9354a39941e1ac8c1f4a58093.tar.gz
sway-9a579666068d62b9354a39941e1ac8c1f4a58093.tar.zst
sway-9a579666068d62b9354a39941e1ac8c1f4a58093.zip
scene_graph: Port ext_session_v1
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index d2cd1ba4..b8daa297 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1060,19 +1060,10 @@ void seat_configure_xcursor(struct sway_seat *seat) {
1060 1060
1061bool seat_is_input_allowed(struct sway_seat *seat, 1061bool seat_is_input_allowed(struct sway_seat *seat,
1062 struct wlr_surface *surface) { 1062 struct wlr_surface *surface) {
1063 if (!server.session_lock.locked) { 1063 if (server.session_lock.lock) {
1064 return true; 1064 return sway_session_lock_has_surface(server.session_lock.lock, surface);
1065 }
1066 if (server.session_lock.lock == NULL) {
1067 return false;
1068 }
1069 struct wlr_session_lock_surface_v1 *lock_surf;
1070 wl_list_for_each(lock_surf, &server.session_lock.lock->surfaces, link) {
1071 if (lock_surf->surface == surface) {
1072 return true;
1073 }
1074 } 1065 }
1075 return false; 1066 return true;
1076} 1067}
1077 1068
1078static void send_unfocus(struct sway_container *con, void *data) { 1069static void send_unfocus(struct sway_container *con, void *data) {
@@ -1277,8 +1268,8 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) {
1277 } else { 1268 } else {
1278 seat_set_workspace_focus(seat, node); 1269 seat_set_workspace_focus(seat, node);
1279 } 1270 }
1280 if (server.session_lock.locked) { 1271 if (server.session_lock.lock) {
1281 seat_set_focus_surface(seat, server.session_lock.focused, false); 1272 seat_set_focus_surface(seat, server.session_lock.lock->focused, false);
1282 } 1273 }
1283} 1274}
1284 1275