win3wm
win3wm copied to clipboard
Some UWP windows are not tiled
As per a comment on the HN discussion I think this may have to do with UWP window naming
Steps to reproduce:
- Start WinWM.exe with several existing windows such as Explorer and Firefox, note that they become tiled
- Click the start menu, search for Calculator and run it
Expected:
Calculator window becomes tiled
Actual:
Calculator window floats above tiled windows
I have come back to this problem and I remember why I could not fix it. in this little gist I have a program that prints all window creations and destructions. here and when you open calculator you will see that it receives 2 messages, calculator created and calculator destroyed.
I'm going to leave this issue open if anyone knows how to deal with UWP notifications/events, since they seem to have some irregular properties.
I have come back to this problem and I remember why I could not fix it. in this little gist I have a program that prints all window creations and destructions. here and when you open calculator you will see that it receives 2 messages, calculator created and calculator destroyed.
I'm going to leave this issue open if anyone knows how to deal with UWP notifications/events, since they seem to have some irregular properties.
Tried https://stackoverflow.com/questions/53873390/getting-win32-messages-from-windows-ui-core-corewindow-of-uwp-app-windows ?
hmm ok so it seems that I have to find all the UWP processes and the threads responsible for them, then once I've done that I can setWindowsHookEx on that specific threadId and it'll work.
So I guess the way to deal with this, is to use WMI to detect processes that are created, check if those processes are UWP, and then install the hook specifically for those processes.