Hello,

I am sure you know about Virtual Desktops. UNIX had them for about 20 years.
There are some implementations for Windows too, even a Microsoft one, but for
some reason they all suck. The primary reason is that they provide only an
emulation of the real stuff -- basically they minimize one set of
applications in one desktop, one set in another and so on -- they aren't real
Virtual Desktops.

The best implementation so far seems to be Virtual Dimension, but it still
sucks, mainly because there are application that make hacks in the GUI,
ignoring any recommendation.

The main issue, is that all this are emulations -- Windows doesn't have the
capability for Virtual Desktops.

That is why I have thought of implementing it via a driver!

I am not sure what the best way is -- I need to make it hardware independent
-- that is -- it should not matter what video card you use.

I think I should implement a filter driver somehow, but still don't know
what exactly it should do -- I am asking here for suggestions.

Thanks in advance.

Re: Virtual Desktops, like in *nix with Xserver by Maxim

Maxim
Sat Dec 08 10:10:30 PST 2007

> I am sure you know about Virtual Desktops. UNIX had them for about 20 years.
> There are some implementations for Windows too, even a Microsoft one, but for
> some reason they all suck. The primary reason is that they provide only an
> emulation of the real stuff -- basically they minimize one set of
> applications in one desktop, one set in another and so on -- they aren't real
> Virtual Desktops.

RDP/Terminal Services is not "sucks" at all. It works, and solves the most
tasks.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


Re: Virtual Desktops, like in *nix with Xserver by TerminusMGKIISecundus

TerminusMGKIISecundus
Sat Dec 08 10:19:00 PST 2007

"Maxim S. Shatskih" wrote:

> RDP/Terminal Services is not "sucks" at all. It works, and solves the most
> tasks.

RDP/Terminal Services is excelent technology, but it doesn't have anything
to do with Virtual Desktops, does it?


Re: Virtual Desktops, like in *nix with Xserver by Alexander

Alexander
Sat Dec 08 20:20:44 PST 2007

Windows DOES have capability for virtual desktops. See CreateDesktop and
related API.

"Terminus MGK II [Secundus]"
<TerminusMGKIISecundus@discussions.microsoft.com> wrote in message
news:367C3786-646E-474B-8686-654DA5709FD5@microsoft.com...
> Hello,
>
> I am sure you know about Virtual Desktops. UNIX had them for about 20
> years.
> There are some implementations for Windows too, even a Microsoft one, but
> for
> some reason they all suck. The primary reason is that they provide only an
> emulation of the real stuff -- basically they minimize one set of
> applications in one desktop, one set in another and so on -- they aren't
> real
> Virtual Desktops.
>
> The best implementation so far seems to be Virtual Dimension, but it still
> sucks, mainly because there are application that make hacks in the GUI,
> ignoring any recommendation.
>
> The main issue, is that all this are emulations -- Windows doesn't have
> the
> capability for Virtual Desktops.
>
> That is why I have thought of implementing it via a driver!
>
> I am not sure what the best way is -- I need to make it hardware
> independent
> -- that is -- it should not matter what video card you use.
>
> I think I should implement a filter driver somehow, but still don't know
> what exactly it should do -- I am asking here for suggestions.
>
> Thanks in advance.
>



Re: Virtual Desktops, like in *nix with Xserver by Tim

Tim
Sat Dec 08 22:57:20 PST 2007

Terminus MGK II [Secundus]
<TerminusMGKIISecundus@discussions.microsoft.com> wrote:
>
>I am sure you know about Virtual Desktops. UNIX had them for about 20 years.
>There are some implementations for Windows too, even a Microsoft one, but for
>some reason they all suck. The primary reason is that they provide only an
>emulation of the real stuff -- basically they minimize one set of
>applications in one desktop, one set in another and so on -- they aren't real
>Virtual Desktops.

How do you think the X window virtual desktops work? It is EXACTLY the
same implementation. Windows not on the current virtual desktop are either
hidden or moved to coordinates that are off the screen.

