mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-29 10:53:49 -07:00
IME: Improve handling of text-input and ime-relay (#5147)
* input: Handling multiple surfaces for the text-input-v1 protocol implementation and imporve InputMethodRelay logic fixes #2708 * clang-format * minor style nits --------- Co-authored-by: Vaxry <vaxry@vaxry.net>
This commit is contained in:
@@ -113,8 +113,6 @@ void CTextInputV1ProtocolManager::removeTI(STextInputV1* pTI) {
|
||||
// if ((*TI)->resourceImpl)
|
||||
// wl_resource_destroy((*TI)->resourceImpl);
|
||||
|
||||
g_pInputManager->m_sIMERelay.removeTextInput((*TI)->pTextInput);
|
||||
|
||||
std::erase_if(m_pClients, [&](const auto& other) { return other.get() == pTI; });
|
||||
}
|
||||
|
||||
@@ -165,7 +163,11 @@ void CTextInputV1ProtocolManager::createTI(wl_client* client, wl_resource* resou
|
||||
|
||||
void CTextInputV1ProtocolManager::handleActivate(wl_client* client, wl_resource* resource, wl_resource* seat, wl_resource* surface) {
|
||||
const auto PTI = tiFromResource(resource);
|
||||
PTI->pTextInput->hyprListener_textInputEnable.emit(nullptr);
|
||||
if (!surface) {
|
||||
Debug::log(WARN, "Text-input-v1 PTI{:x}: No surface to activate text input on!", (uintptr_t)PTI);
|
||||
return;
|
||||
}
|
||||
PTI->pTextInput->hyprListener_textInputEnable.emit(surface);
|
||||
}
|
||||
|
||||
void CTextInputV1ProtocolManager::handleDeactivate(wl_client* client, wl_resource* resource, wl_resource* seat) {
|
||||
|
Reference in New Issue
Block a user