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
67ee1d3f
Commit
67ee1d3f
authored
Aug 22, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Get rid of the CLIPBOARDINFO structure.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
98b24dcb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
32 deletions
+11
-32
clipboard.c
dlls/user32/clipboard.c
+11
-32
No files found.
dlls/user32/clipboard.c
View file @
67ee1d3f
...
...
@@ -55,15 +55,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
clipboard
);
#define CF_REGFORMATBASE 0xC000
typedef
struct
{
HWND
hWndOpen
;
HWND
hWndOwner
;
UINT
flags
;
}
CLIPBOARDINFO
,
*
LPCLIPBOARDINFO
;
/*
* Indicates if data has changed since open.
*/
...
...
@@ -71,26 +62,19 @@ static BOOL bCBHasChanged = FALSE;
/**************************************************************************
*
CLIPBOARD_GetClipboardInfo
*
get_clipboard_flags
*/
static
BOOL
CLIPBOARD_GetClipboardInfo
(
LPCLIPBOARDINFO
cbInfo
)
static
UINT
get_clipboard_flags
(
void
)
{
BOOL
bRet
;
UINT
ret
=
0
;
SERVER_START_REQ
(
set_clipboard_info
)
{
req
->
flags
=
0
;
if
(((
bRet
=
!
wine_server_call_err
(
req
))))
{
cbInfo
->
hWndOpen
=
wine_server_ptr_handle
(
reply
->
old_clipboard
);
cbInfo
->
hWndOwner
=
wine_server_ptr_handle
(
reply
->
old_owner
);
cbInfo
->
flags
=
reply
->
flags
;
}
if
(
!
wine_server_call_err
(
req
))
ret
=
reply
->
flags
;
}
SERVER_END_REQ
;
return
bR
et
;
return
r
et
;
}
...
...
@@ -353,8 +337,8 @@ BOOL WINAPI ChangeClipboardChain( HWND hwnd, HWND next )
*/
HANDLE
WINAPI
SetClipboardData
(
UINT
wFormat
,
HANDLE
hData
)
{
CLIPBOARDINFO
cbinfo
;
HANDLE
hResult
=
0
;
UINT
flags
;
TRACE
(
"(%04X, %p) !
\n
"
,
wFormat
,
hData
);
...
...
@@ -366,14 +350,14 @@ HANDLE WINAPI SetClipboardData(UINT wFormat, HANDLE hData)
/* If it's not owned, data can only be set if the format isn't
available and its rendering is not delayed */
if
(
!
CLIPBOARD_GetClipboardInfo
(
&
cbinfo
)
||
(
!
(
cbinfo
.
flags
&
CB_OWNER
)
&&
!
hData
)
)
flags
=
get_clipboard_flags
();
if
(
!
(
flags
&
CB_OWNER
)
&&
!
hData
)
{
WARN
(
"Clipboard not owned by calling task. Operation failed.
\n
"
);
return
0
;
}
if
(
USER_Driver
->
pSetClipboardData
(
wFormat
,
hData
,
cbinfo
.
flags
&
CB_OWNER
))
if
(
USER_Driver
->
pSetClipboardData
(
wFormat
,
hData
,
flags
&
CB_OWNER
))
{
hResult
=
hData
;
bCBHasChanged
=
TRUE
;
...
...
@@ -399,12 +383,9 @@ INT WINAPI CountClipboardFormats(void)
*/
UINT
WINAPI
EnumClipboardFormats
(
UINT
wFormat
)
{
CLIPBOARDINFO
cbinfo
;
TRACE
(
"(%04X)
\n
"
,
wFormat
);
if
(
!
CLIPBOARD_GetClipboardInfo
(
&
cbinfo
)
||
(
~
cbinfo
.
flags
&
CB_OPEN
))
if
(
!
(
get_clipboard_flags
()
&
CB_OPEN
))
{
WARN
(
"Clipboard not opened by calling task.
\n
"
);
SetLastError
(
ERROR_CLIPBOARD_NOT_OPEN
);
...
...
@@ -431,12 +412,10 @@ BOOL WINAPI IsClipboardFormatAvailable(UINT wFormat)
HANDLE
WINAPI
GetClipboardData
(
UINT
wFormat
)
{
HANDLE
hData
=
0
;
CLIPBOARDINFO
cbinfo
;
TRACE
(
"%04x
\n
"
,
wFormat
);
if
(
!
CLIPBOARD_GetClipboardInfo
(
&
cbinfo
)
||
(
~
cbinfo
.
flags
&
CB_OPEN
))
if
(
!
(
get_clipboard_flags
()
&
CB_OPEN
))
{
WARN
(
"Clipboard not opened by calling task.
\n
"
);
SetLastError
(
ERROR_CLIPBOARD_NOT_OPEN
);
...
...
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