Skip to content

fix: sync fullscreen state with WM and move GTK calls to main thread#415

Open
MauricioBarrientos wants to merge 1 commit into
linuxmint:masterfrom
MauricioBarrientos:fix/fullscreen-gtk-thread-safety
Open

fix: sync fullscreen state with WM and move GTK calls to main thread#415
MauricioBarrientos wants to merge 1 commit into
linuxmint:masterfrom
MauricioBarrientos:fix/fullscreen-gtk-thread-safety

Conversation

@MauricioBarrientos
Copy link
Copy Markdown

  • Fixes Fullscreen Exit #385: Connect window-state-event to sync self.fullscreen with the actual WM state. In Hyprland/Wayland the WM can toggle fullscreen independently, causing desync. full_screen_mode() now reads gdk_window.get_state() instead of blindly toggling the internal flag.

  • Fixes GTK/X11 crashes from GTK calls inside @async_function worker threads #409: Remove direct GTK calls from @async_function threads. Move info_menu_item.set_sensitive(False) into before_play() which runs via @idle_function on the main thread. Add set_cursor() helper decorated with @idle_function so Xtream cursor changes in reload() are marshaled to the main GTK thread, preventing X11 BadRequest errors.

- Fixes linuxmint#385: Connect window-state-event to sync self.fullscreen with
  the actual WM state. In Hyprland/Wayland the WM can toggle fullscreen
  independently, causing desync. full_screen_mode() now reads
  gdk_window.get_state() instead of blindly toggling the internal flag.

- Fixes linuxmint#409: Remove direct GTK calls from @async_function threads.
  Move info_menu_item.set_sensitive(False) into before_play() which
  runs via @idle_function on the main thread. Add set_cursor() helper
  decorated with @idle_function so Xtream cursor changes in reload()
  are marshaled to the main GTK thread, preventing X11 BadRequest errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GTK/X11 crashes from GTK calls inside @async_function worker threads Fullscreen Exit

1 participant