>The best implementation so far seems to be Virtual Dimension, but it still
>sucks, mainly because there are application that make hacks in the GUI,
>ignoring any recommendation.

I disagree. I think that goScreen is the best virtual desktop
implementation for Windows.

>The main issue, is that all this are emulations -- Windows doesn't have the
>capability for Virtual Desktops.

What do you think this means? How would YOU do it, and still allow
applications to move on and off the visible desktop?

Microsoft's Virtual Display Manager uses the "desktop" concept. It's
probably closest to what you describe, but I don't find it flexible enough
for my needs.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: Virtual Desktops, like in *nix with Xserver by Tim

Tim
Sat Dec 08 22:57:55 PST 2007

Terminus MGK II [Secundus]
<TerminusMGKIISecundus@discussions.microsoft.com> wrote:
>
>"Maxim S. Shatskih" wrote:
>
>> RDP/Terminal Services is not "sucks" at all. It works, and solves the most
>> tasks.
>
>RDP/Terminal Services is excelent technology, but it doesn't have anything
>to do with Virtual Desktops, does it?

We can't answer that until we know what the term means to you. From your
original post, that is not at all clear.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: Virtual Desktops, like in *nix with Xserver by TerminusMGKIISecundus

TerminusMGKIISecundus
Sun Dec 09 00:45:01 PST 2007

Virtual Desktops are a way of having more space om the desktop. Basically you
have more "screens" in which application windows reside, but only one is
active at a moment of time. You have a button or Key shortcut to change
active desktop.

"Tim Roberts" wrote:
> How do you think the X window virtual desktops work? It is EXACTLY the
> same implementation. Windows not on the current virtual desktop are either
> hidden or moved to coordinates that are off the screen.

Not at all actually. This is the advantage of Client - Server architecture.
Applications know nothing about displays, they just have a connection to the
Xserver. The "Desktop" is totally abstracted from them. In the structure that
describes a window (coordinates, size, etc -- Windows also has this) there is
another unsigned integer describing the desktop it resides in. Xserver itself
maintains 'n' linked lists of widnows, Where n is the number of Virtual
Desktops in use. When you switch to a desktop, the X server just uses the
corresponding linked list to draw on screen. Application know knothing about
this -- They are not minimized or moved or anything.

> I disagree. I think that goScreen is the best virtual desktop
> implementation for Windows.

I am not familiar with that software -- I will give it a try.

> Microsoft's Virtual Display Manager uses the "desktop" concept. It's
> probably closest to what you describe, but I don't find it flexible enough
> for my needs.

Why don't you find it flexible enough for your needs?

"Alexander Grigoriev" wrote:
> Windows DOES have capability for virtual desktops. See CreateDesktop and
> related API.

I'm checking that out know -- Thanks!



Re: Virtual Desktops, like in *nix with Xserver by TerminusMGKIISecundus

TerminusMGKIISecundus
Sun Dec 09 00:50:00 PST 2007

"Alexander Grigoriev" wrote:
> Windows DOES have capability for virtual desktops. See CreateDesktop and
> related API.

I've read about that but the disadvantage seems to be:

"Messages can be sent only between processes that are on the same desktop."
(MSDN reference).


Re: Virtual Desktops, like in *nix with Xserver by TerminusMGKIISecundus

TerminusMGKIISecundus
Sun Dec 09 01:48:00 PST 2007

"Alexander Grigoriev" wrote:

> Windows DOES have capability for virtual desktops. See CreateDesktop and
> related API.

One question -- If I use CreateDesktop and associated functions, can I move
windows between desktops? As I understand, one process started in a desktop,
is restricted to that desktop.

Thanks again!


RE: Virtual Desktops, like in *nix with Xserver by TerminusMGKIISecundus

TerminusMGKIISecundus
Sun Dec 09 12:03:01 PST 2007

