[BUG] Ctrl+Esc and different desktops

Started by fixer, May 17, 2018, 09:34:26 AM

Previous topic - Next topic

fixer

As you probably know you can open Start menu with not just pressing Win button on your keyboard, but also with Ctrl+Esc shortcut. They both send WM_SYSCOMMAND with SC_TASKLIST parameter. But Ctrl+Esc is a shortcut, so when undocumented SetShellWindow API function is called to tell Windows that it's the shell, RegisterHotKey registers that shortcut for shell window. And if you have several desktops (I don't mean ReHIPS isolated desktops here, any desktops, e.g. Desktops program from former Sysinternals creates several desktops), you won't observe the same behavior on other than main desktops.

The problem is SetShellWindow should be called for every desktop as it works desktop-wise. But RegisterHotKey works system-wise. So only the first shell will be able to register the shortcut successfully, all subsequent calls from other shells will fail, so the first shell'll be the only one to receive shortcut notifications.