surface-tools/surface-tools-20180914git-check-and-fork.patch
Silvan Calarco 4bfa5f1674 autorotate: apply patch to check rotation at startup and fork
penmon: initial patch to support devices autodetection
autorotate: disable session autostart (done in sddm Xsetup) [release 20180914git-2mamba;Sat Sep 15 2018]
2024-01-05 18:12:41 +01:00

18 lines
621 B
Diff

diff -Nru surface-tools-20180914git.orig/autorotate/autorotate surface-tools-20180914git/autorotate/autorotate
--- surface-tools-20180914git.orig/autorotate/autorotate 2018-09-14 10:58:53.959407234 +0200
+++ surface-tools-20180914git/autorotate/autorotate 2018-09-15 12:58:25.572548316 +0200
@@ -163,5 +163,11 @@
# https://bugzilla.gnome.org/show_bug.cgi?id=622084#c12
signal.signal(signal.SIGINT, signal.SIG_DFL)
- GObject.idle_add(checkRotation)
- Gtk.main()
+ newRef=os.fork()
+ if newRef==0:
+ GObject.idle_add(checkRotation)
+ Gtk.main()
+ else:
+ checkRotation()
+
+