feat: input handler work
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user