win3wm icon indicating copy to clipboard operation
win3wm copied to clipboard

Some UWP windows are not tiled

Open tabell opened this issue 3 years ago • 3 comments

As per a comment on the HN discussion I think this may have to do with UWP window naming

Steps to reproduce:

  1. Start WinWM.exe with several existing windows such as Explorer and Firefox, note that they become tiled
  2. Click the start menu, search for Calculator and run it

Expected:

Calculator window becomes tiled

Actual:

Calculator window floats above tiled windows

tabell avatar Feb 28 '21 20:02 tabell

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.

McYoloSwagHam avatar Mar 02 '21 20:03 McYoloSwagHam

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 ?

tsymalla avatar Mar 13 '21 04:03 tsymalla

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.

McYoloSwagHam avatar May 10 '21 13:05 McYoloSwagHam