[WINETEST] How is a visible desktop detected

Ferenc Wagner wferi at afavant.elte.hu
Fri Jan 28 06:52:48 CST 2005


Paul Vriens <Paul.Vriens at xs4all.nl> writes:

> I have a Win98/WNT/W2K (on VMWare) and a XP Home
> system. All are running the winrash service. All were
> started when I was logged in but only the W98 and WNT were
> considered running on a visible desktop.

Hmm, services use an invisible desktop by default AFAIK.
It shouldn't matter how you started winrash (the service),
but how you started winetest itself.  If it's started by
winrash, it runs on an invisible desktop; if you start it,
it runs on a visible desktop.

It's either buggy or misnamed, reality suggests.  It was
invented to account for metafile test failures, which
require a visible desktop, see eg.

http://test.winehq.org/data/200501271000/nt4_IvanLeo/gdi32:metafile.txt

Now it looks it depends on something else instead, and you
are in a pretty good position to find out what!  I haven't
got a clue, including this flag was suggested by others.

> What's the criteria for 'running on a visible desktop'?

programs/winetest/main.c (as offered by Dmitry Timoshkov):

static int running_on_visible_desktop ()
{
    return (GetWindowLongA (GetDesktopWindow (), GWL_STYLE) & WS_VISIBLE != 0);
}
-- 
Feri.



More information about the wine-devel mailing list