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
f2640745
Commit
f2640745
authored
Nov 22, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Nov 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Make macdrv_EnumClipboardFormats() always use macdrv_copy_pasteboard_formats().
This makes sure that the formats are enumerated in a consistent order.
parent
b28a014c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
31 deletions
+12
-31
clipboard.c
dlls/winemac.drv/clipboard.c
+12
-31
No files found.
dlls/winemac.drv/clipboard.c
View file @
f2640745
...
...
@@ -1921,6 +1921,7 @@ void CDECL macdrv_EndClipboardUpdate(void)
*/
UINT
CDECL
macdrv_EnumClipboardFormats
(
UINT
prev_format
)
{
CFArrayRef
formats
;
CFIndex
count
;
CFIndex
i
;
UINT
ret
=
0
;
...
...
@@ -1928,43 +1929,23 @@ UINT CDECL macdrv_EnumClipboardFormats(UINT prev_format)
TRACE
(
"prev_format %s
\n
"
,
debugstr_format
(
prev_format
));
check_clipboard_ownership
(
NULL
);
if
(
prev_format
)
formats
=
macdrv_copy_pasteboard_formats
(
NULL
);
if
(
formats
)
{
CFArrayRef
formats
=
macdrv_copy_pasteboard_formats
(
NULL
);
if
(
formats
)
count
=
CFArrayGetCount
(
formats
);
if
(
prev_format
)
{
count
=
CFArrayGetCount
(
formats
);
i
=
CFArrayGetFirstIndexOfValue
(
formats
,
CFRangeMake
(
0
,
count
),
(
void
*
)
prev_format
);
if
(
i
!=
kCFNotFound
&&
i
+
1
<
count
)
ret
=
(
UINT
)
CFArrayGetValueAtIndex
(
formats
,
i
+
1
);
CFRelease
(
formats
);
if
(
i
!=
kCFNotFound
)
i
++
;
}
}
else
{
CFArrayRef
types
=
macdrv_copy_pasteboard_types
(
NULL
);
if
(
types
)
{
count
=
CFArrayGetCount
(
types
);
TRACE
(
"got %ld types
\n
"
,
count
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
CFStringRef
type
=
CFArrayGetValueAtIndex
(
types
,
i
);
WINE_CLIPFORMAT
*
format
=
format_for_type
(
NULL
,
type
);
else
i
=
0
;
if
(
format
)
{
ret
=
format
->
format_id
;
break
;
}
}
if
(
i
!=
kCFNotFound
&&
i
<
count
)
ret
=
(
UINT
)
CFArrayGetValueAtIndex
(
formats
,
i
);
CFRelease
(
types
);
}
else
WARN
(
"Failed to copy pasteboard types
\n
"
);
CFRelease
(
formats
);
}
TRACE
(
" -> %u
\n
"
,
ret
);
...
...
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