Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
454c1b75
Commit
454c1b75
authored
Mar 10, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement a test for the desktop visibility based on the MSDN article
pointed out by Robert Shearman.
parent
af54602c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
main.c
programs/winetest/main.c
+15
-16
No files found.
programs/winetest/main.c
View file @
454c1b75
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <errno.h>
#ifdef HAVE_UNISTD_H
#ifdef HAVE_UNISTD_H
# include <unistd.h>
# include <unistd.h>
...
@@ -68,23 +69,21 @@ static int running_under_wine ()
...
@@ -68,23 +69,21 @@ static int running_under_wine ()
static
int
running_on_visible_desktop
()
static
int
running_on_visible_desktop
()
{
{
BOOL
visible
;
FARPROC
pGetProcessWindowStation
=
GetProcAddress
(
GetModuleHandle
(
"user32.dll"
),
"GetProcessWindowStation"
);
HWND
desktop
;
HDC
hdc
;
HRGN
hrgn
;
RECT
rc
;
desktop
=
GetDesktopWindow
();
if
(
pGetProcessWindowStation
)
hdc
=
GetDC
(
desktop
);
{
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
DWORD
len
;
GetRandomRgn
(
hdc
,
hrgn
,
SYSRGN
);
HWINSTA
wstation
;
USEROBJECTFLAGS
uoflags
;
visible
=
GetRgnBox
(
hrgn
,
&
rc
)
!=
NULLREGION
;
FARPROC
pGetUserObjectInformationA
=
GetProcAddress
(
GetModuleHandle
(
"user32.dll"
),
"GetUserObjectInformationA"
);
DeleteObject
(
hrgn
);
wstation
=
(
HWINSTA
)
pGetProcessWindowStation
();
ReleaseDC
(
desktop
,
hdc
);
assert
(
pGetUserObjectInformationA
(
wstation
,
UOI_FLAGS
,
&
uoflags
,
sizeof
(
uoflags
),
&
len
));
return
(
uoflags
.
dwFlags
&
WSF_VISIBLE
)
!=
0
;
return
visible
;
}
else
return
IsWindowVisible
(
GetDesktopWindow
());
}
}
void
print_version
()
void
print_version
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment