talonvoice / beta

Issue tracker for the private Talon Beta
10 stars 0 forks source link

[Windows] Zoom mouse view doesn't appear over e.g. open start menu or task viewer (win-tab) #9

Closed knausj85 closed 4 years ago

knausj85 commented 4 years ago
  1. Enable zoom mouse
  2. Open start menu or task viewer (win-tab)
  3. Trigger zoom mouse, and observe. You can hit escape to exit both, and reveal the zoom view underneath.
knausj85 commented 4 years ago

Doing a bit of research out of curiosity, looks like this is the ticket in win32 land FWIW.

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos

"A window can be made a topmost window either by setting the hWndInsertAfter parameter to HWND_TOPMOST and ensuring that the SWP_NOZORDER flag is not set, or by setting a window's position in the Z order so that it is above any existing topmost windows. When a non-topmost window is made topmost, its owned windows are also made topmost. Its owners, however, are not changed."

Poking around optikey, looks like it takes advantage of the bolded implementation detail, main window is top-most, and every new child is thus. Didn't see any fancy stuff.

Might be worth exposing via the canvas api someday too, if not already

lunixbochs commented 4 years ago

Try in 962

knausj85 commented 4 years ago

No luck. WINNNNNDOWS

lunixbochs commented 4 years ago

I'm calling

SetWindowPos((HWND)win->winId(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);

knausj85 commented 4 years ago

After a little more research, it looks like this probably goes back to uiAccess and signing.

https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-securityoverview

"In addition to having access to higher IL processes, an assistive technology application with UIAccess can run as the topmost application in the z-order at any time, meaning that an assistive technology application can be visible and available whenever the user needs it."

My bad.

knausj85 commented 4 years ago

This also has some likely useful tips

https://github.com/OptiKey/OptiKey/blob/master/docs/UiAccess.md