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
25d9fc3e
Commit
25d9fc3e
authored
Jun 03, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Check for the current owner window on the server side for releases.
parent
bdf3f413
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
21 deletions
+10
-21
clipboard.c
dlls/user32/clipboard.c
+3
-14
user_private.h
dlls/user32/user_private.h
+1
-1
win.c
dlls/user32/win.c
+1
-2
clipboard.c
server/clipboard.c
+5
-4
No files found.
dlls/user32/clipboard.c
View file @
25d9fc3e
...
...
@@ -121,26 +121,15 @@ static BOOL CLIPBOARD_GetClipboardInfo(LPCLIPBOARDINFO cbInfo)
/**************************************************************************
* CLIPBOARD_ReleaseOwner
*/
BOOL
CLIPBOARD_ReleaseOwner
(
void
)
void
CLIPBOARD_ReleaseOwner
(
HWND
hwnd
)
{
BOOL
bRet
=
FALSE
;
SERVER_START_REQ
(
set_clipboard_info
)
{
req
->
flags
=
SET_CB_RELOWNER
|
SET_CB_SEQNO
;
if
(
wine_server_call_err
(
req
))
{
ERR
(
"Failed to set clipboard.
\n
"
);
}
else
{
bRet
=
TRUE
;
}
req
->
owner
=
wine_server_user_handle
(
hwnd
);
wine_server_call
(
req
);
}
SERVER_END_REQ
;
return
bRet
;
}
...
...
dlls/user32/user_private.h
View file @
25d9fc3e
...
...
@@ -222,7 +222,7 @@ extern HMODULE user32_module DECLSPEC_HIDDEN;
struct
dce
;
struct
tagWND
;
extern
BOOL
CLIPBOARD_ReleaseOwner
(
void
)
DECLSPEC_HIDDEN
;
extern
void
CLIPBOARD_ReleaseOwner
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
BOOL
FOCUS_MouseActivate
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
BOOL
set_capture_window
(
HWND
hwnd
,
UINT
gui_flags
,
HWND
*
prev_ret
)
DECLSPEC_HIDDEN
;
extern
void
free_dce
(
struct
dce
*
dce
,
HWND
hwnd
)
DECLSPEC_HIDDEN
;
...
...
dlls/user32/win.c
View file @
25d9fc3e
...
...
@@ -1875,8 +1875,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
WIN_SendDestroyMsg
(
hwnd
);
if
(
!
IsWindow
(
hwnd
))
return
TRUE
;
if
(
GetClipboardOwner
()
==
hwnd
)
CLIPBOARD_ReleaseOwner
();
CLIPBOARD_ReleaseOwner
(
hwnd
);
/* Destroy the window storage */
...
...
server/clipboard.c
View file @
25d9fc3e
...
...
@@ -172,11 +172,12 @@ static int set_clipboard_owner( struct clipboard *clipboard, user_handle_t win )
return
1
;
}
static
int
release_clipboard_owner
(
struct
clipboard
*
clipboard
)
static
int
release_clipboard_owner
(
struct
clipboard
*
clipboard
,
user_handle_t
win
)
{
if
(
clipboard
->
open_thread
&&
clipboard
->
open_thread
->
process
!=
current
->
process
)
if
((
clipboard
->
open_thread
&&
clipboard
->
open_thread
->
process
!=
current
->
process
)
||
(
win
&&
clipboard
->
owner_win
!=
get_user_full_handle
(
win
)))
{
set_
error
(
STATUS_WAS_LOCKED
);
set_
win32_error
(
ERROR_CLIPBOARD_NOT_OPEN
);
return
0
;
}
clipboard
->
owner_win
=
0
;
...
...
@@ -221,7 +222,7 @@ DECL_HANDLER(set_clipboard_info)
}
else
if
(
req
->
flags
&
SET_CB_RELOWNER
)
{
if
(
!
release_clipboard_owner
(
clipboard
))
return
;
if
(
!
release_clipboard_owner
(
clipboard
,
req
->
owner
))
return
;
}
if
(
req
->
flags
&
SET_CB_VIEWER
)
clipboard
->
viewer
=
get_user_full_handle
(
req
->
viewer
);
...
...
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