From 2e399199f3a0fd2ec29656cc6ba673393d7f2eba Mon Sep 17 00:00:00 2001 From: Mars Ultor Date: Mon, 22 Dec 2025 00:19:48 -0600 Subject: [PATCH] got to surface commit --- src/main.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 81c04bb..858efc1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -110,6 +110,35 @@ static const ext_session_lock_v1_listener lock_listener = { .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(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[]) { std::shared_ptr application_state = std::make_shared();