Multiple Desktops

I am running multiple virtual desktops. I can run as many copies as I want of DOpus on one desktop but any attempt to run it on another desktop results in the mouse cursor changing for an instance, then nothing.

Which virtual desktop tool are you using and which version of Windows?

[quote="nudel"]Which virtual desktop tool are you using[/quote]my own - it uses "real" desktops using Windows multiple desktop calls[quote]and which version of Windows?[/quote]XP SP1

I just tried with Microsoft's Virtual Desktop Manager and I can open Opus windows on all 4 desktops without any problems.

I tried opening windows by double-clicking the desktop, by using the right-click menu on the desktop, and by double-clicking the Opus tray icon. All worked fine. I didn't think to try a hotkey but I think it would do the same as double-clicking the tray icon so that should work as well.

When I looked at that program, it didn't create real separate desktops, strange as it might seem, it just hides and shows applications. I also tried DOpus with another desktop manager and it failed as well, guess it is accessing the registry or something -- strange..and annoying, DOpus was looking close to perfect :frowning:

Do you mean separate desktops as used to create the Logon desktop and the desktops of other users in a multi-user or terminal server environment?

In other words, multiple winstations all logged in as the same user? Things like event handles etc., unless prefixed with "GLOBAL" aren't shared across the desktops etc...?

If so I'm surprised there aren't a lot more problems... But if not I apologise as I might not be aware of another "virtual desktop" API in Windows.

Could you explain the API/technique you're using in more detail? Is there another desktop manager which uses a similar technique which we can try?

It is fairly accepted use, no fudges - it just uses standard Windows API calls, such as CreateDesktop, OpenDesktop, EnumDesktops, and builds a wrapper UI around them.

I will look up another desktop manager and let you know.

I had a quick look at CreateDesktop and it seems reasonable. It creates an additional desktop within the current winstation so it's not doing anything crazy like I feared before.

It might be worth a try to turn off Preferences / Double-Click / Desktop and restart Opus. The Desktop double-click functionality installs a hook which might break when there are multiple desktops.

There are probably issues to do with not being able to send window messages between desktops. Opus uses window messages (between windows) a lot internally, and all Opus windows are owned by one process, so they probably all need to exist on a single desktop.

Turned off the double click and restarted but to no avail. I have trialed about a dozen File Explorers, only two (including DOpus) don't work in multiple desktops. A real pity.

I bet the only ones which do work are the ones which only open one window per process?

Unless they're passing messages to other windows via something other than window messages... IMO using multiple desktops like that is quite likely to break a lot of things, except for single-(top-level-)window (per-process) applications.

Sorry I don't really understand this thread. Opus works fine on standard multiple desktop systems such as those supplied by Microsoft (PowerTools) and that supplied with practically every graphics card such as Nvidia multiple desktops. I use Opus all the time on my multiple screen systems running on NVidia.

Presumably you have some specific reason for reinventing the wheel here:) but if you are writing your own then you are on your own as well:)

I did not reinvent the wheel, the problem was that most multiple desktop managers are not - they just use one desktop and show/hide applications, tray icons, etc, etc to pretend you are using multiple desktops. One test I did when trying to buy a multiple desktop tool was to start say Delphi and roll to another desktop, then another, and watch as the various screens each loaded onto different desktops - hardly useful, as your app ends up over several "desktops". These tools then add various rules to force windows from app's onto a particular desktop, all gets very messy. Even Microsoft's own desktop manager failed this simple test - I was surprised to see even it didn't use the API calls.

I installed another "real" desktop manager this morning and DOpus failed on it as well, so I know it is not my desktop manager that is at fault, it seems to me it then must be either a fault in the various desktop API calls used by these desktop managers, or something that DOpus is not supporting.

I can understand your reluctance to change anything for what would be a potentially small number of customers.

I've no idea what 'real' multiple desktops you're talking about but obviously they are not actually real:) Use the one from Microsoft or better still use the proper one that comes with NVidia (and all other?) graphics cards. Works like a bought one.

"Real" is the sense that they are different desktops rather than just one with stuff hidden. Use the Microsoft one? - I tried and too many problems, as previously mentioned. "AnotherDesk" is a "real" one, DOpus fails on it.

virt-dimension.sourceforge.net/

Virtual Dimenion is a nice little program I've been using for a while. No idea if it's "Real" or not, but it works pretty solidly for me.

Opus uses a semaphore to check if it's already running. If semaphores are visible across desktops (I don't know if they are or not) then this is probably what's tripping you up.

'Real' as in made with the CreateDesktop API. Unfortunately there are about 3 things in windows called a desktop but in this case it's a lot like the way the Amiga supported multiple "screens", except you can't show two at once and windows on different desktops cannot send messages to each other. These desktops span multiple monitors and aren't related to the Explorer desktop or the desktop window. (I guess there is a desktop window per desktop.)

The screenlock/logon/welcome screen runs on a separate desktop. The screensaver runs on its own desktop. If you're using domains and press Ctrl-Alt-Del the dialog you see (with buttons to logout, change password, etc.) is on its own desktop. Non-interactive services are prevented from showing UI elements by not having a desktop (or running on a hidden desktop? I can't remember).

Desktops partition windows and other things like hooks. While one desktop is visible you can't see windows on another desktop (of course) but, more importantly for this discussion, windows from one desktop cannot send messages to windows on another desktop, even if they were created by the same process.

I don't think Microsoft ever intended for applications to exist on more than one desktop at once and that's why Opus (and a lot of other multi-window programs) will never work with multiple 'real' desktops, unless the program is reengineered to use pipes or something else instead of window messages. Not sure if window handles are unique per desktop or per session or per machine but if it isn't per desktop then you could have a SendMessage proxy which detects when a window is on another desktop and smuggles the message, via a named pipe, to something that can re-send it. In theory... I think it would still be a lot of work, though, and until yesterday I'd never heard of anyone using CreateDesktop in this way.

The fact that Microsoft themselves don't use the CreateDesktop API for their virtual desktop solution suggests that CreateDesktop isn't there for virtual desktops, it's there for something else. i.e. Hosting windows/applications which need to be completely isolated from other windows/applications, such as the screen saver and screen lock, where other windows/applications must not appear on screen or be accessible to the user.

[quote="jon"]Opus uses a semaphore to check if it's already running. If semaphores are visible across desktops (I don't know if they are or not) then this is probably what's tripping you up.[/quote]yes they are, my desktop tool uses semaphores and pipes to "talk" to apps on other desktops and to the service that runs everything - bummer, liked DOpus.

Why Directory Opus can no work on terminal server correctly?

I use Directory Opus on terminal server almost every day without any problems.

What isn't working for you?