Mercurial > pidgin
changeset 14795:d1614d9ce7ab
[gaim-migrate @ 17560]
Use Windows' built-in functionality to stop flashing.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Sat, 21 Oct 2006 23:36:44 +0000 |
parents | 0c96d5d774d7 |
children | f06721350f8f |
files | gtk/win32/gtkwin32dep.c |
diffstat | 1 files changed, 5 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/win32/gtkwin32dep.c Sat Oct 21 21:19:02 2006 +0000 +++ b/gtk/win32/gtkwin32dep.c Sat Oct 21 23:36:44 2006 +0000 @@ -225,25 +225,6 @@ return win_hwnd; } -static int -halt_flash_filter(GtkWidget *widget, GdkEventFocus *event, gpointer data) { - if(MyFlashWindowEx) { - HWND hWnd = data; - FLASHWINFO info; - - if(!IsWindow(hWnd)) - return 0; - - memset(&info, 0, sizeof(FLASHWINFO)); - info.cbSize = sizeof(FLASHWINFO); - info.hwnd = hWnd; - info.dwFlags = FLASHW_STOP; - info.dwTimeout = 0; - MyFlashWindowEx(&info); - } - return 0; -} - void gtkwgaim_conv_blink(GaimConversation *conv, GaimMessageFlags flags) { GaimGtkWindow *win; @@ -266,21 +247,19 @@ window = win->window; + /* Don't flash if we have the window focused */ + if(GetForegroundWindow() == GDK_WINDOW_HWND(window->window)) + return; + if(MyFlashWindowEx) { FLASHWINFO info; - /* Don't flash if we have the window focused */ - if(GetForegroundWindow() == GDK_WINDOW_HWND(window->window)) - return; memset(&info, 0, sizeof(FLASHWINFO)); info.cbSize = sizeof(FLASHWINFO); info.hwnd = GDK_WINDOW_HWND(window->window); - info.dwFlags = FLASHW_ALL | FLASHW_TIMER; + info.dwFlags = FLASHW_ALL | FLASHW_TIMERNOFG; info.dwTimeout = 0; MyFlashWindowEx(&info); - /* Stop flashing when window receives focus */ - g_signal_connect(G_OBJECT(window), "focus-in-event", - G_CALLBACK(halt_flash_filter), info.hwnd); } }