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
80d02bc8
Commit
80d02bc8
authored
Sep 22, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Support import multiple drag&drop properties in a single call.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f39cc3f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
26 deletions
+21
-26
clipboard.c
dlls/winex11.drv/clipboard.c
+14
-6
x11drv.h
dlls/winex11.drv/x11drv.h
+3
-2
xdnd.c
dlls/winex11.drv/xdnd.c
+4
-18
No files found.
dlls/winex11.drv/clipboard.c
View file @
80d02bc8
...
...
@@ -1267,13 +1267,21 @@ static HANDLE import_selection( Display *display, Window win, Atom selection,
*
* Import the X selection into the clipboard format registered for the given X target.
*/
HANDLE
X11DRV_CLIPBOARD_ImportSelection
(
Display
*
display
,
Window
win
,
Atom
selection
,
Atom
target
,
UINT
*
windowsFormat
)
void
X11DRV_CLIPBOARD_ImportSelection
(
Display
*
display
,
Window
win
,
Atom
selection
,
Atom
*
targets
,
UINT
count
,
void
(
*
callback
)(
Atom
,
UINT
,
HANDLE
))
{
struct
clipboard_format
*
format
=
X11DRV_CLIPBOARD_LookupProperty
(
NULL
,
target
);
if
(
!
format
)
return
0
;
*
windowsFormat
=
format
->
id
;
return
import_selection
(
display
,
win
,
selection
,
format
);
UINT
i
;
HANDLE
handle
;
struct
clipboard_format
*
format
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
!
(
format
=
X11DRV_CLIPBOARD_LookupProperty
(
NULL
,
targets
[
i
]
)))
continue
;
if
(
!
format
->
id
)
continue
;
if
(
!
(
handle
=
import_selection
(
display
,
win
,
selection
,
format
)))
continue
;
callback
(
targets
[
i
],
format
->
id
,
handle
);
}
}
...
...
dlls/winex11.drv/x11drv.h
View file @
80d02bc8
...
...
@@ -239,8 +239,9 @@ extern void X11DRV_XDND_EnterEvent( HWND hWnd, XClientMessageEvent *event ) DECL
extern
void
X11DRV_XDND_PositionEvent
(
HWND
hWnd
,
XClientMessageEvent
*
event
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_XDND_DropEvent
(
HWND
hWnd
,
XClientMessageEvent
*
event
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_XDND_LeaveEvent
(
HWND
hWnd
,
XClientMessageEvent
*
event
)
DECLSPEC_HIDDEN
;
extern
HANDLE
X11DRV_CLIPBOARD_ImportSelection
(
Display
*
display
,
Window
win
,
Atom
selection
,
Atom
target
,
UINT
*
windowsFormat
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_CLIPBOARD_ImportSelection
(
Display
*
display
,
Window
win
,
Atom
selection
,
Atom
*
targets
,
UINT
count
,
void
(
*
callback
)(
Atom
,
UINT
,
HANDLE
))
DECLSPEC_HIDDEN
;
/**************************************************************************
* X11 GDI driver
...
...
dlls/winex11.drv/xdnd.c
View file @
80d02bc8
...
...
@@ -67,7 +67,7 @@ static HWND XDNDLastTargetWnd;
/* might be an ancestor of XDNDLastTargetWnd */
static
HWND
XDNDLastDropTargetWnd
;
static
void
X11DRV_XDND_InsertXDNDData
(
int
property
,
int
format
,
HANDLE
contents
);
static
void
X11DRV_XDND_InsertXDNDData
(
Atom
property
,
UINT
format
,
HANDLE
contents
);
static
void
X11DRV_XDND_ResolveProperty
(
Display
*
display
,
Window
xwin
,
Time
tm
,
Atom
*
types
,
unsigned
long
count
);
static
BOOL
X11DRV_XDND_HasHDROP
(
void
);
...
...
@@ -492,7 +492,6 @@ void X11DRV_XDND_LeaveEvent( HWND hWnd, XClientMessageEvent *event )
static
void
X11DRV_XDND_ResolveProperty
(
Display
*
display
,
Window
xwin
,
Time
tm
,
Atom
*
types
,
unsigned
long
count
)
{
unsigned
int
i
;
XDNDDATA
*
current
,
*
next
;
BOOL
haveHDROP
=
FALSE
;
...
...
@@ -500,21 +499,8 @@ static void X11DRV_XDND_ResolveProperty(Display *display, Window xwin, Time tm,
X11DRV_XDND_FreeDragDropOp
();
/* Clear previously cached data */
for
(
i
=
0
;
i
<
count
;
i
++
)
{
HANDLE
contents
;
UINT
windowsFormat
;
TRACE
(
"requesting atom %ld from xwin %ld
\n
"
,
types
[
i
],
xwin
);
if
(
types
[
i
]
==
0
)
continue
;
contents
=
X11DRV_CLIPBOARD_ImportSelection
(
display
,
xwin
,
x11drv_atom
(
XdndSelection
),
types
[
i
],
&
windowsFormat
);
if
(
contents
)
X11DRV_XDND_InsertXDNDData
(
types
[
i
],
windowsFormat
,
contents
);
}
X11DRV_CLIPBOARD_ImportSelection
(
display
,
xwin
,
x11drv_atom
(
XdndSelection
),
types
,
count
,
X11DRV_XDND_InsertXDNDData
);
/* On Windows when there is a CF_HDROP, there are no other CF_ formats.
* foobar2000 relies on this (spaces -> %20's without it).
...
...
@@ -547,7 +533,7 @@ static void X11DRV_XDND_ResolveProperty(Display *display, Window xwin, Time tm,
*
* Cache available XDND property
*/
static
void
X11DRV_XDND_InsertXDNDData
(
int
property
,
int
format
,
HANDLE
contents
)
static
void
X11DRV_XDND_InsertXDNDData
(
Atom
property
,
UINT
format
,
HANDLE
contents
)
{
LPXDNDDATA
current
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
XDNDDATA
));
...
...
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