73

One of the big new features for Windows is the fact that multiple "virtual" desktops are now natively supported, allowing you to organise collections of windows together and separate groups of tasks.

This is good.

You can move windows between desktops by clicking the "tasks" button and then right clicking an application window and selecting "Move to..."

This is a bit clunky and not quite so good.

I have two monitors and often like to have a film playing on my second monitor, either in a web browser or media player, while I have a browser and some other applications on the main screen. Doing this isn't a problem in my current setup, it just works.

With the advent of virtual desktops I was wanting to put the browser on one virtual desktop and another app on another virtual desktop and still be able to watch the video when I switch desktops, effectively having it visible on both virtual desktops. Using the default Film & TV app to play a video and then moving to another desktop simply results in your video stopping without any warning.

This is not good.

What I was hoping was that either the two monitors would have their own virtual desktop or their would be some "pin to all desktops" option similar to the "sticky window" feature that I have seen in many Linux based window managers.

Is there some way to achieve this?

  • Not that I know about, though I have experience with multiple systems using workspaces (different linux systems) none have ever had this feature, which kind of breaks the concept of having multiple workplaces. – Daniel Aug 5 '15 at 7:21
  • 2
    @Daniel I've spoken to several people and they refer to it as "sticky windows" – Mokubai Aug 5 '15 at 8:06
  • 2
    @Psychogeek I'm referring to both multi monitor and virtual desktops, the multi-monitor side is fine. I can open a video, put it on the second screen and all is fine, but if I switch to another desktop using the new virtual desktop feature, the video window disappears and (in some cases) stops playing entirely. I would like to have some way to pin a window to multiple virtual desktops. – Mokubai Aug 5 '15 at 8:10
  • Got it, many of the Virtual desktop programs had that feature, where you would assign programs to specific virtuals, lots of small buggy problems still existed depending on method. – Psycogeek Aug 5 '15 at 8:33
  • 6
    I think a pretty standard example for this need is almost any communication application. I'd like to use separate virtual desktops for different projects I'm working on, but I'd like to pin/stick IM clients and email. It seems like a pretty standard use-case to me that I might want to separate my workspaces without having to desktop swap just to get email alerts! – Colin K Aug 31 '15 at 20:05
100

The feature has now been released as one of several "Virtual Desktop Improvements" in the Windows 10 Anniversary Update (Build 14316):

You can now pin a window so it’s available on every desktop. To do this, launch Task View then right-click on the window you want to pin and choose “Show this window on all desktops”. Try pinning Skype or Groove Music so they’re always at your fingertips. And if you have a multi-mon setup, you might enjoy the ability to have your email app on the second monitor no matter which desktop you switch to.

enter image description here

  • The post talks about being available on the Windows Insider Fast Ring, do you have any timeline for when this will drop for normal users? – Mokubai Jun 13 '16 at 15:48
  • 1
    @Mokubai As far as I can tell there isn't a firm public release date yet. Just a vague "This [Northern Hemisphere] Summer". – Daniel Ballinger Jun 13 '16 at 19:15
  • but how do you unpin it? – Mikey Mar 14 '18 at 7:55
  • @Mikey Is unchecking the "Show X on all desktops" option not working for you? – Daniel Ballinger Mar 14 '18 at 19:19
  • Works on the windows I can click, problem is when they are not visible in task view. Of course it was visible before when I turned it on, but now whenever in go into task view the window disappears.. So what's another way to disable it? Is there a reg key? Currently I'm having this problem with telegram which I think is a QT (cross platform app) . Just to be clear the window is visible on all desktops, but disappears when I enter task view – Mikey Mar 15 '18 at 1:28
18

Yep. [almost :)] Every window with WS_EX_TOOLWINDOW attribute is visible on all desktops.

Autohotkey is a great help in this. Example script - MyLoop.ahk:

WS_EX_TOOLWINDOW := 0x00000080
Loop
{
   WinSet, ExStyle, +%WS_EX_TOOLWINDOW%, ahk_class Chrome_WidgetWin_1
   Sleep,100
}

Put this in windows startup and Google Chrome window will "stick" to all virtual desktops.

Or assign this as a hotkey: Example script - MyHotkeys.ahk:

WS_EX_TOOLWINDOW := 0x00000080
+MButton::WinSet, ExStyle, ^%WS_EX_TOOLWINDOW%, A
^MButton::WinSet, AlwaysOnTop, toggle, A

Put this in windows startup and you can TOGGLE "sticky" state for any window by pressing Shift+middle button click on it.

Addition key - Ctrl+middle button click will toggle "topmost" state. Very useful.

PS: modern applications (e.g. windows 10 Calculator) somehow ignore this. Don't know why. But for windows explorer window and most of 'old applications' - it's work all right

  • I tried the scripts for the middle click + hotkeys. The Ctrl+middle button worked well. However, I couldn't get the across virtual desktop sticking to work. None of the windows I tried it on transitioned. – Daniel Ballinger Jun 12 '16 at 23:21
  • Worked for me. In my case I wanted to always set it to show, so switched the caret (^) with a plus sign (+). – ohaal Jan 3 '18 at 2:04
1

Based on @idj solution above, this is how to do it in C:

exstyle = GetWindowLongPtr(hwndPtr, GWL_EXSTYLE);
exstyle |= WS_EX_TOOLWINDOW
SetWindowLongPtr(hwndPtr, GWL_EXSTYLE, exstyle);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.