Skip to content

Commit

Permalink
Merge branch 'hyprwm:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kaeeraa authored Sep 2, 2024
2 parents b300f2f + 6934e7a commit 0c20101
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = [
Expand Down
11 changes: 6 additions & 5 deletions src/managers/input/TextInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +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) {
const auto INPUT = pV3Input.lock();
if (INPUT && INPUT->current.enabled && focusedSurface())
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();
Expand All @@ -41,6 +40,8 @@ void CTextInput::initCallbacks() {
listeners.surfaceUnmap.reset();
listeners.surfaceDestroy.reset();
g_pInputManager->m_sIMERelay.removeTextInput(this);
if (!g_pInputManager->m_sIMERelay.getFocusedTextInput())
g_pInputManager->m_sIMERelay.deactivateIME(this);
});
}
}
Expand Down Expand Up @@ -192,7 +193,7 @@ wl_client* CTextInput::client() {
}

void CTextInput::commitStateToIME(SP<CInputMethodV2> ime) {
if (isV3()) {
if (isV3() && !pV3Input.expired()) {
const auto INPUT = pV3Input.lock();

if (INPUT->current.surrounding.updated)
Expand All @@ -202,7 +203,7 @@ void CTextInput::commitStateToIME(SP<CInputMethodV2> 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)
Expand Down

0 comments on commit 0c20101

Please sign in to comment.