TextInput: ignore enable requests without focus
(cherry picked from commit b35a40b9dfa3e70dbdc11e8383c584164b475420)
This commit is contained in:
parent
84ec97aff2
commit
cc5a249e9e
@ -66,6 +66,11 @@ fn handleEnable(listener: *wl.Listener(*wlr.TextInputV3), _: *wlr.TextInputV3) v
|
|||||||
const text_input = @fieldParentPtr(TextInput, "enable", listener);
|
const text_input = @fieldParentPtr(TextInput, "enable", listener);
|
||||||
const seat: *Seat = @ptrFromInt(text_input.wlr_text_input.seat.data);
|
const seat: *Seat = @ptrFromInt(text_input.wlr_text_input.seat.data);
|
||||||
|
|
||||||
|
if (text_input.wlr_text_input.focused_surface == null) {
|
||||||
|
log.err("client requested to enable text input without focus, ignoring request", .{});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// The same text_input object may be enabled multiple times consecutively
|
// The same text_input object may be enabled multiple times consecutively
|
||||||
// without first disabling it. Enabling a different text input object without
|
// without first disabling it. Enabling a different text input object without
|
||||||
// first disabling the current one is disallowed by the protocol however.
|
// first disabling the current one is disallowed by the protocol however.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user