diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-04-02 16:10:55 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-04-02 16:10:55 +0100 |
| commit | fc0a7af7ba5c52f7a70309020f5cb27c19d068e6 (patch) | |
| tree | 713e146de0a28212ca5965054ce04447efc80d43 /src/managers/input/InputMethodPopup.cpp | |
| parent | 05eb2d4af212f279cc3c25ae9c654bce627db05c (diff) | |
IME: fix blurry ime on scaled
ref #5387
Diffstat (limited to 'src/managers/input/InputMethodPopup.cpp')
| -rw-r--r-- | src/managers/input/InputMethodPopup.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/managers/input/InputMethodPopup.cpp b/src/managers/input/InputMethodPopup.cpp index 36f25dd7..bc2876ad 100644 --- a/src/managers/input/InputMethodPopup.cpp +++ b/src/managers/input/InputMethodPopup.cpp @@ -57,6 +57,13 @@ void CInputPopup::onMap() { updateBox(); damageEntire(); + + const auto PMONITOR = g_pCompositor->getMonitorFromVector(globalBox().middle()); + + if (!PMONITOR) + return; + + g_pProtocolManager->m_pFractionalScaleProtocolManager->setPreferredScaleForSurface(surface.wlr(), PMONITOR->scale); } void CInputPopup::onUnmap() { @@ -121,7 +128,7 @@ void CInputPopup::updateBox() { cursorBoxLocal = {0, 0, (int)parentBox.w, (int)parentBox.h}; } - Vector2D currentPopupSize = {surface.wlr()->current.width, surface.wlr()->current.height}; + Vector2D currentPopupSize = surface.getViewporterCorrectedSize(); if (cursorBoxLocal != lastBoxLocal || currentPopupSize != lastPopupSize) damageEntire(); |
