mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 09:25:59 +01:00
IME: Fixup IME popup candidate windows position when scale is not 1.0 (#8117)
This commit is contained in:
parent
f309681d4a
commit
22b1370ae5
1 changed files with 2 additions and 2 deletions
|
@ -100,14 +100,14 @@ void CInputPopup::updateBox() {
|
||||||
cursorBoxParent = {0, 0, (int)parentBox.w, (int)parentBox.h};
|
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());
|
CMonitor* pMonitor = g_pCompositor->getMonitorFromVector(parentBox.middle());
|
||||||
|
|
||||||
Vector2D popupOffset(0, 0);
|
Vector2D popupOffset(0, 0);
|
||||||
|
|
||||||
if (parentBox.y + cursorBoxParent.y + cursorBoxParent.height + currentPopupSize.y > pMonitor->vecPosition.y + pMonitor->vecSize.y)
|
if (parentBox.y + cursorBoxParent.y + cursorBoxParent.height + currentPopupSize.y > pMonitor->vecPosition.y + pMonitor->vecSize.y)
|
||||||
popupOffset.y = -currentPopupSize.y;
|
popupOffset.y -= currentPopupSize.y;
|
||||||
else
|
else
|
||||||
popupOffset.y = cursorBoxParent.height;
|
popupOffset.y = cursorBoxParent.height;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue