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();