From bfa6faeb51ca7c0f0ab344b68b54c8622149f628 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 2 Mar 2015 07:56:54 +0000 Subject: [PATCH] #819: hook our own ctrl-c handler, which also works with gtk3! git-svn-id: https://xpra.org/svn/Xpra/trunk@8736 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/platform/win32/gui.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xpra/platform/win32/gui.py b/src/xpra/platform/win32/gui.py index 4d637ed72a..ceb2c5dde2 100644 --- a/src/xpra/platform/win32/gui.py +++ b/src/xpra/platform/win32/gui.py @@ -535,6 +535,12 @@ def handle_console_event(self, event): log.info("received console event %s", str(event_name).replace("_EVENT", "")) else: log.warn("unknown console event: %s", event_name) + if event==win32con.CTRL_C_EVENT: + self.client.signal_disconnect_and_quit(0, "CTRL_C") + return 1 + if event==win32con.CTRL_CLOSE_EVENT: + self.client.signal_disconnect_and_quit(0, "CTRL_CLOSE") + return 1 return 0