aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpraschke <stel@comfy.monster>2023-12-31 17:39:32 +0000
committerIsaac Freund <mail@isaacfreund.com>2024-01-01 23:02:55 -0600
commit55ed16efd1fedb67eaa91d9d94b258a729f67ab6 (patch)
tree30d34e61fe68fd9147e229fa6bd81c1bd039b98e
parent8f497a35700081ea664a38c30e8c4ef4abefb697 (diff)
downloadriver-55ed16efd1fedb67eaa91d9d94b258a729f67ab6.tar.gz
river-55ed16efd1fedb67eaa91d9d94b258a729f67ab6.tar.xz
input-method: address nits
-rw-r--r--river/InputRelay.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/river/InputRelay.zig b/river/InputRelay.zig
index bdd1022..d3ffb6a 100644
--- a/river/InputRelay.zig
+++ b/river/InputRelay.zig
@@ -94,8 +94,12 @@ fn handleInputMethodDestroy(
input_method: *wlr.InputMethodV2,
) void {
const self = @fieldParentPtr(Self, "input_method_destroy", listener);
-
assert(input_method == self.input_method);
+
+ self.input_method_commit.link.remove();
+ self.grab_keyboard.link.remove();
+ self.input_method_destroy.link.remove();
+
self.input_method = null;
const text_input = self.getFocusedTextInput() orelse return;
@@ -182,10 +186,8 @@ pub fn sendInputMethodState(self: *Self, wlr_text_input: *wlr.TextInputV3) void
}
input_method.sendDone();
- // TODO: pass intent, display popup size
}
-/// Update the current focused surface. Surface must belong to the same seat.
pub fn setSurfaceFocus(self: *Self, wlr_surface: ?*wlr.Surface) void {
var new_text_input: ?*TextInput = null;
@@ -210,6 +212,7 @@ pub fn setSurfaceFocus(self: *Self, wlr_surface: ?*wlr.Surface) void {
if (wlr_surface) |surface| {
if (text_input.wlr_text_input.resource.getClient() == surface.resource.getClient()) {
+ assert(new_text_input == null);
new_text_input = text_input;
}
}