mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 21:13:48 -07:00
textinput: fix ime activation in some edge cases (#7660)
* textinput: clear ti3 state when focused surface gets destroyed * textinput: send enter to newly created ti in focus
This commit is contained in:
@@ -24,10 +24,9 @@ CTextInputV3::CTextInputV3(SP<CZwpTextInputV3> resource_) : resource(resource_)
|
||||
current = pending;
|
||||
serial++;
|
||||
|
||||
if (wasEnabled && !current.enabled) {
|
||||
current.reset();
|
||||
if (wasEnabled && !current.enabled)
|
||||
events.disable.emit();
|
||||
} else if (!wasEnabled && current.enabled)
|
||||
else if (!wasEnabled && current.enabled)
|
||||
events.enable.emit();
|
||||
else
|
||||
events.onCommit.emit();
|
||||
@@ -53,12 +52,12 @@ CTextInputV3::CTextInputV3(SP<CZwpTextInputV3> resource_) : resource(resource_)
|
||||
pending.box.cursorBox = {x, y, w, h};
|
||||
});
|
||||
|
||||
resource->setEnable([this](CZwpTextInputV3* r) { pending.enabled = true; });
|
||||
|
||||
resource->setDisable([this](CZwpTextInputV3* r) {
|
||||
pending.enabled = false;
|
||||
resource->setEnable([this](CZwpTextInputV3* r) {
|
||||
pending.reset();
|
||||
pending.enabled = true;
|
||||
});
|
||||
|
||||
resource->setDisable([this](CZwpTextInputV3* r) { pending.enabled = false; });
|
||||
}
|
||||
|
||||
CTextInputV3::~CTextInputV3() {
|
||||
|
Reference in New Issue
Block a user