aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorfanlumaster(Fany Full) <[email protected]>2024-10-15 01:03:16 +0800
committerGitHub <[email protected]>2024-10-14 18:03:16 +0100
commit22b1370ae512c92d84bbcd4cff2a3f8a4496c994 (patch)
tree73c8fbf8f1b8a4e11be6ed4112864e31cce550be
parentf309681d4a78d1c12d8a04fe37075a50a750c2ec (diff)
downloadHyprland-22b1370ae512c92d84bbcd4cff2a3f8a4496c994.tar.gz
Hyprland-22b1370ae512c92d84bbcd4cff2a3f8a4496c994.zip
IME: Fixup IME popup candidate windows position when scale is not 1.0 (#8117)
-rw-r--r--src/managers/input/InputMethodPopup.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/input/InputMethodPopup.cpp b/src/managers/input/InputMethodPopup.cpp
index a8757030..cf48f2a5 100644
--- a/src/managers/input/InputMethodPopup.cpp
+++ b/src/managers/input/InputMethodPopup.cpp
@@ -100,14 +100,14 @@ void CInputPopup::updateBox() {
cursorBoxParent = {0, 0, (int)parentBox.w, (int)parentBox.h};
}
- Vector2D currentPopupSize = surface->getViewporterCorrectedSize();
+ Vector2D currentPopupSize = surface->getViewporterCorrectedSize() / surface->resource()->current.scale;
CMonitor* pMonitor = g_pCompositor->getMonitorFromVector(parentBox.middle());
Vector2D popupOffset(0, 0);
if (parentBox.y + cursorBoxParent.y + cursorBoxParent.height + currentPopupSize.y > pMonitor->vecPosition.y + pMonitor->vecSize.y)
- popupOffset.y = -currentPopupSize.y;
+ popupOffset.y -= currentPopupSize.y;
else
popupOffset.y = cursorBoxParent.height;