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
617e5162
Commit
617e5162
authored
May 01, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Don't free the pixmap in X11DRV_DIB_CreateDIBFromPixmap since we don't own it.
parent
6cb1ac05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
dib.c
dlls/winex11.drv/dib.c
+9
-12
No files found.
dlls/winex11.drv/dib.c
View file @
617e5162
...
...
@@ -4874,7 +4874,8 @@ HGLOBAL X11DRV_DIB_CreateDIBFromPixmap(Pixmap pixmap, HDC hdc)
{
HDC
hdcMem
;
X_PHYSBITMAP
*
physBitmap
;
HBITMAP
hBmp
=
0
,
old
;
Pixmap
orig_pixmap
;
HBITMAP
hBmp
=
0
;
HGLOBAL
hPackedDIB
=
0
;
Window
root
;
int
x
,
y
;
/* Unused */
...
...
@@ -4899,17 +4900,14 @@ HGLOBAL X11DRV_DIB_CreateDIBFromPixmap(Pixmap pixmap, HDC hdc)
/* force bitmap to be owned by a screen DC */
hdcMem
=
CreateCompatibleDC
(
hdc
);
old
=
SelectObject
(
hdcMem
,
hBmp
);
SelectObject
(
hdcMem
,
SelectObject
(
hdcMem
,
hBmp
));
DeleteDC
(
hdcMem
);
physBitmap
=
X11DRV_get_phys_bitmap
(
hBmp
);
wine_tsx11_lock
();
if
(
physBitmap
->
pixmap
)
XFreePixmap
(
gdi_display
,
physBitmap
->
pixmap
)
;
/* swap the new pixmap in */
orig_pixmap
=
physBitmap
->
pixmap
;
physBitmap
->
pixmap
=
pixmap
;
wine_tsx11_unlock
();
SelectObject
(
hdcMem
,
old
);
DeleteDC
(
hdcMem
);
/*
* Create a packed DIB from the Pixmap wrapper bitmap created above.
...
...
@@ -4918,9 +4916,8 @@ HGLOBAL X11DRV_DIB_CreateDIBFromPixmap(Pixmap pixmap, HDC hdc)
*/
hPackedDIB
=
X11DRV_DIB_CreateDIBFromBitmap
(
hdc
,
hBmp
);
/* We can now get rid of the HBITMAP wrapper we created earlier.
* Note: Simply calling DeleteObject will free the embedded Pixmap as well.
*/
/* we can now get rid of the HBITMAP and its original pixmap */
physBitmap
->
pixmap
=
orig_pixmap
;
DeleteObject
(
hBmp
);
TRACE
(
"
\t
Returning packed DIB %p
\n
"
,
hPackedDIB
);
...
...
@@ -4956,6 +4953,6 @@ Pixmap X11DRV_DIB_CreatePixmapFromDIB( HGLOBAL hPackedDIB, HDC hdc )
/* Delete the DDB we created earlier now that we have stolen its pixmap */
DeleteObject
(
hBmp
);
TRACE
(
"Returning Pixmap %l
d
\n
"
,
pixmap
);
TRACE
(
"Returning Pixmap %l
x
\n
"
,
pixmap
);
return
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