mirror of
https://github.com/swaywm/sway.git
synced 2024-12-26 15:06:34 +01:00
input/seat: simplify seat_is_input_allowed()
Use an early return to make the code more readable.
This commit is contained in:
parent
e8a0205607
commit
c6edbb7e5a
1 changed files with 11 additions and 11 deletions
|
@ -1092,7 +1092,9 @@ void seat_configure_xcursor(struct sway_seat *seat) {
|
|||
|
||||
bool seat_is_input_allowed(struct sway_seat *seat,
|
||||
struct wlr_surface *surface) {
|
||||
if (server.session_lock.locked) {
|
||||
if (!server.session_lock.locked) {
|
||||
return true;
|
||||
}
|
||||
if (server.session_lock.lock == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1104,8 +1106,6 @@ bool seat_is_input_allowed(struct sway_seat *seat,
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static void send_unfocus(struct sway_container *con, void *data) {
|
||||
if (con->view) {
|
||||
|
|
Loading…
Reference in a new issue