diff options
author | 2025-05-17 00:40:05 +0200 | |
---|---|---|
committer | 2025-05-17 00:40:05 +0200 | |
commit | 41d2026f05527a73c4521e1a153848242ecf0b1a (patch) | |
tree | 576cbe5e82567c75a7c2bc38c7788c64e2555a97 | |
parent | 896fe291a63f8f67f7e4fe3917139c5cbba10951 (diff) | |
download | tris-41d2026f05527a73c4521e1a153848242ecf0b1a.tar.gz tris-41d2026f05527a73c4521e1a153848242ecf0b1a.zip |
Move out draw_frame from expose event
-rw-r--r-- | src/main/ui/x11/ui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/ui/x11/ui.c b/src/main/ui/x11/ui.c index 0ca06f3..1dac2b7 100644 --- a/src/main/ui/x11/ui.c +++ b/src/main/ui/x11/ui.c @@ -109,8 +109,6 @@ static void ui_on_expose(XEvent event, void (*draw_frame)()) { if (event.type != Expose) return; - draw_frame(); - glXSwapBuffers(display, window); } static void @@ -137,6 +135,8 @@ ui_loop(void (*draw_frame)()) ui_on_resize(event); ui_on_keypress(event); + draw_frame(); + glXSwapBuffers(display, window); } cleanup(); |