diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index b7ec06e5111..b7636770e7e 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2767,3 +2767,32 @@ failed: release_win_data( data ); return -1; } + +void CDECL X11DRV_FlashWindowEx( PFLASHWINFO pfinfo ) +{ + struct x11drv_win_data *data = get_win_data( pfinfo->hwnd ); + XEvent xev; + + if (!data) + return; + + if (data->mapped) + { + xev.type = ClientMessage; + xev.xclient.window = data->whole_window; + xev.xclient.message_type = x11drv_atom( _NET_WM_STATE ); + xev.xclient.serial = 0; + xev.xclient.display = data->display; + xev.xclient.send_event = True; + xev.xclient.format = 32; + xev.xclient.data.l[0] = pfinfo->dwFlags ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE; + xev.xclient.data.l[1] = x11drv_atom( _NET_WM_STATE_DEMANDS_ATTENTION ); + xev.xclient.data.l[2] = 0; + xev.xclient.data.l[3] = 1; + xev.xclient.data.l[4] = 0; + + XSendEvent( data->display, DefaultRootWindow( data->display ), False, + SubstructureNotifyMask, &xev ); + } + release_win_data( data ); +} diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index d9bbebc700f..182b3518767 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -30,6 +30,7 @@ @ cdecl EmptyClipboard() X11DRV_EmptyClipboard @ cdecl EndClipboardUpdate() X11DRV_EndClipboardUpdate @ cdecl EnumClipboardFormats(long) X11DRV_EnumClipboardFormats +@ cdecl FlashWindowEx(ptr) X11DRV_FlashWindowEx @ cdecl GetClipboardData(long) X11DRV_GetClipboardData @ cdecl GetDC(long long long ptr ptr long) X11DRV_GetDC @ cdecl IsClipboardFormatAvailable(long) X11DRV_IsClipboardFormatAvailable diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index cb4b0bb3af4..2694d23baae 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -421,6 +421,7 @@ enum x11drv_atoms XATOM__NET_WM_PING, XATOM__NET_WM_STATE, XATOM__NET_WM_STATE_ABOVE, + XATOM__NET_WM_STATE_DEMANDS_ATTENTION, XATOM__NET_WM_STATE_FULLSCREEN, XATOM__NET_WM_STATE_MAXIMIZED_HORZ, XATOM__NET_WM_STATE_MAXIMIZED_VERT, diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 85c69bfbd35..d4f5c84f9c7 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -138,6 +138,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = "_NET_WM_PING", "_NET_WM_STATE", "_NET_WM_STATE_ABOVE", + "_NET_WM_STATE_DEMANDS_ATTENTION", "_NET_WM_STATE_FULLSCREEN", "_NET_WM_STATE_MAXIMIZED_HORZ", "_NET_WM_STATE_MAXIMIZED_VERT",