[Bug 43691] focus tracking broken with desktop switches

WineHQ Bugzilla wine-bugs at winehq.org
Wed Nov 4 10:10:33 CST 2020


https://bugs.winehq.org/show_bug.cgi?id=43691

--- Comment #12 from Gabriel Ivăncescu <gabrielopcode at gmail.com> ---
Created attachment 68567
  --> https://bugs.winehq.org/attachment.cgi?id=68567
Implement cloaking

Here's a patch that implements cloaking. It's quite big because it implements
manual cloaking as well (which an app can) by setting the opacity of an X
window to zero and making it invisible to mouse input via XShape. It uses the
undocumented user32 API SetWindowCompsitionAttribute that I have written tests
for (not in this patch). Of course an app will probably use
DwmSetWindowAttribute instead, which will be just a wrapper to this eventually.

The shell cloaking itself is not big, but it should do what you needed. I
tested on Windows 10 to mimic its behavior and indeed, windows on a different
Virtual Desktop cannot be set to foreground (it fails), while manually cloaked
windows can, so I only made it fail on "shell cloaked" windows (those are the
windows that are hidden by the WM on a desktop switch).

Please test and let me know if it works for you. Don't forget to run
tools/make_requests after applying the patch in the wine directory.

Obviously I will split it up and add tests when sending it upstream, this is
just a preliminary look at it and looking for comments/testing.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list