diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-25 15:45:26 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-25 15:45:26 +0100 |
| commit | f3dcaa18f2c97d39963df8414c80c4689c2882c4 (patch) | |
| tree | 51d60b4692c2b712ac848e16a97fc67e3a177733 /main.c | |
| parent | 12aa9ddc7337161c3e6ed18414787789a9c8dc22 (diff) | |
| download | glitch-f3dcaa18f2c97d39963df8414c80c4689c2882c4.tar.gz | |
Add microphone status indicator
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -20,6 +20,7 @@ static void* expose_timer_thread(void* arg) { sleep(1); if (wm.dpy != NULL) { + XLockDisplay(wm.dpy); XEvent event = {0}; event.type = Expose; event.xexpose.window = wm.root; @@ -32,6 +33,7 @@ static void* expose_timer_thread(void* arg) { // This is thread-safe - XSendEvent is designed for this. XSendEvent(wm.dpy, wm.root, False, ExposureMask, &event); XFlush(wm.dpy); + XUnlockDisplay(wm.dpy); } } return NULL; @@ -84,16 +86,7 @@ int main(int argc, char *argv[]) { handle_motion_notify(); break; case ClientMessage: - { - static Atom redraw_atom = None; - if (redraw_atom == None) redraw_atom = XInternAtom(wm.dpy, "GLITCH_WIDGET_REDRAW", False); - - if (wm.ev.xclient.message_type == redraw_atom) { - redraw_widgets(); - } else { - handle_client_message(); - } - } + handle_client_message(); break; case ButtonPress: handle_button_press(); |
