Skip to content

Commit

Permalink
Fix background portal task idling in the background
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Dec 26, 2023
1 parent ccbfbfe commit 4081d7f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
from gi.repository import Gtk, Adw, GLib, Gio
from random import randint
import time

import os
from threading import Timer

def receive_autostart(self, *args):
print("autostart enabled..!?")
print(args)
os._exit(0)

def request_autostart():
bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
Expand Down Expand Up @@ -54,5 +56,8 @@ def request_autostart():

request_autostart()

thread = Timer(10, os._exit, [0])
thread.start()

loop = GLib.MainLoop()
loop.run()

0 comments on commit 4081d7f

Please sign in to comment.