From 16bedd8b739808193b527f173c0ae2053926b736 Mon Sep 17 00:00:00 2001 From: Fabrice Date: Tue, 10 Feb 2026 12:43:12 +0100 Subject: redraw request --- src/window.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/window.cc') diff --git a/src/window.cc b/src/window.cc index 496027b..1a59189 100644 --- a/src/window.cc +++ b/src/window.cc @@ -87,6 +87,7 @@ bool wayc_window_init(struct window_s *window, const char *name, window->surface = surface; window->xdg_surface = xdg_surface; window->xdg_toplevel = xdg_toplevel; + window->loop = loop; return true; } @@ -106,3 +107,12 @@ void wayc_window_deinit(struct window_s *window) { window->xdg_surface = nullptr; window->surface = nullptr; } + +void wayc_window_redraw(struct window_s *window, struct eventloop_s *loop) { + wayc_notnull(window); + wayc_notnull(loop); + + struct event_s event = WAYC_EVENT_FRAME(window); + wayc_vec_push(&loop->events, &event); + wl_surface_commit(window->surface); +} \ No newline at end of file -- cgit v1.2.3