CreateDesktop() and related API are no help to me. Indeed, you can create
*real* Desktops, but there is no way to move windows (processes) into the
newly created Desktops. You don't have a taskbar (explorer) either. They are
a very cool feature though -- do you think is there any way to circumvent
this?


Re: Virtual Desktops, like in *nix with Xserver by Alexander

Alexander
Sun Dec 09 12:16:34 PST 2007

Please make clear, do you want truly separated desktops (like you described
in X Window server concept), or just emulation?

CreateDesktop gives you truly separate securable (by ACL) desktop. Window
handles are per desktop. You can send a message to a separate desktop,
though, if you have an access to it (specified by ACL), by using
SetThreadDesktop, then calling SendMessage or PostMessage.

"Terminus MGK II [Secundus]"
<TerminusMGKIISecundus@discussions.microsoft.com> wrote in message
news:64EBA970-59EB-47AA-BFF2-77FADA16EBEC@microsoft.com...
> "Alexander Grigoriev" wrote:
>> Windows DOES have capability for virtual desktops. See CreateDesktop and
>> related API.
>
> I've read about that but the disadvantage seems to be:
>
> "Messages can be sent only between processes that are on the same
> desktop."
> (MSDN reference).
>



Re: Virtual Desktops, like in *nix with Xserver by Alexander

Alexander
Sun Dec 09 12:25:46 PST 2007

I'm not quite sure shat you want: real separate desktops, or just
multi-monitor emulation. What you're asking for is the latter.

Yes, you can create a process on a separate desktop, and change its threads
desktop (with some constraints), but you cannot move its windows.

In Windows, windows, menus, hooks, and clipboard belng to a desktop. I don't
know what variant of isolation you prefer for your virtual desktop concept.

"Terminus MGK II [Secundus]"
<TerminusMGKIISecundus@discussions.microsoft.com> wrote in message
news:4DA5A0EE-603B-4F4C-B435-4E69CA074E69@microsoft.com...
> "Alexander Grigoriev" wrote:
>
>> Windows DOES have capability for virtual desktops. See CreateDesktop and
>> related API.
>
> One question -- If I use CreateDesktop and associated functions, can I
> move
> windows between desktops? As I understand, one process started in a
> desktop,
> is restricted to that desktop.
>
> Thanks again!
>



Re: Virtual Desktops, like in *nix with Xserver by TerminusMGKIISecundus

TerminusMGKIISecundus
Sun Dec 09 12:33:00 PST 2007

"Alexander Grigoriev" wrote:

> Please make clear, do you want truly separated desktops (like you described
> in X Window server concept), or just emulation?

I do want truly separated desktops, and those created by CreateDesktop seem
to be exactly what I want, but I also want to be able to migrate processes
between desktops. Yes, I can use SetThreadDesktop(), but that gives me the
options of only *new* windows created by the thread to be displayed to the
new desktop, I need to "move" the old windows the application created too.


Re: Virtual Desktops, like in *nix with Xserver by TerminusMGKIISecundus

TerminusMGKIISecundus
Sun Dec 09 12:56:00 PST 2007

"Alexander Grigoriev" wrote:

> I'm not quite sure shat you want: real separate desktops, or just
> multi-monitor emulation. What you're asking for is the latter.

Indeed, what I want is some sort of multi-monitor environment emulated with
a single monitor, but I want it implemented somewhat "natively", not with
hiding windows. How does the multi-monitor implementation actually work?
Maybe there could be a way at driver level to force that with a single
monitor too. I understand that with multiple monitors you get multiple
SCREENs within the same Desktop. Is there a way I could create this SCREEN
objects? They are created somehow by windows in multi-monitor configuration
at kernel level, so I guess it should be possible.

Re: Virtual Desktops, like in *nix with Xserver by Alexander

Alexander
Sun Dec 09 14:37:45 PST 2007

See "Multiple Display Monitors" in Platform SDK documentation.

