diff -r f2269fc0a52c -r 694ec370d84a pidgin/win32/gtkwin32dep.c --- a/pidgin/win32/gtkwin32dep.c Fri Jun 17 22:11:30 2016 -0400 +++ b/pidgin/win32/gtkwin32dep.c Fri Jun 17 22:31:15 2016 -0400 @@ -465,9 +465,6 @@ return TRUE; } -void winpidgin_ensure_onscreen(GtkWidget *win) { - RECT winR, wAR, intR; - HWND hwnd = GDK_WINDOW_HWND(win->window); typedef HRESULT (WINAPI* DwmIsCompositionEnabledFunction)(BOOL*); typedef HRESULT (WINAPI* DwmGetWindowAttributeFunction)(HWND, DWORD, PVOID, DWORD); static HMODULE dwmapi_module = NULL; @@ -481,9 +478,9 @@ get_actualWindowRect(HWND hwnd) { RECT winR; - + GetWindowRect(hwnd, &winR); - + if (dwmapi_module == NULL) { dwmapi_module = GetModuleHandleW(L"dwmapi.dll"); if (dwmapi_module != NULL) { @@ -491,7 +488,7 @@ DwmGetWindowAttribute = (DwmGetWindowAttributeFunction) GetProcAddress(dwmapi_module, "DwmGetWindowAttribute"); } } - + if (DwmIsCompositionEnabled != NULL && DwmGetWindowAttribute != NULL) { BOOL pfEnabled; if (SUCCEEDED(DwmIsCompositionEnabled(&pfEnabled))) { @@ -501,10 +498,13 @@ } } } - + return winR; } +void winpidgin_ensure_onscreen(GtkWidget *win) { + RECT winR, wAR, intR; + HWND hwnd = GDK_WINDOW_HWND(win->window); g_return_if_fail(hwnd != NULL); winR = get_actualWindowRect(hwnd);