diff options
author | 2025-05-16 14:49:27 +0200 | |
---|---|---|
committer | 2025-05-16 14:49:27 +0200 | |
commit | 3f38c1534a4a41a7959420ec8f6decfb8b86df9e (patch) | |
tree | c04dfcc48937ec7d8fe647fefef8a367af90f3ba /src/main/ui/x11/ui.c | |
parent | 073bb171f27f3a2fd57fa813b8ec182a2351b7da (diff) | |
download | tris-3f38c1534a4a41a7959420ec8f6decfb8b86df9e.tar.gz tris-3f38c1534a4a41a7959420ec8f6decfb8b86df9e.zip |
Add the function for UI resize event
Diffstat (limited to 'src/main/ui/x11/ui.c')
-rw-r--r-- | src/main/ui/x11/ui.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/ui/x11/ui.c b/src/main/ui/x11/ui.c index cb4401f..8bdd93c 100644 --- a/src/main/ui/x11/ui.c +++ b/src/main/ui/x11/ui.c @@ -106,6 +106,12 @@ ui_on_expose(XEvent event, void (*draw_frame)()) glXSwapBuffers(display, window); } +static void +ui_on_resize(XEvent event) +{ + if (event.type != ConfigureNotify) return; +} + void ui_loop(void (*draw_frame)()) { @@ -113,6 +119,7 @@ ui_loop(void (*draw_frame)()) while (1) { XNextEvent(display, &event); ui_on_expose(event, draw_frame); + ui_on_resize(event); if (event.type == KeyPress) { break; } |