aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorHiro <Hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-28 14:47:50 +0000
committerHiro <Hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-28 14:47:50 +0000
commit1a0aecf079998f5857314cf298715e1fba1fec82 (patch)
treecdd515e2102ee7d9ee7dcc42358827c74b72c3b4 /src/main.c
parent57c9377aabdd185b0e6d80048c4c41d1271791f7 (diff)
win32: fixed popup with remote command.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@940 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index b558f8fb..49fffdff 100644
--- a/src/main.c
+++ b/src/main.c
@@ -908,8 +908,17 @@ static gint prohibit_duplicate_launch(void)
}
} else if (cmd.exit) {
fd_write_all(sock, "exit\n", 5);
- } else
+ } else {
+#ifdef G_OS_WIN32
+ HWND hwnd;
+
fd_write_all(sock, "popup\n", 6);
+ if (fd_read(sock, (gchar *)&hwnd, sizeof(hwnd)) == sizeof(hwnd))
+ SetForegroundWindow(hwnd);
+#else
+ fd_write_all(sock, "popup\n", 6);
+#endif
+ }
fd_close(sock);
return -1;
@@ -972,7 +981,17 @@ static gboolean lock_socket_input_cb(GIOChannel *source, GIOCondition condition,
fd_gets(sock, buf, sizeof(buf));
if (!strncmp(buf, "popup", 5)) {
+#ifdef G_OS_WIN32
+ HWND hwnd;
+
+ hwnd = (HWND)gdk_win32_drawable_get_handle
+ (GDK_DRAWABLE(mainwin->window->window));
+ fd_write(sock, (gchar *)&hwnd, sizeof(hwnd));
+ if (mainwin->window_hidden)
+ main_window_popup(mainwin);
+#else
main_window_popup(mainwin);
+#endif
} else if (!strncmp(buf, "receive_all", 11)) {
main_window_popup(mainwin);
inc_all_account_mail(mainwin, FALSE);