mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 18:39:48 +01:00
Merge pull request #1318 from dcz-purism/text_input_error
text-input: Don't reject enable requests when unfocused
This commit is contained in:
commit
67a2040cad
1 changed files with 3 additions and 4 deletions
|
@ -175,11 +175,10 @@ static void text_input_commit(struct wl_client *client,
|
||||||
text_input->current_enabled = text_input->pending_enabled;
|
text_input->current_enabled = text_input->pending_enabled;
|
||||||
text_input->current_serial++;
|
text_input->current_serial++;
|
||||||
|
|
||||||
if (text_input->current_enabled && text_input->focused_surface == NULL) {
|
if (text_input->focused_surface == NULL) {
|
||||||
wl_resource_post_error(text_input->resource, 0, "Text input was not"
|
wlr_log(WLR_DEBUG, "Text input commit received without focus\n");
|
||||||
"entered, and cannot be enabled\n");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!old_enabled && text_input->current_enabled) {
|
if (!old_enabled && text_input->current_enabled) {
|
||||||
wlr_signal_emit_safe(&text_input->events.enable, text_input);
|
wlr_signal_emit_safe(&text_input->events.enable, text_input);
|
||||||
} else if (old_enabled && !text_input->current_enabled) {
|
} else if (old_enabled && !text_input->current_enabled) {
|
||||||
|
|
Loading…
Reference in a new issue