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
0c4e151e
Commit
0c4e151e
authored
Dec 18, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Pre-allocate the window procedure for the desktop class.
parent
14fdced3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
controls.h
dlls/user32/controls.h
+7
-1
desktop.c
dlls/user32/desktop.c
+2
-4
winproc.c
dlls/user32/winproc.c
+3
-2
No files found.
dlls/user32/controls.h
View file @
0c4e151e
...
...
@@ -33,6 +33,7 @@
enum
builtin_winprocs
{
/* dual A/W procs */
WINPROC_BUTTON
=
0
,
WINPROC_COMBO
,
WINPROC_DEFWND
,
...
...
@@ -42,7 +43,10 @@ enum builtin_winprocs
WINPROC_MDICLIENT
,
WINPROC_SCROLLBAR
,
WINPROC_STATIC
,
NB_BUILTIN_WINPROCS
/* unicode-only procs */
WINPROC_DESKTOP
,
NB_BUILTIN_WINPROCS
,
NB_BUILTIN_AW_WINPROCS
=
WINPROC_DESKTOP
};
#define WINPROC_HANDLE (~0u >> 16)
...
...
@@ -74,6 +78,8 @@ extern const struct builtin_class_descr MESSAGE_builtin_class DECLSPEC_HIDDEN;
extern
const
struct
builtin_class_descr
SCROLL_builtin_class
DECLSPEC_HIDDEN
;
extern
const
struct
builtin_class_descr
STATIC_builtin_class
DECLSPEC_HIDDEN
;
extern
LRESULT
WINAPI
DesktopWndProc
(
HWND
,
UINT
,
WPARAM
,
LPARAM
)
DECLSPEC_HIDDEN
;
/* Wow handlers */
struct
wow_handlers16
...
...
dlls/user32/desktop.c
View file @
0c4e151e
...
...
@@ -38,8 +38,6 @@ static HBITMAP hbitmapWallPaper;
static
SIZE
bitmapSize
;
static
BOOL
fTileWallPaper
;
static
LRESULT
WINAPI
DesktopWndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
);
/*********************************************************************
* desktop class descriptor
...
...
@@ -49,7 +47,7 @@ const struct builtin_class_descr DESKTOP_builtin_class =
(
LPCWSTR
)
DESKTOP_CLASS_ATOM
,
/* name */
CS_DBLCLKS
,
/* style */
NULL
,
/* procA (winproc is Unicode only) */
DesktopWndProc
,
/* procW */
BUILTIN_WINPROC
(
WINPROC_DESKTOP
),
/* procW */
0
,
/* extra */
IDC_ARROW
,
/* cursor */
(
HBRUSH
)(
COLOR_BACKGROUND
+
1
)
/* brush */
...
...
@@ -115,7 +113,7 @@ static HBITMAP DESKTOP_LoadBitmap( HDC hdc, const char *filename )
/***********************************************************************
* DesktopWndProc
*/
static
LRESULT
WINAPI
DesktopWndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
LRESULT
WINAPI
DesktopWndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
message
==
WM_NCCREATE
)
return
TRUE
;
return
0
;
/* all other messages are ignored */
...
...
dlls/user32/winproc.c
View file @
0c4e151e
...
...
@@ -74,6 +74,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] =
{
MDIClientWndProcA
,
MDIClientWndProcW
},
/* WINPROC_MDICLIENT */
{
ScrollBarWndProcA
,
ScrollBarWndProcW
},
/* WINPROC_SCROLLBAR */
{
StaticWndProcA
,
StaticWndProcW
},
/* WINPROC_STATIC */
{
NULL
,
DesktopWndProc
},
/* WINPROC_DESKTOP */
};
static
UINT
winproc_used
=
NB_BUILTIN_WINPROCS
;
...
...
@@ -104,14 +105,14 @@ static inline WINDOWPROC *find_winproc( WNDPROC funcA, WNDPROC funcW )
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
NB_BUILTIN_WINPROCS
;
i
++
)
for
(
i
=
0
;
i
<
NB_BUILTIN_
AW_
WINPROCS
;
i
++
)
{
/* match either proc, some apps confuse A and W */
if
(
funcA
&&
winproc_array
[
i
].
procA
!=
funcA
&&
winproc_array
[
i
].
procW
!=
funcA
)
continue
;
if
(
funcW
&&
winproc_array
[
i
].
procA
!=
funcW
&&
winproc_array
[
i
].
procW
!=
funcW
)
continue
;
return
&
winproc_array
[
i
];
}
for
(
i
=
NB_BUILTIN_WINPROCS
;
i
<
winproc_used
;
i
++
)
for
(
i
=
NB_BUILTIN_
AW_
WINPROCS
;
i
<
winproc_used
;
i
++
)
{
if
(
funcA
&&
winproc_array
[
i
].
procA
!=
funcA
)
continue
;
if
(
funcW
&&
winproc_array
[
i
].
procW
!=
funcW
)
continue
;
...
...
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