Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/sugar-runner-window.c6
-rw-r--r--scripts/sugar-runner.in18
2 files changed, 6 insertions, 18 deletions
diff --git a/lib/sugar-runner-window.c b/lib/sugar-runner-window.c
index 8590056..77f60e1 100644
--- a/lib/sugar-runner-window.c
+++ b/lib/sugar-runner-window.c
@@ -53,12 +53,6 @@ sugar_runner_window_wait(void)
DisplayHeight(display, 0) == configure_event.height);
}
- if (event.type == ClientMessage &&
- event.xclient.data.l[0] == wm_delete_window) {
- XCloseDisplay(display);
- return FALSE;
- }
-
return TRUE;
}
diff --git a/scripts/sugar-runner.in b/scripts/sugar-runner.in
index 1b1a50a..3c2f458 100644
--- a/scripts/sugar-runner.in
+++ b/scripts/sugar-runner.in
@@ -12,7 +12,6 @@ from gi.repository import SugarRunner
helpers_dir = "@helpersdir@"
-xinit_process = None
window_process = None
result = 0
@@ -22,15 +21,8 @@ def _usr1_signal_handler(number, frame):
result = 1
-def _term_signal_handler(number, frame):
- global window_process
- global xinit_process
-
- for process in xinit_process, window_process:
- if process:
- process.terminate()
-
- sys.exit(0)
+def _setpgrp_preexec():
+ os.setpgrp()
def _get_screen_dpi():
@@ -147,6 +139,9 @@ def _setup_variables(args, home_dirs):
# Disable Unity custom gtk scrollbars
os.environ["LIBOVERLAY_SCROLLBAR"] = "0"
+ # Allow to close with Shift+Alt+Q
+ os.environ["SUGAR_EMULATOR"] = "yes"
+
parser = argparse.ArgumentParser(description="Run sugar")
parser.add_argument("--resolution", help="screen resolution")
parser.add_argument("--output", help="name of the output")
@@ -185,11 +180,10 @@ else:
os.environ["SUGAR_RUNNER_PID"] = str(os.getpid())
-signal.signal(signal.SIGTERM, _term_signal_handler)
signal.signal(signal.SIGUSR1, _usr1_signal_handler)
try:
- xinit_process = subprocess.Popen(xinit_args)
+ xinit_process = subprocess.Popen(xinit_args, preexec_fn=_setpgrp_preexec)
result = None
while result is None: