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
d1795f67
Commit
d1795f67
authored
Jan 09, 2000
by
Gerard Patel
Committed by
Alexandre Julliard
Jan 09, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid deleting of the default 1x1 bitmap for memory DCs.
parent
74e4a28a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
13 deletions
+7
-13
gdi.h
include/gdi.h
+2
-1
dc.c
objects/dc.c
+1
-12
gdiobj.c
objects/gdiobj.c
+4
-0
No files found.
include/gdi.h
View file @
d1795f67
...
...
@@ -97,7 +97,6 @@ typedef struct
HBRUSH16
hBrush
;
HFONT16
hFont
;
HBITMAP16
hBitmap
;
HBITMAP16
hFirstBitmap
;
/* Bitmap selected at creation of the DC */
HANDLE16
hDevice
;
HPALETTE16
hPalette
;
...
...
@@ -320,6 +319,8 @@ typedef struct tagDC_FUNCS
#define LAST_STOCK_HANDLE ((DWORD)STOCK_DEFAULT_GUI_FONT)
extern
HBITMAP
hPseudoStockBitmap
;
/* Device <-> logical coords conversion */
/* A floating point version of the POINT structure */
...
...
objects/dc.c
View file @
d1795f67
...
...
@@ -41,7 +41,6 @@ static void DC_Init_DC_INFO( WIN_DC_INFO *win_dc_info )
win_dc_info
->
hBrush
=
STOCK_WHITE_BRUSH
;
win_dc_info
->
hFont
=
STOCK_SYSTEM_FONT
;
win_dc_info
->
hBitmap
=
0
;
win_dc_info
->
hFirstBitmap
=
0
;
win_dc_info
->
hDevice
=
0
;
win_dc_info
->
hPalette
=
STOCK_DEFAULT_PALETTE
;
win_dc_info
->
ROPmode
=
R2_COPYPEN
;
...
...
@@ -238,7 +237,6 @@ HDC16 WINAPI GetDCState16( HDC16 hdc )
newdc
->
w
.
hBrush
=
dc
->
w
.
hBrush
;
newdc
->
w
.
hFont
=
dc
->
w
.
hFont
;
newdc
->
w
.
hBitmap
=
dc
->
w
.
hBitmap
;
newdc
->
w
.
hFirstBitmap
=
dc
->
w
.
hFirstBitmap
;
newdc
->
w
.
hDevice
=
dc
->
w
.
hDevice
;
newdc
->
w
.
hPalette
=
dc
->
w
.
hPalette
;
newdc
->
w
.
totalExtent
=
dc
->
w
.
totalExtent
;
...
...
@@ -327,7 +325,6 @@ void WINAPI SetDCState16( HDC16 hdc, HDC16 hdcs )
dc
->
w
.
flags
=
dcs
->
w
.
flags
&
~
DC_SAVED
;
dc
->
w
.
devCaps
=
dcs
->
w
.
devCaps
;
dc
->
w
.
hFirstBitmap
=
dcs
->
w
.
hFirstBitmap
;
dc
->
w
.
hDevice
=
dcs
->
w
.
hDevice
;
dc
->
w
.
totalExtent
=
dcs
->
w
.
totalExtent
;
dc
->
w
.
ROPmode
=
dcs
->
w
.
ROPmode
;
...
...
@@ -629,16 +626,9 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
TRACE
(
"(%04x): returning %04x
\n
"
,
hdc
,
dc
->
hSelf
);
/* Create default bitmap */
if
(
!
(
hbitmap
=
CreateBitmap
(
1
,
1
,
1
,
1
,
NULL
)))
{
GDI_HEAP_FREE
(
dc
->
hSelf
);
return
0
;
}
dc
->
w
.
flags
=
DC_MEMORY
;
dc
->
w
.
bitsPerPixel
=
1
;
dc
->
w
.
hBitmap
=
hbitmap
;
dc
->
w
.
hFirstBitmap
=
hbitmap
;
dc
->
w
.
hBitmap
=
hPseudoStockBitmap
;
/* Copy the driver-specific physical device info into
* the new DC. The driver may use this read-only info
...
...
@@ -703,7 +693,6 @@ BOOL WINAPI DeleteDC( HDC hdc )
SelectObject
(
hdc
,
STOCK_BLACK_PEN
);
SelectObject
(
hdc
,
STOCK_WHITE_BRUSH
);
SelectObject
(
hdc
,
STOCK_SYSTEM_FONT
);
if
(
dc
->
w
.
flags
&
DC_MEMORY
)
DeleteObject
(
dc
->
w
.
hFirstBitmap
);
if
(
dc
->
funcs
->
pDeleteDC
)
dc
->
funcs
->
pDeleteDC
(
dc
);
}
...
...
objects/gdiobj.c
View file @
d1795f67
...
...
@@ -179,6 +179,8 @@ static GDIOBJHDR * StockObjects[NB_STOCK_OBJECTS] =
(
GDIOBJHDR
*
)
&
DefaultGuiFont
};
HBITMAP
hPseudoStockBitmap
;
/* 1x1 bitmap for memory DCs */
/******************************************************************************
*
* void ReadFontInformation(
...
...
@@ -359,6 +361,7 @@ BOOL GDI_Init(void)
StockObjects
[
DEFAULT_PALETTE
]
=
(
GDIOBJHDR
*
)
GDI_HEAP_LOCK
(
hpalette
);
}
hPseudoStockBitmap
=
CreateBitmap
(
1
,
1
,
1
,
1
,
NULL
);
return
TRUE
;
}
...
...
@@ -452,6 +455,7 @@ BOOL WINAPI DeleteObject( HGDIOBJ obj )
if
(
HIWORD
(
obj
))
return
FALSE
;
if
((
obj
>=
FIRST_STOCK_HANDLE
)
&&
(
obj
<=
LAST_STOCK_HANDLE
))
return
TRUE
;
if
(
obj
==
hPseudoStockBitmap
)
return
TRUE
;
if
(
!
(
header
=
(
GDIOBJHDR
*
)
GDI_HEAP_LOCK
(
obj
)))
return
FALSE
;
TRACE
(
"%04x
\n
"
,
obj
);
...
...
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