Skip to content

Commit c1343c6

Browse files
committed
cinnamon-settings.py: Handle SIGINT so unmap/destroy handlers in
cs_applets and cs_panels can unhighlight any panels if terminated this way.
1 parent 13c8676 commit c1343c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import gi
2121
gi.require_version('Gtk', '3.0')
2222
gi.require_version('XApp', '1.0')
23-
from gi.repository import Gio, Gtk, Pango, Gdk, XApp
23+
from gi.repository import Gio, GLib, Gtk, Pango, Gdk, XApp
2424

2525
CURRENT_PATH = os.path.dirname(os.path.abspath(__file__))
2626
PYTHON_CS_MODULE_PATH = os.path.join(CURRENT_PATH, "modules")
@@ -301,6 +301,7 @@ def __init__(self, parsed_args):
301301
self.search_entry.connect("icon-press", self.onClearSearchBox)
302302

303303
self.window.connect("destroy", self._quit)
304+
GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGTERM, self._quit)
304305

305306
self.builder.connect_signals(self)
306307
self.sidePages: typing.List[SidePageData] = []

0 commit comments

Comments
 (0)