- Attempt to compensate for compositor stopping
This commit is contained in:
parent
48107b1f69
commit
8b507a5323
3 changed files with 10 additions and 7 deletions
|
|
@ -82,17 +82,20 @@ class Discover:
|
|||
Gtk.main()
|
||||
|
||||
def periodic_run(self, data=None):
|
||||
self.voice_overlay.check_composite()
|
||||
if self.voice_overlay.needsredraw:
|
||||
self.voice_overlay.redraw()
|
||||
|
||||
if self.text_overlay:
|
||||
self.text_overlay.check_composite()
|
||||
self.text_overlay.tick()
|
||||
if self.text_overlay.needsredraw:
|
||||
self.text_overlay.redraw()
|
||||
|
||||
if self.notification_overlay and self.notification_overlay.enabled:
|
||||
if self.notification_overlay:
|
||||
self.notification_overlay.check_composite()
|
||||
self.notification_overlay.tick()
|
||||
if self.notification_overlay.needsredraw:
|
||||
if self.notification_overlay.enabled and self.notification_overlay.needsredraw:
|
||||
self.notification_overlay.redraw()
|
||||
return True
|
||||
|
||||
|
|
|
|||
|
|
@ -334,3 +334,8 @@ class OverlayWindow(Gtk.Window):
|
|||
def set_task(self, visible):
|
||||
self.set_skip_pager_hint(not visible)
|
||||
self.set_skip_taskbar_hint(not visible)
|
||||
|
||||
def check_composite(self):
|
||||
screen = self.get_screen()
|
||||
if not self.compositing == screen.is_composited():
|
||||
self.needsredraw = True
|
||||
|
|
@ -285,11 +285,6 @@ class VoiceOverlayWindow(OverlayWindow):
|
|||
else:
|
||||
user["friendlyname"] = user["username"]
|
||||
self.sort_list(self.userlist)
|
||||
screen = self.get_screen()
|
||||
# Check if composite state has changed
|
||||
if not self.compositing == screen.is_composited():
|
||||
alt = True
|
||||
self.compositing = screen.is_composited()
|
||||
if alt:
|
||||
self.needsredraw = True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue