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
5dcf157b
Commit
5dcf157b
authored
Jun 03, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Hide a window before destroying it if it was still visible.
parent
2d69ba45
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
34 deletions
+50
-34
thread.c
server/thread.c
+1
-1
window.c
server/window.c
+49
-33
No files found.
server/thread.c
View file @
5dcf157b
...
...
@@ -264,9 +264,9 @@ static void cleanup_thread( struct thread *thread )
if
(
thread
->
reply_fd
)
release_object
(
thread
->
reply_fd
);
if
(
thread
->
wait_fd
)
release_object
(
thread
->
wait_fd
);
free
(
thread
->
suspend_context
);
free_msg_queue
(
thread
);
cleanup_clipboard_thread
(
thread
);
destroy_thread_windows
(
thread
);
free_msg_queue
(
thread
);
close_thread_desktop
(
thread
);
for
(
i
=
0
;
i
<
MAX_INFLIGHT_FDS
;
i
++
)
{
...
...
server/window.c
View file @
5dcf157b
...
...
@@ -378,39 +378,6 @@ static void detach_window_thread( struct window *win )
win
->
thread
=
NULL
;
}
/* destroy a window */
void
destroy_window
(
struct
window
*
win
)
{
/* destroy all children */
while
(
!
list_empty
(
&
win
->
children
))
destroy_window
(
LIST_ENTRY
(
list_head
(
&
win
->
children
),
struct
window
,
entry
));
while
(
!
list_empty
(
&
win
->
unlinked
))
destroy_window
(
LIST_ENTRY
(
list_head
(
&
win
->
unlinked
),
struct
window
,
entry
));
/* reset global window pointers, if the corresponding window is destroyed */
if
(
win
==
shell_window
)
shell_window
=
NULL
;
if
(
win
==
shell_listview
)
shell_listview
=
NULL
;
if
(
win
==
progman_window
)
progman_window
=
NULL
;
if
(
win
==
taskman_window
)
taskman_window
=
NULL
;
free_user_handle
(
win
->
handle
);
destroy_properties
(
win
);
list_remove
(
&
win
->
entry
);
if
(
is_desktop_window
(
win
))
{
struct
desktop
*
desktop
=
win
->
desktop
;
assert
(
desktop
->
top_window
==
win
||
desktop
->
msg_window
==
win
);
if
(
desktop
->
top_window
==
win
)
desktop
->
top_window
=
NULL
;
else
desktop
->
msg_window
=
NULL
;
}
detach_window_thread
(
win
);
if
(
win
->
win_region
)
free_region
(
win
->
win_region
);
if
(
win
->
update_region
)
free_region
(
win
->
update_region
);
if
(
win
->
class
)
release_class
(
win
->
class
);
free
(
win
->
text
);
memset
(
win
,
0x55
,
sizeof
(
*
win
)
+
win
->
nb_extra_bytes
-
1
);
free
(
win
);
}
/* get the process owning the top window of a given desktop */
struct
process
*
get_top_window_owner
(
struct
desktop
*
desktop
)
{
...
...
@@ -1696,6 +1663,55 @@ static void set_window_region( struct window *win, struct region *region, int re
}
/* destroy a window */
void
destroy_window
(
struct
window
*
win
)
{
/* hide the window */
if
(
is_visible
(
win
))
{
struct
region
*
vis_rgn
=
get_visible_region
(
win
,
DCX_WINDOW
);
win
->
style
&=
~
WS_VISIBLE
;
if
(
vis_rgn
)
{
struct
region
*
exposed_rgn
=
expose_window
(
win
,
&
win
->
window_rect
,
vis_rgn
);
if
(
exposed_rgn
)
free_region
(
exposed_rgn
);
free_region
(
vis_rgn
);
}
validate_whole_window
(
win
);
validate_children
(
win
);
}
/* destroy all children */
while
(
!
list_empty
(
&
win
->
children
))
destroy_window
(
LIST_ENTRY
(
list_head
(
&
win
->
children
),
struct
window
,
entry
));
while
(
!
list_empty
(
&
win
->
unlinked
))
destroy_window
(
LIST_ENTRY
(
list_head
(
&
win
->
unlinked
),
struct
window
,
entry
));
/* reset global window pointers, if the corresponding window is destroyed */
if
(
win
==
shell_window
)
shell_window
=
NULL
;
if
(
win
==
shell_listview
)
shell_listview
=
NULL
;
if
(
win
==
progman_window
)
progman_window
=
NULL
;
if
(
win
==
taskman_window
)
taskman_window
=
NULL
;
free_user_handle
(
win
->
handle
);
destroy_properties
(
win
);
list_remove
(
&
win
->
entry
);
if
(
is_desktop_window
(
win
))
{
struct
desktop
*
desktop
=
win
->
desktop
;
assert
(
desktop
->
top_window
==
win
||
desktop
->
msg_window
==
win
);
if
(
desktop
->
top_window
==
win
)
desktop
->
top_window
=
NULL
;
else
desktop
->
msg_window
=
NULL
;
}
detach_window_thread
(
win
);
if
(
win
->
win_region
)
free_region
(
win
->
win_region
);
if
(
win
->
update_region
)
free_region
(
win
->
update_region
);
if
(
win
->
class
)
release_class
(
win
->
class
);
free
(
win
->
text
);
memset
(
win
,
0x55
,
sizeof
(
*
win
)
+
win
->
nb_extra_bytes
-
1
);
free
(
win
);
}
/* create a window */
DECL_HANDLER
(
create_window
)
{
...
...
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