"Terminus MGK II [Secundus]"
<TerminusMGKIISecundus@discussions.microsoft.com> wrote in message
news:2F3DE836-EF94-40C0-BB27-8EC67B24E0A4@microsoft.com...
> "Alexander Grigoriev" wrote:
>
>> I'm not quite sure shat you want: real separate desktops, or just
>> multi-monitor emulation. What you're asking for is the latter.
>
> Indeed, what I want is some sort of multi-monitor environment emulated
> with
> a single monitor, but I want it implemented somewhat "natively", not with
> hiding windows. How does the multi-monitor implementation actually work?
> Maybe there could be a way at driver level to force that with a single
> monitor too. I understand that with multiple monitors you get multiple
> SCREENs within the same Desktop. Is there a way I could create this SCREEN
> objects? They are created somehow by windows in multi-monitor
> configuration
> at kernel level, so I guess it should be possible.



Re: Virtual Desktops, like in *nix with Xserver by Kalle

Kalle
Mon Dec 10 00:42:58 PST 2007

"Terminus MGK II [Secundus]" <TerminusMGKIISecundus@discussions.microsoft.com> writes:

> When you switch to a desktop, the X server just uses the
> corresponding linked list to draw on screen. Application know
> knothing about this -- They are not minimized or moved or
> anything.

When you switch to a desktop, what X11 protocol requests are sent?

Re: Virtual Desktops, like in *nix with Xserver by TerminusMGKIISecundus

TerminusMGKIISecundus
Mon Dec 10 02:00:01 PST 2007

"Alexander Grigoriev" wrote:
> See "Multiple Display Monitors" in Platform SDK documentation.

As far as I can see, the entire thing is implemented solely in GDI (hence
the impossibility of hardware overlays (3D stuff for example) on secondary
monitors). I can see no other way except implementing a virtual video driver
for a virtual display device -- that is of course, not desirable and
painfully slow. Can you see a better way?

I have also searched the undocumented Native API for related stuff, but
since it is GDI exclusive, I couldn't find anything usefull.


Re: Virtual Desktops, like in *nix with Xserver by Ivan

Ivan
Mon Dec 10 09:27:33 PST 2007

GDI does not know about Desktops.
Not event the more modern low level APIS, like DXGI,
known anything about desktops.

Let me repeat the hierarchy here for completeness:

The Video and HID-Devices are bound to a Session.

In each session, many Windowstations exists.
Only one Windowstation can be interactive.
Processes are bound to a Windowstation upon creation.

Windowstation is a container of desktops.
Each desktop is a container of a tree of windows,
windows hooks, and, the like on NtUser Objects.
A thread may be attached to a message queue,
and may be attached to a desktop.

The separation boundary offerede by a desktop
had been explained earlier. It allows and implements
the mechanism to prevent input spoofing on the Winlogon
desktop, where input-bound credentials are inserted,
and other tricks to fake input and messaging events.

Each desktop may be switched-into.
Switching to a desktop effectively attaches to that desktop
the current display information.
The display-information is the bridge between NtUser and NtGdi.
The display-info is the same for the same video/monitor configuration
regardless of the desktop. The display-info contains the PDEV/HDEV
concepts that should be familiar to anyone
who has written a display-driver.

NtGdi does not care which desktop is driving output.
In fact, NtGdi could be initialized independently, and, if you
only were use the so-called monitor-device-contextes, you would
need no whatsoever window to paint on screen.
[This causes an issue with regard of using monitor DC to paint to
the winlogon desktop using a monitor or screen DC,
that is prevented elsewhere]

As many have pointed out before you have two constrains for your problem:

If you create new desktops, then, you cannot migrate the windows
across desktops, unless you forcefully change thread desktops,
or you create selected processes in selected windowstation\desktop pairs.
This breaks the seamless-ness of the experience, and a lot of
inter-application
communications.

If you keep the same desktop (Winsta0\Default, for the sake of naming-it),
then you can create a large display information (that has, for example,
3 video/monitor devices), and you can have the windows to span/use
all of them. The problem with this approach is that
applications will always be aware (vis GetSytemMetrics, for example)
that there are either 3 monitors, and, you will have traditional problems
of off-screen windows, mouse that spans the sides of the screen, etc, etc.

