got to surface commit
This commit is contained in:
29
src/main.cpp
29
src/main.cpp
@@ -110,6 +110,35 @@ static const ext_session_lock_v1_listener lock_listener = {
|
|||||||
.finished = lock_handle_finished,
|
.finished = lock_handle_finished,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void lock_surface_handle_configure(
|
||||||
|
void* data,
|
||||||
|
ext_session_lock_surface_v1* lock_surface,
|
||||||
|
uint32_t serial,
|
||||||
|
uint32_t width,
|
||||||
|
uint32_t height)
|
||||||
|
{
|
||||||
|
auto& out = *static_cast<state::Output*>(data);
|
||||||
|
|
||||||
|
// MUST acknowledge the configure
|
||||||
|
ext_session_lock_surface_v1_ack_configure(lock_surface, serial);
|
||||||
|
|
||||||
|
out.surface_width = width;
|
||||||
|
out.surface_height = height;
|
||||||
|
out.configured = true;
|
||||||
|
|
||||||
|
spdlog::info("Lock surface configured: {}x{}", width, height);
|
||||||
|
|
||||||
|
// TODO: Create EGL surface here with these dimensions
|
||||||
|
// TODO: Render first frame
|
||||||
|
|
||||||
|
// For now, just commit an empty surface
|
||||||
|
wl_surface_commit(out.wl_out_surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const ext_session_lock_surface_v1_listener lock_surface_listener = {
|
||||||
|
.configure = lock_surface_handle_configure,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
int main (int argc, char *argv[]) {
|
int main (int argc, char *argv[]) {
|
||||||
std::shared_ptr<state::LockScreenState> application_state = std::make_shared<state::LockScreenState>();
|
std::shared_ptr<state::LockScreenState> application_state = std::make_shared<state::LockScreenState>();
|
||||||
|
|||||||
Reference in New Issue
Block a user