Commit 74b1dd87 authored by LRN's avatar LRN

W32: eliminate busy cursor when a rundll32-hosted child runs

Even though GetStartupInfo() in g_win32_run_session_bus() would
tell us that STARTF_FORCEONFEEDBACK flag is not set, it still
affects the rundll32 process for some reason.

This means that Windows WM changes mouse cursor to IDC_APPSTARTING for
a few seconds when rundll32 runs g_win32_run_session_bus(). Since
g_win32_run_session_bus() never satisfies the conditions set by
STARTF_FORCEONFEEDBACK, the busy cursor only goes away after a

Fix this by explicitly running GetMessage(). To ensure that GetMessage()
doesn't block, post a quit message immediately before calling it.
parent 5efc8686
......@@ -1355,6 +1355,25 @@ idle_timeout_cb (GDBusDaemon *daemon, gpointer user_data)
g_main_loop_quit (loop);
static void
turn_off_the_starting_cursor (void)
MSG msg;
BOOL bRet;
PostQuitMessage (0);
while ((bRet = GetMessage (&msg, 0, 0, 0)) != 0)
if (bRet == -1)
TranslateMessage (&msg);
DispatchMessage (&msg);
__declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow);
__declspec(dllexport) void CALLBACK
......@@ -1365,6 +1384,8 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow
const char *address;
GError *error = NULL;
turn_off_the_starting_cursor ();
if (g_getenv ("GDBUS_DAEMON_DEBUG") != NULL)
open_console_window ();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment