Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Enrico Tröger enrico.troeger@uvena.de Date: Sun, 07 Apr 2019 09:33:05 UTC Commit: d951db1e8a9f4ad154055a2534c1e965df6a44b7 https://github.com/geany/geany/commit/d951db1e8a9f4ad154055a2534c1e965df6a44...
Log Message: ----------- On Windows, raise the main window only when needed for IPC calls
We need to explicitly raise the main window on IPC commands only when opening files and similar. For query commands like "doclist" the focus should stay on the remote instance.
Modified Paths: -------------- src/socket.c
Modified: src/socket.c 13 lines changed, 7 insertions(+), 6 deletions(-) =================================================================== @@ -326,15 +326,16 @@ gint socket_init(gint argc, gchar **argv)
/* remote command mode, here we have another running instance and want to use it */
-#ifdef G_OS_WIN32 - /* first we send a request to retrieve the window handle and focus the window */ - socket_fd_write_all(sock, "window\n", 7); - if (socket_fd_read(sock, (gchar *)&hwnd, sizeof(hwnd)) == sizeof(hwnd)) - SetForegroundWindow(hwnd); -#endif /* now we send the command line args */ if (argc > 1) { +#ifdef G_OS_WIN32 + /* first we send a request to retrieve the window handle and focus the window */ + socket_fd_write_all(sock, "window\n", 7); + if (socket_fd_read(sock, (gchar *)&hwnd, sizeof(hwnd)) == sizeof(hwnd)) + SetForegroundWindow(hwnd); +#endif + send_open_command(sock, argc, argv); }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).