aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2008-07-04 06:14:01 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2008-07-04 06:14:01 +0000
commit12139f54d758b74db632208d4e7402ebcb9f844d (patch)
tree44eefe328f0d72a003d4b970eda10ace16b62332 /src/main.c
parent1b66de3fded1a3aefdd31e21ac99c9f5b290b56b (diff)
win32: handle window messages even if console is initialized.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2025 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index 42fea369..4052b5a2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1007,19 +1007,16 @@ static void register_system_events(void)
ATOM klass;
HINSTANCE hmodule = GetModuleHandle(NULL);
- if (hwnd)
- return;
- if (ctrl_handler_set)
- return;
-
- if (init_console_done) {
+ if (init_console_done && !ctrl_handler_set) {
debug_print("register_system_events(): SetConsoleCtrlHandler\n");
ctrl_handler_set = SetConsoleCtrlHandler(ctrl_handler, TRUE);
if (!ctrl_handler_set)
g_warning("SetConsoleCtrlHandler() failed\n");
- return;
}
+ if (hwnd)
+ return;
+
debug_print("register_system_events(): RegisterClass\n");
memset(&wclass, 0, sizeof(WNDCLASS));