feat: input handler work

This commit is contained in:
2026-02-25 10:08:29 +01:00
parent dde47e7fac
commit 73fda759c5
10 changed files with 174 additions and 28 deletions

View File

@@ -1,4 +1,5 @@
#include <stdio.h>
#include <assert.h>
#include <wayland-client-core.h>
#include <wayland-client-protocol.h>
@@ -100,6 +101,12 @@ WaylandWindowImpl::~WaylandWindowImpl() { m_running = false; }
void WaylandWindowImpl::OnFrame(IFrameListener fn) { m_on_frame = fn; }
void WaylandWindowImpl::Init() {
auto display = WaylandState::GetInstance()->m_display;
assert(display && "wayland display is not initialized");
wl_display_dispatch_pending(display);
}
bool WaylandWindowImpl::Dispatch() {
if (!m_running) return false;