Re: Better test for visible desktop, should be working on all platforms.
"Jakob Eriksson" <jakov(a)vmlinux.org> wrote:
I took this test from the gdi32 conformance tests, since it fails reliably when run under a non visible desktop, regardless of platform.
It's not pretty, but I don't have an NT4 to test with, so I didn't want to change anything. Later I can refactor it into exactly the failing part.
Did you consider implementing the approach Robert Shearman has pointed out? -- Dmitry.
"Dmitry Timoshkov" <dmitry(a)baikal.ru> wrote:
It's not pretty, but I don't have an NT4 to test with, so I didn't want to change anything. Later I can refactor it into exactly the failing part.
Did you consider implementing the approach Robert Shearman has pointed out?
Here is another way for testing for a visible desktop which just came to my mind (based on the EMF test failure analysis and the description from http://www.codeproject.com/gdi/cliprgnguide.asp): static int running_on_visible_desktop () { BOOL visible; HWND desktop; HDC hdc; HRGN hrgn; RECT rc; desktop = GetDesktopWindow(); hdc = GetDC(desktop); hrgn = CreateRectRgn(0, 0, 0, 0); GetRandomRgn(hdc, hrgn, SYSRGN); visible = GetRgnBox(hrgn, &rc) != NULLREGION; DeleteObject(hrgn); ReleaseDC(desktop, hdc); return visible; } -- Dmitry.
Dmitry Timoshkov wrote:
"Dmitry Timoshkov" <dmitry(a)baikal.ru> wrote:
It's not pretty, but I don't have an NT4 to test with, so I didn't want to change anything. Later I can refactor it into exactly the failing part.
Did you consider implementing the approach Robert Shearman has pointed out?
Here is another way for testing for a visible desktop which just came to my mind (based on the EMF test failure analysis and the description from http://www.codeproject.com/gdi/cliprgnguide.asp):
static int running_on_visible_desktop () { BOOL visible; HWND desktop; HDC hdc; HRGN hrgn; RECT rc;
desktop = GetDesktopWindow(); hdc = GetDC(desktop); hrgn = CreateRectRgn(0, 0, 0, 0); GetRandomRgn(hdc, hrgn, SYSRGN);
visible = GetRgnBox(hrgn, &rc) != NULLREGION;
DeleteObject(hrgn); ReleaseDC(desktop, hdc);
return visible; }
Go for it, could you send a patch to wine-cvs? regards, Jakob
Simple qu, since I'm not that familiar with Wine yet. How can I run a desktop under wine? Is it poss to have two or more apps running concurrently in the same wine session? TIA. On Sat, 5 Mar 2005 21:11:59 +0800, Dmitry Timoshkov <dmitry(a)baikal.ru> wrote:
"Dmitry Timoshkov" <dmitry(a)baikal.ru> wrote:
It's not pretty, but I don't have an NT4 to test with, so I didn't want to change anything. Later I can refactor it into exactly the failing part.
Did you consider implementing the approach Robert Shearman has pointed out?
Here is another way for testing for a visible desktop which just came to my mind (based on the EMF test failure analysis and the description from http://www.codeproject.com/gdi/cliprgnguide.asp):
static int running_on_visible_desktop () { BOOL visible; HWND desktop; HDC hdc; HRGN hrgn; RECT rc;
desktop = GetDesktopWindow(); hdc = GetDC(desktop); hrgn = CreateRectRgn(0, 0, 0, 0); GetRandomRgn(hdc, hrgn, SYSRGN);
visible = GetRgnBox(hrgn, &rc) != NULLREGION;
DeleteObject(hrgn); ReleaseDC(desktop, hdc);
return visible; }
-- Using Opera e-mail on Gentoo Linux
participants (3)
-
Dmitry Timoshkov -
Jakob Eriksson -
peter@piments.com