Skip to content

Commit

Permalink
XInitThreads is called to fix threading issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Corewala committed Jun 8, 2021
1 parent 8a3d3ac commit 5e6f0f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions smother.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import yaml
import time
import ctypes
gi.require_version('Gtk', '3.0')
from threading import Thread
from gi.repository import Gtk
Expand Down Expand Up @@ -146,6 +147,8 @@ def status_check(self):
vpnstatus = False
time.sleep(1)

x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()
win = Smother()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Expand Down

0 comments on commit 5e6f0f7

Please sign in to comment.