summaryrefslogtreecommitdiff
path: root/src/window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.cc')
-rw-r--r--src/window.cc10
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