mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
no no null confures
This commit is contained in:
parent
0127370429
commit
0bd620384d
2 changed files with 6 additions and 13 deletions
|
@ -58,22 +58,19 @@ CSessionLockSurface::CSessionLockSurface(COutput* output) : output(output) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
configure(output->size, {});
|
|
||||||
|
|
||||||
ext_session_lock_surface_v1_add_listener(lockSurface, &lockListener, this);
|
ext_session_lock_surface_v1_add_listener(lockSurface, &lockListener, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSessionLockSurface::configure(const Vector2D& size_, std::optional<uint32_t> serial_) {
|
void CSessionLockSurface::configure(const Vector2D& size_, uint32_t serial_) {
|
||||||
Debug::log(LOG, "configure with serial {}", serial_.value_or(0));
|
Debug::log(LOG, "configure with serial {}", serial_);
|
||||||
|
|
||||||
serial = serial_.value_or(0);
|
serial = serial_;
|
||||||
size = (size_ * fractionalScale).floor();
|
size = (size_ * fractionalScale).floor();
|
||||||
logicalSize = size_;
|
logicalSize = size_;
|
||||||
|
|
||||||
Debug::log(LOG, "Configuring surface for logical {} and pixel {}", logicalSize, size);
|
Debug::log(LOG, "Configuring surface for logical {} and pixel {}", logicalSize, size);
|
||||||
|
|
||||||
if (serial_.has_value())
|
ext_session_lock_surface_v1_ack_configure(lockSurface, serial);
|
||||||
ext_session_lock_surface_v1_ack_configure(lockSurface, serial);
|
|
||||||
|
|
||||||
if (fractional)
|
if (fractional)
|
||||||
wp_viewport_set_destination(viewport, logicalSize.x, logicalSize.y);
|
wp_viewport_set_destination(viewport, logicalSize.x, logicalSize.y);
|
||||||
|
@ -101,10 +98,7 @@ void CSessionLockSurface::configure(const Vector2D& size_, std::optional<uint32_
|
||||||
|
|
||||||
readyForFrame = true;
|
readyForFrame = true;
|
||||||
|
|
||||||
if (serial_.has_value())
|
render();
|
||||||
render();
|
|
||||||
else
|
|
||||||
eglSwapBuffers(g_pEGL->eglDisplay, eglSurface);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handleDone(void* data, wl_callback* wl_callback, uint32_t callback_data) {
|
static void handleDone(void* data, wl_callback* wl_callback, uint32_t callback_data) {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include <wayland-egl.h>
|
#include <wayland-egl.h>
|
||||||
#include "../helpers/Vector2D.hpp"
|
#include "../helpers/Vector2D.hpp"
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
#include <optional>
|
|
||||||
|
|
||||||
class COutput;
|
class COutput;
|
||||||
class CRenderer;
|
class CRenderer;
|
||||||
|
@ -17,7 +16,7 @@ class CSessionLockSurface {
|
||||||
CSessionLockSurface(COutput* output);
|
CSessionLockSurface(COutput* output);
|
||||||
~CSessionLockSurface();
|
~CSessionLockSurface();
|
||||||
|
|
||||||
void configure(const Vector2D& size, std::optional<uint32_t> serial);
|
void configure(const Vector2D& size, uint32_t serial);
|
||||||
|
|
||||||
bool readyForFrame = false;
|
bool readyForFrame = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue