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
e85895e4
Commit
e85895e4
authored
May 11, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Use the create_pixmap_from_image helper to export XA_PIXMAP clipboard formats.
parent
bf2ad337
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
24 deletions
+16
-24
clipboard.c
dlls/winex11.drv/clipboard.c
+16
-24
No files found.
dlls/winex11.drv/clipboard.c
View file @
e85895e4
...
...
@@ -1758,7 +1758,6 @@ static HANDLE X11DRV_CLIPBOARD_ExportString(Display *display, Window requestor,
static
HANDLE
X11DRV_CLIPBOARD_ExportXAPIXMAP
(
Display
*
display
,
Window
requestor
,
Atom
aTarget
,
Atom
rprop
,
LPWINE_CLIPDATA
lpdata
,
LPDWORD
lpBytes
)
{
HDC
hdc
,
memdc
;
HANDLE
hData
;
unsigned
char
*
lpData
;
...
...
@@ -1770,33 +1769,26 @@ static HANDLE X11DRV_CLIPBOARD_ExportXAPIXMAP(Display *display, Window requestor
if
(
!
lpdata
->
drvData
)
/* If not already rendered */
{
/* Create a DDB from the DIB */
Pixmap
pixmap
=
0
;
X_PHYSBITMAP
*
physBitmap
;
HBITMAP
hBmp
;
Pixmap
pixmap
;
XVisualInfo
vis
;
LPBITMAPINFO
pbmi
;
struct
gdi_image_bits
bits
;
memset
(
&
vis
,
0
,
sizeof
(
vis
)
);
vis
.
visual
=
visual
;
vis
.
depth
=
screen_depth
;
vis
.
visualid
=
visual
->
visualid
;
vis
.
class
=
visual
->
class
;
vis
.
red_mask
=
visual
->
red_mask
;
vis
.
green_mask
=
visual
->
green_mask
;
vis
.
blue_mask
=
visual
->
blue_mask
;
hdc
=
GetDC
(
0
);
pbmi
=
GlobalLock
(
lpdata
->
hData
);
hBmp
=
CreateDIBitmap
(
hdc
,
&
pbmi
->
bmiHeader
,
CBM_INIT
,
(
LPBYTE
)
pbmi
+
bitmap_info_size
(
pbmi
,
DIB_RGB_COLORS
),
pbmi
,
DIB_RGB_COLORS
);
bits
.
ptr
=
(
LPBYTE
)
pbmi
+
bitmap_info_size
(
pbmi
,
DIB_RGB_COLORS
);
bits
.
free
=
NULL
;
bits
.
is_copy
=
FALSE
;
pixmap
=
create_pixmap_from_image
(
0
,
&
vis
,
pbmi
,
&
bits
,
DIB_RGB_COLORS
);
GlobalUnlock
(
lpdata
->
hData
);
/* make sure it's owned by x11drv */
memdc
=
CreateCompatibleDC
(
hdc
);
SelectObject
(
memdc
,
hBmp
);
DeleteDC
(
memdc
);
/* clear the physBitmap so that we can steal its pixmap */
if
((
physBitmap
=
X11DRV_get_phys_bitmap
(
hBmp
)))
{
pixmap
=
physBitmap
->
pixmap
;
physBitmap
->
pixmap
=
0
;
}
DeleteObject
(
hBmp
);
ReleaseDC
(
0
,
hdc
);
lpdata
->
drvData
=
pixmap
;
}
...
...
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