mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-12-22 05:19:48 +01:00
core: update renderer on late scale changes
ref https://github.com/hyprwm/Hyprland/issues/5842, in case a compositor sends the scale after configure
This commit is contained in:
parent
415262065f
commit
1651b02cc1
2 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,9 @@ static void handlePreferredScale(void* data, wp_fractional_scale_v1* wp_fraction
|
|||
const auto PSURF = (CSessionLockSurface*)data;
|
||||
PSURF->fractionalScale = scale / 120.0;
|
||||
Debug::log(LOG, "got fractional {}", PSURF->fractionalScale);
|
||||
|
||||
if (PSURF->readyForFrame)
|
||||
PSURF->onScaleUpdate();
|
||||
}
|
||||
|
||||
static const wp_fractional_scale_v1_listener fsListener = {
|
||||
|
@ -103,6 +106,10 @@ void CSessionLockSurface::configure(const Vector2D& size_, uint32_t serial_) {
|
|||
render();
|
||||
}
|
||||
|
||||
void CSessionLockSurface::onScaleUpdate() {
|
||||
configure(size, serial);
|
||||
}
|
||||
|
||||
static void handleDone(void* data, wl_callback* wl_callback, uint32_t callback_data) {
|
||||
const auto PSURF = (CSessionLockSurface*)data;
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ class CSessionLockSurface {
|
|||
|
||||
void render();
|
||||
void onCallback();
|
||||
void onScaleUpdate();
|
||||
|
||||
private:
|
||||
COutput* output = nullptr;
|
||||
|
|
Loading…
Reference in a new issue