diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 12:43:12 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 12:43:12 +0100 |
| commit | 16bedd8b739808193b527f173c0ae2053926b736 (patch) | |
| tree | b37a60612db1ba717a6262df79700fd2d7e25585 /src/window.cc | |
| parent | 03ef673d02aa11ec187264d571aeface8cef1482 (diff) | |
redraw request
Diffstat (limited to 'src/window.cc')
| -rw-r--r-- | src/window.cc | 10 |
1 files changed, 10 insertions, 0 deletions
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 |
