[2/2 v3] winex11.drv: Implement FlashWindow with _NET_WM_STATE_DEMANDS_ATTENTION.

Ken Thomases ken at codeweavers.com
Wed Sep 30 04:05:16 CDT 2015


On Sep 30, 2015, at 2:53 AM, Jactry Zeng <jzeng at codeweavers.com> wrote:

> dlls/user32/driver.c              | 16 ++++++++++++++--
> dlls/user32/user_private.h        |  1 +
> dlls/user32/win.c                 |  1 +
> dlls/winex11.drv/window.c         | 29 +++++++++++++++++++++++++++++
> dlls/winex11.drv/winex11.drv.spec |  1 +
> dlls/winex11.drv/x11drv.h         |  1 +
> dlls/winex11.drv/x11drv_main.c    |  1 +
> 7 files changed, 48 insertions(+), 2 deletions(-)

Since FlashWindowEx() is the more general function — that is, FlashWindow() could be fully implemented in terms of FlashWindowEx(), but not the other way around — shouldn't the driver entry point be FlashWindowEx()?  Otherwise, when FlashWindowEx() is eventually implemented more completely, the driver entry will have to be changed.

For now, since user32 implements FlashWindow() but FlashWindowEx() is a stub (or semi-stub after your next patch), FlashWindow() would have to create a FLASHWINFO structure, fill it in, and pass that along.  I think that dwFlags would be either FLASHW_ALL or FLASHW_STOP, depending on bInvert.  uCount would be 1, I guess.

Shouldn't pFlashWindow (or pFlashWindowEx) be added to the USER_DRIVER structure among the "windowing functions" (see the comments), in alphabetical order (after pDestroyWindow)?  Of course, that affects the changes to driver.c in terms of where things are added.  The order in winex11.drv.spec is less clear, but it seems to be mostly alphabetical after a certain point.  I'd put it after EnumClipboardFormats() in that list.

Why does FlashWindow() only call the driver entry point if the window is minimized?  Shouldn't the driver get the opportunity to act for a non-minimized window, too?

For the X11 implementation, shouldn't something potentially remove the _NET_WM_STATE_DEMANDS_ATTENTION state, presumably when bInvert is false (or when dwFlags doesn't include FLASHW_CAPTION or FLASHW_TRAY)?

-Ken




More information about the wine-devel mailing list