Multiple monitor support on Windows



I am in the process of implementing multiple monitor support on
Windows. I finally got around to install an extra graphics adapter.
Even if I don't actually have a second monitor (yet), Windows doesn't
know that, and I can use the "Start Menu> Programs> Accessories>
Accessibility> Magnifier" tool to see what's on the second monitor (as
long as it is set up to be part of the "Windows desktop").

The discussion below applies to NT-based Windows only, on Win9x things
are much more restricted.

The Windows concepts involved, and their mapping to GDK concepts, are
as follows:

- Window station. Every process is associated with a window
station. This is perhaps a bit like the POSIX session concept,
perhaps. Only the interactive window station WinSta0, can display
output or receive input. Other window stations are used by "services"
(a bit like POSIX daemons).

I don't really see any need to make use of window stations in GDK.

- Desktop. Window stations have a set of desktops, with a logical
display surface. (Although I don't unerstand what processes running on
other window stations that WinSta0 can do with their desktop(s)?) Only
one desktop is visible to the user and receives input at any
time. Once a window is created it cannot move between
desktops. Threads can switch between desktops, though, and windows are
created on the thread's current desktop. Applications can switch which
desktop is currently visible. It is also possible to create new
desktops on the fly. Normally Explorer is running only on the
"Default" desktop. Desktops are named with alphanumeric strings.

Windows desktops map to GDK displays.

Note that in the above concepts, single or multiple monitors make no
difference.

- "The Windows desktop" and "independent displays". Here MS's
terminology breaks down, "desktop" is used with a different
meaning. The "Windows desktop" in multiple-monitor context means the
display area on which you can move the mouse, and windows can be moved
around. It has a common coordinate system, and can consist of multiple
monitors, arranged freely as long as each monitor borders to another
one. I.e. like Xinereama.

"Independent displays" are monitors that are not part of the "Windows
desktop". They can still be enumerated. I don't know yet if it is
possible to create windows on them, though, although you can get a DC
for them, and thus it should be possible to draw on them (i.e. they
could be said to have just a "root window").

The "Windows desktop" maps to the default GDK screen on each
desktop. As Windows uses the primary monitor's origin as the
coordinate system's origin, monitors to the left/above of it have
negative coordinates. Presumably all coordinates will have to be
offset between Win32 and GDK, so that GDK sees only nonnegative ones?

As for the "independent displays", I will have to read more docs, and
do some testing, whether it is actually possible to create windows on
them with GDI or not. If not, I assume that there is no sense to
bother with them in GTK, as no GUI could be shown on them anyway?

- Multiple monitors that are part of the "Windows desktop". These map
quite straightforwardly to the multiple monitors on the (default) GDK
screen.

--tml




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]