Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
085ef06b
Commit
085ef06b
authored
Oct 27, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added is_window_visible function.
parent
7d716db7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
user.h
server/user.h
+1
-0
window.c
server/window.c
+22
-3
No files found.
server/user.h
View file @
085ef06b
...
...
@@ -96,6 +96,7 @@ static inline struct region *create_empty_region(void) { return create_region( N
extern
void
destroy_thread_windows
(
struct
thread
*
thread
);
extern
int
is_child_window
(
user_handle_t
parent
,
user_handle_t
child
);
extern
int
is_top_level_window
(
user_handle_t
window
);
extern
int
is_window_visible
(
user_handle_t
window
);
extern
int
make_window_active
(
user_handle_t
window
);
extern
struct
thread
*
get_window_thread
(
user_handle_t
handle
);
extern
user_handle_t
window_from_point
(
int
x
,
int
y
);
...
...
server/window.c
View file @
085ef06b
...
...
@@ -405,6 +405,27 @@ int make_window_active( user_handle_t window )
return
1
;
}
/* check if window and all its ancestors are visible */
static
int
is_visible
(
const
struct
window
*
win
)
{
while
(
win
&&
win
!=
top_window
)
{
if
(
!
(
win
->
style
&
WS_VISIBLE
))
return
0
;
win
=
win
->
parent
;
/* if parent is minimized children are not visible */
if
(
win
&&
(
win
->
style
&
WS_MINIMIZE
))
return
0
;
}
return
1
;
}
/* same as is_visible but takes a window handle */
int
is_window_visible
(
user_handle_t
window
)
{
struct
window
*
win
=
get_user_object
(
window
,
USER_WINDOW
);
if
(
!
win
)
return
0
;
return
is_visible
(
win
);
}
/* check if point is inside the window */
static
inline
int
is_point_in_window
(
struct
window
*
win
,
int
x
,
int
y
)
{
...
...
@@ -601,15 +622,13 @@ static struct region *get_visible_region( struct window *win, struct window *top
unsigned
int
flags
)
{
struct
region
*
tmp
,
*
region
;
struct
window
*
ptr
;
int
offset_x
,
offset_y
;
if
(
!
(
region
=
create_empty_region
()))
return
NULL
;
/* first check if all ancestors are visible */
for
(
ptr
=
win
;
ptr
!=
top_window
;
ptr
=
ptr
->
parent
)
if
(
!
(
ptr
->
style
&
WS_VISIBLE
))
return
region
;
/* empty region */
if
(
!
is_visible
(
win
))
return
region
;
/* empty region */
/* create a region relative to the window itself */
...
...
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