mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
chase: input inhibit removal
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4440
This commit is contained in:
parent
d1fbb3c7cc
commit
3e614814fe
6 changed files with 5 additions and 107 deletions
|
|
@ -358,15 +358,6 @@ cursor_update_image(struct seat *seat)
|
|||
cursor_names[cursor]);
|
||||
}
|
||||
|
||||
bool
|
||||
input_inhibit_blocks_surface(struct seat *seat, struct wl_resource *resource)
|
||||
{
|
||||
struct wl_client *inhibiting_client =
|
||||
seat->active_client_while_inhibited;
|
||||
return inhibiting_client
|
||||
&& inhibiting_client != wl_resource_get_client(resource);
|
||||
}
|
||||
|
||||
static bool
|
||||
update_pressed_surface(struct seat *seat, struct cursor_context *ctx)
|
||||
{
|
||||
|
|
@ -472,8 +463,7 @@ cursor_update_common(struct server *server, struct cursor_context *ctx,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (ctx->surface && !input_inhibit_blocks_surface(seat,
|
||||
ctx->surface->resource)) {
|
||||
if (ctx->surface) {
|
||||
/*
|
||||
* Cursor is over an input-enabled client surface. The
|
||||
* cursor image will be set by request_cursor_notify()
|
||||
|
|
|
|||
|
|
@ -457,8 +457,7 @@ handle_compositor_keybindings(struct keyboard *keyboard,
|
|||
if (event->state == WL_KEYBOARD_KEY_STATE_RELEASED) {
|
||||
if (cur_keybind && cur_keybind->on_release) {
|
||||
key_state_bound_key_remove(event->keycode);
|
||||
if (seat->server->session_lock_manager->locked
|
||||
|| seat->active_client_while_inhibited) {
|
||||
if (seat->server->session_lock_manager->locked) {
|
||||
cur_keybind = NULL;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -476,13 +475,10 @@ handle_compositor_keybindings(struct keyboard *keyboard,
|
|||
}
|
||||
|
||||
/*
|
||||
* Ignore labwc keybindings if input is inhibited
|
||||
* Ignore labwc keybindings if the session is locked.
|
||||
* It's important to do this after key_state_set_pressed() to ensure
|
||||
* _all_ key press/releases are registered
|
||||
*/
|
||||
if (seat->active_client_while_inhibited) {
|
||||
return false;
|
||||
}
|
||||
if (seat->server->session_lock_manager->locked) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue