https://bugs.winehq.org/show_bug.cgi?id=38786
Bug ID: 38786 Summary: An EXE that only creates a WS_EX_TOOLWINDOW window isn't given focus (or returned focus). Product: Wine Version: 1.7.38 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: jasonwinter@hotmail.com Distribution: ---
It seems only WS_EX_APPWINDOW windows are given focus by Wine on application startup (I.E. windows that have a taskbar button).
Windows that do not appear in the taskbar are not given focus by Wine when an application is started. Additionally, if the user gives focus to that window using the mouse, things like MessageBox (I.E. another window that takes focus) do not return focus to a tool-window that last had focus. Instead, focus is only returned to the last window which had focus and also has a taskbar button.
https://bugs.winehq.org/show_bug.cgi?id=38786
--- Comment #1 from Jason jasonwinter@hotmail.com --- I can see there was a workaround written in 2008 to fix other software that experienced an issue like this:
https://www.winehq.org/pipermail/wine-patches/2008-April/052861.html
I think it changed the tool-window priority so WS_DLGFRAME & WS_EX_DLGMODALFRAME windows used x11drv_atom(_NET_WM_WINDOW_TYPE_DIALOG) before reverting to the existing mode that has problems.
In my case, this won't work - the window I am using has no frame, it's just the clipping window [undetailed window] of a Direct-X VMR9 video renderer, so it looks "clean" while watching videos.
https://bugs.winehq.org/show_bug.cgi?id=38786
--- Comment #2 from Jason jasonwinter@hotmail.com --- This is actually a bit funny, but I can't find that patched code (or anything like it) in the current source code of Wine. Wine doesn't seem to use (other than defining it and some text) the _NET_WM_WINDOW_TYPE_UTILITY anymore.
Was it all re-written?
Although I do get borders (frames) when I set them for testing, I still don't get focus unless I use WS_EX_APPWINDOW. If it was re-written, did it break the resolved bug(s) referred to in the patch link comments above?
...Scratching head...