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
0d4451a8
Commit
0d4451a8
authored
Apr 17, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Apr 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Fix ordering of synthesized text formats.
parent
ea0b3b42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
1 deletion
+72
-1
clipboard.c
dlls/user32/tests/clipboard.c
+71
-0
clipboard.c
dlls/winex11.drv/clipboard.c
+1
-1
No files found.
dlls/user32/tests/clipboard.c
View file @
0d4451a8
...
...
@@ -21,6 +21,7 @@
#include "wine/test.h"
#include "winbase.h"
#include "winerror.h"
#include "wingdi.h"
#include "winuser.h"
static
BOOL
is_win9x
=
FALSE
;
...
...
@@ -190,6 +191,75 @@ todo_wine
test_last_error
(
ERROR_CLIPBOARD_NOT_OPEN
);
}
static
HGLOBAL
create_text
(
void
)
{
HGLOBAL
h
=
GlobalAlloc
(
GMEM_DDESHARE
|
GMEM_MOVEABLE
,
5
);
char
*
p
=
GlobalLock
(
h
);
strcpy
(
p
,
"test"
);
GlobalUnlock
(
h
);
return
h
;
}
static
HENHMETAFILE
create_emf
(
void
)
{
const
RECT
rect
=
{
0
,
0
,
100
,
100
};
HDC
hdc
=
CreateEnhMetaFileA
(
NULL
,
NULL
,
&
rect
,
"HENHMETAFILE Ole Clipboard Test
\0
Test
\0\0
"
);
ExtTextOutA
(
hdc
,
0
,
0
,
ETO_OPAQUE
,
&
rect
,
"Test String"
,
strlen
(
"Test String"
),
NULL
);
return
CloseEnhMetaFile
(
hdc
);
}
static
void
test_synthesized
(
void
)
{
HGLOBAL
h
,
htext
;
HENHMETAFILE
emf
;
BOOL
r
;
UINT
cf
;
htext
=
create_text
();
emf
=
create_emf
();
r
=
OpenClipboard
(
NULL
);
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
r
=
EmptyClipboard
();
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
h
=
SetClipboardData
(
CF_TEXT
,
htext
);
ok
(
h
==
htext
,
"got %p
\n
"
,
h
);
h
=
SetClipboardData
(
CF_ENHMETAFILE
,
emf
);
ok
(
h
==
emf
,
"got %p
\n
"
,
h
);
r
=
CloseClipboard
();
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
r
=
OpenClipboard
(
NULL
);
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
cf
=
EnumClipboardFormats
(
0
);
ok
(
cf
==
CF_TEXT
,
"cf %08x
\n
"
,
cf
);
cf
=
EnumClipboardFormats
(
cf
);
ok
(
cf
==
CF_ENHMETAFILE
,
"cf %08x
\n
"
,
cf
);
cf
=
EnumClipboardFormats
(
cf
);
todo_wine
ok
(
cf
==
CF_LOCALE
,
"cf %08x
\n
"
,
cf
);
if
(
cf
==
CF_LOCALE
)
cf
=
EnumClipboardFormats
(
cf
);
ok
(
cf
==
CF_OEMTEXT
,
"cf %08x
\n
"
,
cf
);
cf
=
EnumClipboardFormats
(
cf
);
ok
(
cf
==
CF_UNICODETEXT
,
"cf %08x
\n
"
,
cf
);
cf
=
EnumClipboardFormats
(
cf
);
todo_wine
ok
(
cf
==
CF_METAFILEPICT
,
"cf %08x
\n
"
,
cf
);
if
(
cf
==
CF_METAFILEPICT
)
cf
=
EnumClipboardFormats
(
cf
);
ok
(
cf
==
0
,
"cf %08x
\n
"
,
cf
);
r
=
EmptyClipboard
();
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
r
=
CloseClipboard
();
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
}
START_TEST
(
clipboard
)
{
SetLastError
(
0xdeadbeef
);
...
...
@@ -198,4 +268,5 @@ START_TEST(clipboard)
test_RegisterClipboardFormatA
();
test_ClipboardOwner
();
test_synthesized
();
}
dlls/winex11.drv/clipboard.c
View file @
0d4451a8
...
...
@@ -2778,9 +2778,9 @@ void CDECL X11DRV_EndClipboardUpdate(void)
INT
count
=
ClipDataCount
;
/* Do Unicode <-> Text <-> OEM mapping */
X11DRV_CLIPBOARD_SynthesizeData
(
CF_UNICODETEXT
);
X11DRV_CLIPBOARD_SynthesizeData
(
CF_TEXT
);
X11DRV_CLIPBOARD_SynthesizeData
(
CF_OEMTEXT
);
X11DRV_CLIPBOARD_SynthesizeData
(
CF_UNICODETEXT
);
/* Enhmetafile <-> MetafilePict mapping */
X11DRV_CLIPBOARD_SynthesizeData
(
CF_ENHMETAFILE
);
...
...
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