From 5b1375141bd77c26023fb4a8dc087272be82849a Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sun, 1 Sep 2024 17:18:50 +0300 Subject: [PATCH 1/5] flake.lock: update --- flake.lock | 18 +++++++++--------- nix/default.nix | 7 +++++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index b26cd5e3d5b..a3f905d8cd7 100644 --- a/flake.lock +++ b/flake.lock @@ -16,11 +16,11 @@ ] }, "locked": { - "lastModified": 1725016199, - "narHash": "sha256-2TMk7F2a27ZtOUW/bftkDyZKp3OQ71E5XnfKSUT8HZQ=", + "lastModified": 1725199881, + "narHash": "sha256-jsmipf/u1GFZE5tBUkr56CHMN6VpUWCAjfLIhvQijU0=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "cff00196f0fcf734a2bf164eb0dfdb6e58c5c906", + "rev": "f8a687dd29ff019657498f1bd14da2fbbf0e604b", "type": "github" }, "original": { @@ -93,11 +93,11 @@ ] }, "locked": { - "lastModified": 1724174162, - "narHash": "sha256-fOOBLwil6M9QWMCiSULwjMQzrXhHXUnEqmjHX5ZHeVI=", + "lastModified": 1725188252, + "narHash": "sha256-yBH8c4GDaEAtBrh+BqIlrx5vp6gG/Gu8fQQK63KAQgs=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "16e5c9465f04477d8a3dd48a0a26bf437986336c", + "rev": "c12ab785ce1982f82594aff03b3104c598186ddd", "type": "github" }, "original": { @@ -154,11 +154,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1724819573, - "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", + "lastModified": 1725103162, + "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", + "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", "type": "github" }, "original": { diff --git a/nix/default.nix b/nix/default.nix index 64796a90197..6a4979f11a3 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -89,6 +89,10 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov DIRTY = lib.optionalString (commit == "") "dirty"; HASH = commit; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ hyprwayland-scanner jq @@ -97,8 +101,7 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov ninja pkg-config python3 # for udis86 - # re-add after https://github.com/NixOS/nixpkgs/pull/214906 hits nixos-unstable - # wayland-scanner + wayland-scanner ]; outputs = [ From 4b5b8a763073593ac48af3bdcf04cf65b219120b Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sun, 1 Sep 2024 18:14:14 +0300 Subject: [PATCH 2/5] flake.lock: update xdph --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index a3f905d8cd7..5921488e9eb 100644 --- a/flake.lock +++ b/flake.lock @@ -209,11 +209,11 @@ ] }, "locked": { - "lastModified": 1724073926, - "narHash": "sha256-nWlUL43jOFHf+KW6Hqrx+W/r1XdXuDyb0wC/SrHsOu4=", + "lastModified": 1725203619, + "narHash": "sha256-Am4gwnu5q+6GFKQ3NnEkXeZYKIZ9rv9mRLk+DYqX9Zs=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "a08ecbbf33598924e93542f737fc6169a26b481e", + "rev": "8e5ca2a299e95a3bdcdb84cfbe08f31b0690ecd5", "type": "github" }, "original": { From 7a24e564f43d4c24abf2ec4e5351007df2f8926c Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sun, 1 Sep 2024 19:37:25 +0300 Subject: [PATCH 3/5] flake.lock: update xdph again --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 5921488e9eb..99a544e21e5 100644 --- a/flake.lock +++ b/flake.lock @@ -209,11 +209,11 @@ ] }, "locked": { - "lastModified": 1725203619, - "narHash": "sha256-Am4gwnu5q+6GFKQ3NnEkXeZYKIZ9rv9mRLk+DYqX9Zs=", + "lastModified": 1725203932, + "narHash": "sha256-VLULC/OnI+6R9KEP2OIGk+uLJJsfRlaLouZ5gyFd2+Y=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "8e5ca2a299e95a3bdcdb84cfbe08f31b0690ecd5", + "rev": "2425e8f541525fa7409d9f26a8ffaf92a3767251", "type": "github" }, "original": { From 8bbeee20414bc0e20992076632d7d44ede443a1c Mon Sep 17 00:00:00 2001 From: Sungyoon Cho Date: Mon, 2 Sep 2024 01:44:33 +0900 Subject: [PATCH 4/5] textinput: send deactivate to ime on destory ti (#7614) --- src/managers/input/TextInput.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/managers/input/TextInput.cpp b/src/managers/input/TextInput.cpp index 5bff9fed7e2..711935a75f2 100644 --- a/src/managers/input/TextInput.cpp +++ b/src/managers/input/TextInput.cpp @@ -23,9 +23,7 @@ void CTextInput::initCallbacks() { listeners.disable = INPUT->events.disable.registerListener([this](std::any p) { onDisabled(); }); listeners.commit = INPUT->events.onCommit.registerListener([this](std::any p) { onCommit(); }); listeners.destroy = INPUT->events.destroy.registerListener([this](std::any p) { - const auto INPUT = pV3Input.lock(); - if (INPUT && INPUT->current.enabled && focusedSurface()) - g_pInputManager->m_sIMERelay.deactivateIME(this); + g_pInputManager->m_sIMERelay.deactivateIME(this); g_pInputManager->m_sIMERelay.removeTextInput(this); }); } else { @@ -40,6 +38,7 @@ void CTextInput::initCallbacks() { listeners.destroy = INPUT->events.destroy.registerListener([this](std::any p) { listeners.surfaceUnmap.reset(); listeners.surfaceDestroy.reset(); + g_pInputManager->m_sIMERelay.deactivateIME(this); g_pInputManager->m_sIMERelay.removeTextInput(this); }); } @@ -192,7 +191,7 @@ wl_client* CTextInput::client() { } void CTextInput::commitStateToIME(SP ime) { - if (isV3()) { + if (isV3() && !pV3Input.expired()) { const auto INPUT = pV3Input.lock(); if (INPUT->current.surrounding.updated) @@ -202,7 +201,7 @@ void CTextInput::commitStateToIME(SP ime) { if (INPUT->current.contentType.updated) ime->textContentType(INPUT->current.contentType.hint, INPUT->current.contentType.purpose); - } else { + } else if (!pV1Input.expired()) { const auto INPUT = pV1Input.lock(); if (INPUT->pendingSurrounding.isPending) From 6934e7aa2b300bc4565855a4092fb34de8a9a8d2 Mon Sep 17 00:00:00 2001 From: Sungyoon Cho Date: Mon, 2 Sep 2024 04:33:31 +0900 Subject: [PATCH 5/5] textinput: don't deactivate ime if another ti is focused (#7617) --- src/managers/input/TextInput.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/managers/input/TextInput.cpp b/src/managers/input/TextInput.cpp index 711935a75f2..de14f1ab7a3 100644 --- a/src/managers/input/TextInput.cpp +++ b/src/managers/input/TextInput.cpp @@ -23,8 +23,9 @@ void CTextInput::initCallbacks() { listeners.disable = INPUT->events.disable.registerListener([this](std::any p) { onDisabled(); }); listeners.commit = INPUT->events.onCommit.registerListener([this](std::any p) { onCommit(); }); listeners.destroy = INPUT->events.destroy.registerListener([this](std::any p) { - g_pInputManager->m_sIMERelay.deactivateIME(this); g_pInputManager->m_sIMERelay.removeTextInput(this); + if (!g_pInputManager->m_sIMERelay.getFocusedTextInput()) + g_pInputManager->m_sIMERelay.deactivateIME(this); }); } else { const auto INPUT = pV1Input.lock(); @@ -38,8 +39,9 @@ void CTextInput::initCallbacks() { listeners.destroy = INPUT->events.destroy.registerListener([this](std::any p) { listeners.surfaceUnmap.reset(); listeners.surfaceDestroy.reset(); - g_pInputManager->m_sIMERelay.deactivateIME(this); g_pInputManager->m_sIMERelay.removeTextInput(this); + if (!g_pInputManager->m_sIMERelay.getFocusedTextInput()) + g_pInputManager->m_sIMERelay.deactivateIME(this); }); } }