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
72337011
Commit
72337011
authored
Oct 01, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Create a dummy window surface for windows that shouldn't be painted to.
parent
81525453
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
6 deletions
+65
-6
painting.c
dlls/user32/painting.c
+1
-4
win.c
dlls/user32/win.c
+63
-2
win.h
dlls/user32/win.h
+1
-0
No files found.
dlls/user32/painting.c
View file @
72337011
...
...
@@ -191,12 +191,9 @@ static void reset_dce_attrs( struct dce *dce )
*/
static
void
release_dce
(
struct
dce
*
dce
)
{
RECT
vis_rect
;
if
(
!
dce
->
hwnd
)
return
;
/* already released */
vis_rect
=
get_virtual_screen_rect
();
__wine_set_visible_region
(
dce
->
hdc
,
0
,
&
vis_rect
,
&
vis_rect
,
NULL
);
__wine_set_visible_region
(
dce
->
hdc
,
0
,
&
dummy_surface
.
rect
,
&
dummy_surface
.
rect
,
&
dummy_surface
);
USER_Driver
->
pReleaseDC
(
dce
->
hwnd
,
dce
->
hdc
);
if
(
dce
->
clip_rgn
)
DeleteObject
(
dce
->
clip_rgn
);
...
...
dlls/user32/win.c
View file @
72337011
...
...
@@ -487,6 +487,67 @@ BOOL is_desktop_window( HWND hwnd )
/*******************************************************************
* Dummy window surface for windows that shouldn't get painted.
*/
static
void
dummy_surface_lock
(
struct
window_surface
*
window_surface
)
{
/* nothing to do */
}
static
void
dummy_surface_unlock
(
struct
window_surface
*
window_surface
)
{
/* nothing to do */
}
static
void
*
dummy_surface_get_bitmap_info
(
struct
window_surface
*
window_surface
,
BITMAPINFO
*
info
)
{
static
DWORD
dummy_data
;
info
->
bmiHeader
.
biSize
=
sizeof
(
info
->
bmiHeader
);
info
->
bmiHeader
.
biWidth
=
dummy_surface
.
rect
.
right
;
info
->
bmiHeader
.
biHeight
=
dummy_surface
.
rect
.
bottom
;
info
->
bmiHeader
.
biPlanes
=
1
;
info
->
bmiHeader
.
biBitCount
=
32
;
info
->
bmiHeader
.
biCompression
=
BI_RGB
;
info
->
bmiHeader
.
biSizeImage
=
0
;
info
->
bmiHeader
.
biXPelsPerMeter
=
0
;
info
->
bmiHeader
.
biYPelsPerMeter
=
0
;
info
->
bmiHeader
.
biClrUsed
=
0
;
info
->
bmiHeader
.
biClrImportant
=
0
;
return
&
dummy_data
;
}
static
RECT
*
dummy_surface_get_bounds
(
struct
window_surface
*
window_surface
)
{
static
RECT
dummy_bounds
;
return
&
dummy_bounds
;
}
static
void
dummy_surface_flush
(
struct
window_surface
*
window_surface
)
{
/* nothing to do */
}
static
void
dummy_surface_destroy
(
struct
window_surface
*
window_surface
)
{
/* nothing to do */
}
static
const
struct
window_surface_funcs
dummy_surface_funcs
=
{
dummy_surface_lock
,
dummy_surface_unlock
,
dummy_surface_get_bitmap_info
,
dummy_surface_get_bounds
,
dummy_surface_flush
,
dummy_surface_destroy
};
struct
window_surface
dummy_surface
=
{
&
dummy_surface_funcs
,
{
NULL
,
NULL
},
1
,
{
0
,
0
,
1
,
1
}
};
/*******************************************************************
* register_window_surface
*
* Register a window surface in the global list, possibly replacing another one.
...
...
@@ -495,8 +556,8 @@ void register_window_surface( struct window_surface *old, struct window_surface
{
if
(
old
==
new
)
return
;
EnterCriticalSection
(
&
surfaces_section
);
if
(
old
)
list_remove
(
&
old
->
entry
);
if
(
new
)
list_add_tail
(
&
window_surfaces
,
&
new
->
entry
);
if
(
old
&&
old
!=
&
dummy_surface
)
list_remove
(
&
old
->
entry
);
if
(
new
&&
new
!=
&
dummy_surface
)
list_add_tail
(
&
window_surfaces
,
&
new
->
entry
);
LeaveCriticalSection
(
&
surfaces_section
);
}
...
...
dlls/user32/win.h
View file @
72337011
...
...
@@ -80,6 +80,7 @@ typedef struct tagWND
/* Window functions */
extern
HWND
get_hwnd_message_parent
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_desktop_window
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
struct
window_surface
dummy_surface
DECLSPEC_HIDDEN
;
extern
void
register_window_surface
(
struct
window_surface
*
old
,
struct
window_surface
*
new
)
DECLSPEC_HIDDEN
;
extern
void
flush_window_surfaces
(
BOOL
idle
)
DECLSPEC_HIDDEN
;
extern
WND
*
WIN_GetPtr
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
...
...
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