Skip to content

Commit

Permalink
XInitThreads is called to fix threading issues. For real this time.
Browse files Browse the repository at this point in the history
  • Loading branch information
Corewala committed Jun 8, 2021
1 parent 5e6f0f7 commit 6579f42
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions smother.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/python3 -W ignore::DeprecationWarning
import ctypes
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()

import gi
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 @@ -147,8 +150,6 @@ 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 6579f42

Please sign in to comment.