--

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Terminus MGK II [Secundus]"
<TerminusMGKIISecundus@discussions.microsoft.com> wrote in message
news:AC2375F2-7F18-4A44-8348-4D89AC8A61BC@microsoft.com...
> "Alexander Grigoriev" wrote:
>> See "Multiple Display Monitors" in Platform SDK documentation.
>
> As far as I can see, the entire thing is implemented solely in GDI (hence
> the impossibility of hardware overlays (3D stuff for example) on secondary
> monitors). I can see no other way except implementing a virtual video
> driver
> for a virtual display device -- that is of course, not desirable and
> painfully slow. Can you see a better way?
>
> I have also searched the undocumented Native API for related stuff, but
> since it is GDI exclusive, I couldn't find anything usefull.
>



Re: Virtual Desktops, like in *nix with Xserver by Tim

Tim
Mon Dec 10 20:16:58 PST 2007

Terminus MGK II [Secundus] wrote:
>
>"Tim Roberts" wrote:
>> How do you think the X window virtual desktops work? It is EXACTLY the
>> same implementation. Windows not on the current virtual desktop are either
>> hidden or moved to coordinates that are off the screen.
>
>Not at all actually. This is the advantage of Client - Server architecture.
>Applications know nothing about displays, they just have a connection to the
>Xserver. The "Desktop" is totally abstracted from them. In the structure that
>describes a window (coordinates, size, etc -- Windows also has this) there is
>another unsigned integer describing the desktop it resides in. Xserver itself
>maintains 'n' linked lists of widnows, Where n is the number of Virtual
>Desktops in use. When you switch to a desktop, the X server just uses the
>corresponding linked list to draw on screen. Application know knothing about
>this -- They are not minimized or moved or anything.

I'm not sure where you are getting this. The virtual desktop scheme as
implemented by X window managers is NOT a fundamental X concept. It's just
something that a window manager implements, by hiding windows or moving the
windows around. The X server doesn't have any knowledge of virtual
desktops.

I do know a little bit about this. I wrote the S3 Savage driver for
XFree86 (now X.Org).

Are you, perhaps, thinking of the Linux virtual terminal concept? That's a
rather different concept. It is a Linux kernel concept, not a Unix
concept, and every VT that is running an X server is a completely different
server. You can't migrate applications back and forth between them.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

RE: Virtual Desktops, like in *nix with Xserver by TerminusMGKIISecundus

TerminusMGKIISecundus
Tue Dec 11 01:30:00 PST 2007

Thank you for all your replies -- things are clear now.


Re: Virtual Desktops, like in *nix with Xserver by Maxim

Maxim
Tue Dec 11 10:35:43 PST 2007

> I'm not sure where you are getting this. The virtual desktop scheme as
> implemented by X window managers is NOT a fundamental X concept. It's just
> something that a window manager implements, by hiding windows or moving the
> windows around. The X server doesn't have any knowledge of virtual
> desktops.

This feature looks more like a virtual display driver on top of the physical
one.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


Re: Virtual Desktops, like in *nix with Xserver by Technitronik

Technitronik
Tue Aug 19 18:44:01 CDT 2008

Hello Maxim

Is it me or I'm like Luky Luke the only to see the sundown...? About the
Virtual Desktop Manager, the only thing I obtain is four different
background. I try to have different "shortcuts" or "links" on each deaktop
but nothing to do. Adding a shortcut on one of them and it appear on all
other desktop. Have you some tips to gave me please?

Thank for any help

"Maxim S. Shatskih" wrote:

> > I'm not sure where you are getting this. The virtual desktop scheme as
> > implemented by X window managers is NOT a fundamental X concept. It's just
> > something that a window manager implements, by hiding windows or moving the
> > windows around. The X server doesn't have any knowledge of virtual
> > desktops.
>
> This feature looks more like a virtual display driver on top of the physical
> one.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
>