IME: fix blurry ime on scaled

ref #5387
This commit is contained in:
Vaxry 2024-04-02 16:10:55 +01:00
parent 05eb2d4af2
commit fc0a7af7ba

View file

@ -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();