diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-06-16 20:22:13 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-06-16 20:22:13 +0200 |
commit | 9b3526d12d9d6c828fbd4a29dec2295ae2f735a5 (patch) | |
tree | d5d892df6112c8e50eafaa65e74846445166e68c /src | |
parent | 606273e4343ff3bad3f4525f2e2cf6f9fbbd491a (diff) | |
download | arctica-greeter-9b3526d12d9d6c828fbd4a29dec2295ae2f735a5.tar.gz arctica-greeter-9b3526d12d9d6c828fbd4a29dec2295ae2f735a5.tar.bz2 arctica-greeter-9b3526d12d9d6c828fbd4a29dec2295ae2f735a5.zip |
src/arctica-greeter.vala: Have MATE's marco WM as window manager for Arctica Greeter. Makes handling windows opened via some of the indicators much more organic.
Diffstat (limited to 'src')
-rw-r--r-- | src/arctica-greeter.vala | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala index 321c74f..eaf39cb 100644 --- a/src/arctica-greeter.vala +++ b/src/arctica-greeter.vala @@ -300,6 +300,8 @@ public class ArcticaGreeter public void show () { debug ("Showing main window"); + if (!test_mode) + main_window.fullscreen (); main_window.show (); main_window.get_window ().focus (Gdk.CURRENT_TIME); main_window.set_keyboard_state (); @@ -789,6 +791,7 @@ public class ArcticaGreeter string systemd_stderr; int systemd_exitcode = 0; + Pid marco_pid = 0; Pid nmapplet_pid = 0; var indicator_list = AGSettings.get_strv(AGSettings.KEY_INDICATORS); @@ -813,6 +816,24 @@ public class ArcticaGreeter activate_upower(); + try + { + string[] argv; + + Shell.parse_argv ("marco", out argv); + Process.spawn_async (null, + argv, + null, + SpawnFlags.SEARCH_PATH, + null, + out marco_pid); + debug ("Launched marco WM. PID: %d", marco_pid); + } + catch (Error e) + { + warning ("Error starting the Marco Window Manager: %s", e.message); + } + greeter.greeter_ready.connect (() => { debug ("Showing greeter"); greeter.show (); @@ -955,6 +976,17 @@ public class ArcticaGreeter atspi_pid = 0; } + if (marco_pid != 0) + { + Posix.kill (marco_pid, Posix.SIGTERM); + int status; + Posix.waitpid (marco_pid, out status, 0); + if (Process.if_exited (status)) + debug ("Marco Window Manager exited with return value %d", Process.exit_status (status)); + else + debug ("Marco Window Manager terminated with signal %d", Process.term_sig (status)); + marco_pid = 0; + } } var screen = Gdk.Screen.get_default (); |