From a7f382b431e6eed3f180c71d4175970da096eab9 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Tue, 12 May 2020 19:04:01 +0200 Subject: work --- src/linux/platform.c | 3 +++ src/linux/thread.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/linux') diff --git a/src/linux/platform.c b/src/linux/platform.c index 6083670..f87b4ac 100644 --- a/src/linux/platform.c +++ b/src/linux/platform.c @@ -39,6 +39,7 @@ struct t_platform_window XEvent event; char *clipboard_str; s32 clipboard_strlen; + bool do_draw; Atom xdnd_req; Atom xdnd_source; @@ -682,6 +683,7 @@ platform_window platform_open_window_ex(char *name, u16 width, u16 height, u16 m window.next_cursor_type = CURSOR_DEFAULT; window.clipboard_str = 0; window.clipboard_strlen = 0; + window.do_draw = true; static int att[] = { @@ -979,6 +981,7 @@ void platform_handle_events(platform_window *window, mouse_input *mouse, keyboar mouse->move_y = 0; mouse->scroll_state = 0; keyboard->text_changed = false; + window->do_draw = true; XClientMessageEvent m; diff --git a/src/linux/thread.c b/src/linux/thread.c index b6295ef..f7c4c3c 100644 --- a/src/linux/thread.c +++ b/src/linux/thread.c @@ -48,7 +48,7 @@ inline void thread_join(thread *thread) } } -bool thread_tryjoin(thread *thread) +inline bool thread_tryjoin(thread *thread) { if (thread->valid) { @@ -59,6 +59,11 @@ bool thread_tryjoin(thread *thread) return false; } +inline void thread_exit() +{ + pthread_exit(0); +} + inline void thread_stop(thread *thread) { if (thread->valid) -- cgit v1.2.3-70-g09d2