[commit] wayland: invalidate window on scale changes

This makes it not require new frames for new scale to be properly applied.
This commit is contained in:
Quantum 2021-08-01 17:51:44 -04:00 committed by Geoffrey McRae
parent 14839dc54e
commit 8d78a5aa95
2 changed files with 4 additions and 0 deletions

View File

@ -119,6 +119,8 @@ void waylandEGLSwapBuffers(EGLDisplay display, EGLSurface surface, const struct
app_handleResizeEvent(wlWm.width, wlWm.height, wl_fixed_to_double(wlWm.scale), app_handleResizeEvent(wlWm.width, wlWm.height, wl_fixed_to_double(wlWm.scale),
(struct Border) {0, 0, 0, 0}); (struct Border) {0, 0, 0, 0});
app_invalidateWindow();
waylandStopWaitFrame();
wlWm.needsResize = false; wlWm.needsResize = false;
} }

View File

@ -48,6 +48,8 @@ void waylandWindowUpdateScale(void)
wlWm.scale = maxScale; wlWm.scale = maxScale;
wlWm.fractionalScale = wl_fixed_from_int(wl_fixed_to_int(maxScale)) != maxScale; wlWm.fractionalScale = wl_fixed_from_int(wl_fixed_to_int(maxScale)) != maxScale;
wlWm.needsResize = true; wlWm.needsResize = true;
app_invalidateWindow();
waylandStopWaitFrame();
} }
} }