From 7aa47ec56141c1b981039ac291c6087012ac36a2 Mon Sep 17 00:00:00 2001 From: Gobinath Date: Thu, 28 Dec 2017 11:08:21 -0500 Subject: [PATCH] Fix multi-screen issue in unity desktop --- safeeyes/BreakScreen.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/safeeyes/BreakScreen.py b/safeeyes/BreakScreen.py index 780cab3..77a9af0 100644 --- a/safeeyes/BreakScreen.py +++ b/safeeyes/BreakScreen.py @@ -197,10 +197,15 @@ class BreakScreen(object): # Fix flickering screen in KDE by setting opacity to 1 window.set_opacity(0.9) + # In Unity, move the window before present + if self.context['desktop'] == 'unity': + window.move(x, y) window.stick() window.set_keep_above(True) window.present() - window.move(x, y) + # In other desktop environments, move the window after present + if self.context['desktop'] != 'unity': + window.move(x, y) window.fullscreen() def __update_count_down(self, count):