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
d5292cb3
Commit
d5292cb3
authored
Apr 09, 2006
by
Dan Kegel
Committed by
Alexandre Julliard
Apr 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11drv: Fix two clipboard bugs.
Fix two clipboard problems that caused BadAtom crashes and caused some clipboard formats to not be exported properly.
parent
12be14b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
clipboard.c
dlls/x11drv/clipboard.c
+16
-8
No files found.
dlls/x11drv/clipboard.c
View file @
d5292cb3
...
...
@@ -1784,6 +1784,10 @@ static VOID X11DRV_CLIPBOARD_InsertSelectionProperties(Display *display, Atom* p
if
(
names
)
{
wine_tsx11_lock
();
/* FIXME: we're at the mercy of the app sending the event here.
* Currently if they send a bogus atom, we will crash.
* We should handle BadAtom errors gracefully in this call.
*/
XGetAtomNames
(
display
,
atoms
,
nb_atoms
,
names
);
wine_tsx11_unlock
();
for
(
i
=
0
;
i
<
nb_atoms
;
i
++
)
...
...
@@ -2790,6 +2794,13 @@ static Atom X11DRV_SelectionRequest_TARGETS( Display *display, Window requestor,
LPWINE_CLIPFORMAT
lpFormats
;
LPWINE_CLIPDATA
lpData
;
/* Create X atoms for any clipboard types which don't have atoms yet.
* This avoids sending bogus zero atoms.
* Without this, copying might not have access to all clipboard types.
* FIXME: is it safe to call this here?
*/
intern_atoms
();
/*
* Count the number of items we wish to expose as selection targets.
*/
...
...
@@ -2804,7 +2815,7 @@ static Atom X11DRV_SelectionRequest_TARGETS( Display *display, Window requestor,
while
(
lpFormats
)
{
if
((
lpFormats
->
wFormatID
==
lpData
->
wFormatID
)
&&
lpFormats
->
lpDrvExportFunc
)
lpFormats
->
lpDrvExportFunc
&&
lpFormats
->
drvData
)
cTargets
++
;
lpFormats
=
lpFormats
->
NextFormat
;
...
...
@@ -2832,7 +2843,7 @@ static Atom X11DRV_SelectionRequest_TARGETS( Display *display, Window requestor,
while
(
lpFormats
)
{
if
((
lpFormats
->
wFormatID
==
lpData
->
wFormatID
)
&&
lpFormats
->
lpDrvExportFunc
)
lpFormats
->
lpDrvExportFunc
&&
lpFormats
->
drvData
)
targets
[
i
++
]
=
lpFormats
->
drvData
;
lpFormats
=
lpFormats
->
NextFormat
;
...
...
@@ -2849,12 +2860,9 @@ static Atom X11DRV_SelectionRequest_TARGETS( Display *display, Window requestor,
unsigned
int
i
;
for
(
i
=
0
;
i
<
cTargets
;
i
++
)
{
if
(
targets
[
i
])
{
char
*
itemFmtName
=
XGetAtomName
(
display
,
targets
[
i
]);
TRACE
(
"
\t
Atom# %d: Property %ld Type %s
\n
"
,
i
,
targets
[
i
],
itemFmtName
);
XFree
(
itemFmtName
);
}
char
*
itemFmtName
=
XGetAtomName
(
display
,
targets
[
i
]);
TRACE
(
"
\t
Atom# %d: Property %ld Type %s
\n
"
,
i
,
targets
[
i
],
itemFmtName
);
XFree
(
itemFmtName
);
}
}
...
...
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