Skip to content

Commit 494b4d4

Browse files
Merge pull request slgobinath#794 from deltragon/x11-fix-fullscreen
x11 (XFCE): fix break screen on multiple monitors
2 parents 41ac8ea + b122b09 commit 494b4d4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

safeeyes/ui/break_screen.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,14 @@ def __show_break_screen(
201201
# Fix flickering screen in KDE by setting opacity to 1
202202
window.set_opacity(0.9)
203203

204-
window.fullscreen_on_monitor(monitor)
205204
window.present()
206205

206+
# Apparently this needs to run after present() (as of GTK 4.20)
207+
# On Wayland, either work seems to work fine
208+
# On X11, calling this before present() always fullscreens only on the
209+
# focused monitor regardless
210+
window.fullscreen_on_monitor(monitor)
211+
207212
# this ensures that none of the buttons is in focus immediately
208213
# otherwise, pressing space presses that button instead of triggering the
209214
# shortcut

0 commit comments

Comments
 (0)