1
0
mirror of https://github.com/slgobinath/SafeEyes.git synced 2024-12-24 23:50:46 +01:00

Fix multi-screen issue in unity desktop

This commit is contained in:
Gobinath 2017-12-28 11:08:21 -05:00
parent 2957f12c25
commit 7aa47ec561

View File

@ -197,10 +197,15 @@ class BreakScreen(object):
# Fix flickering screen in KDE by setting opacity to 1 # Fix flickering screen in KDE by setting opacity to 1
window.set_opacity(0.9) window.set_opacity(0.9)
# In Unity, move the window before present
if self.context['desktop'] == 'unity':
window.move(x, y)
window.stick() window.stick()
window.set_keep_above(True) window.set_keep_above(True)
window.present() 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() window.fullscreen()
def __update_count_down(self, count): def __update_count_down(self, count):