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
0a8d5509
Commit
0a8d5509
authored
Jul 08, 2004
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Jul 08, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle case when data type is not registered.
parent
cddb03e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
event.c
dlls/x11drv/event.c
+22
-10
No files found.
dlls/x11drv/event.c
View file @
0a8d5509
...
...
@@ -578,13 +578,13 @@ static void EVENT_FocusOut( HWND hwnd, XFocusChangeEvent *event )
* EVENT_SelectionRequest_AddTARGETS
* Utility function for EVENT_SelectionRequest_TARGETS.
*/
static
void
EVENT_SelectionRequest_AddTARGETS
(
Atom
*
targets
,
unsigned
long
*
cTargets
,
Atom
prop
)
static
BOOL
EVENT_SelectionRequest_AddTARGETS
(
Atom
*
targets
,
unsigned
long
cTargets
,
Atom
prop
)
{
int
i
;
BOOL
bExists
;
/* Scan through what we have so far to avoid duplicates */
for
(
i
=
0
,
bExists
=
FALSE
;
i
<
*
cTargets
;
i
++
)
for
(
i
=
0
,
bExists
=
FALSE
;
i
<
cTargets
;
i
++
)
{
if
(
targets
[
i
]
==
prop
)
{
...
...
@@ -594,7 +594,9 @@ static void EVENT_SelectionRequest_AddTARGETS(Atom* targets, unsigned long* cTar
}
if
(
!
bExists
)
targets
[(
*
cTargets
)
++
]
=
prop
;
targets
[
cTargets
]
=
prop
;
return
!
bExists
;
}
...
...
@@ -613,7 +615,7 @@ static Atom EVENT_SelectionRequest_TARGETS( Display *display, Window requestor,
/*
* Count the number of items we wish to expose as selection targets.
* We include the TARGETS item, and propery aliases
* We include the TARGETS item, and proper
t
y aliases
*/
cTargets
=
X11DRV_CountClipboardFormats
()
+
1
;
...
...
@@ -629,6 +631,7 @@ static Atom EVENT_SelectionRequest_TARGETS( Display *display, Window requestor,
if
(
X11DRV_CLIPBOARD_LookupPropertyAlias
(
lpFormat
->
drvData
))
cTargets
++
;
}
/* else most likely unregistered format such as CF_PRIVATE or CF_GDIOBJ */
}
TRACE_
(
clipboard
)(
" found %ld formats
\n
"
,
cTargets
);
...
...
@@ -644,13 +647,22 @@ static Atom EVENT_SelectionRequest_TARGETS( Display *display, Window requestor,
{
lpFormat
=
X11DRV_CLIPBOARD_LookupFormat
(
wFormat
);
if
(
lpFormat
->
lpDrvExportFunc
)
EVENT_SelectionRequest_AddTARGETS
(
targets
,
&
cTargets
,
lpFormat
->
drvData
);
if
(
lpFormat
)
{
if
(
lpFormat
->
lpDrvExportFunc
)
{
if
(
EVENT_SelectionRequest_AddTARGETS
(
targets
,
cTargets
,
lpFormat
->
drvData
))
cTargets
++
;
}
/* Check if any alias should be listed */
alias
=
X11DRV_CLIPBOARD_LookupPropertyAlias
(
lpFormat
->
drvData
);
if
(
alias
)
EVENT_SelectionRequest_AddTARGETS
(
targets
,
&
cTargets
,
alias
);
/* Check if any alias should be listed */
alias
=
X11DRV_CLIPBOARD_LookupPropertyAlias
(
lpFormat
->
drvData
);
if
(
alias
)
{
if
(
EVENT_SelectionRequest_AddTARGETS
(
targets
,
cTargets
,
alias
))
cTargets
++
;
}
}
}
wine_tsx11_lock
();
...
...
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