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
135e3176
Commit
135e3176
authored
May 11, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move more default window commands from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0e0438bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
43 deletions
+43
-43
defwnd.c
dlls/user32/defwnd.c
+0
-43
defwnd.c
dlls/win32u/defwnd.c
+43
-0
No files found.
dlls/user32/defwnd.c
View file @
135e3176
...
...
@@ -266,46 +266,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
DEFWND_Print
(
hwnd
,
(
HDC
)
wParam
,
lParam
);
return
0
;
case
WM_SYNCPAINT
:
NtUserRedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_ERASENOW
|
RDW_ERASE
|
RDW_ALLCHILDREN
);
return
0
;
case
WM_SETREDRAW
:
if
(
wParam
)
WIN_SetStyle
(
hwnd
,
WS_VISIBLE
,
0
);
else
{
NtUserRedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_ALLCHILDREN
|
RDW_VALIDATE
);
WIN_SetStyle
(
hwnd
,
0
,
WS_VISIBLE
);
}
return
0
;
case
WM_CLOSE
:
NtUserDestroyWindow
(
hwnd
);
return
0
;
case
WM_MOUSEACTIVATE
:
if
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_CHILD
)
{
LONG
ret
=
SendMessageW
(
GetParent
(
hwnd
),
WM_MOUSEACTIVATE
,
wParam
,
lParam
);
if
(
ret
)
return
ret
;
}
/* Caption clicks are handled by NC_HandleNCLButtonDown() */
return
(
HIWORD
(
lParam
)
==
WM_LBUTTONDOWN
&&
LOWORD
(
lParam
)
==
HTCAPTION
?
MA_NOACTIVATE
:
MA_ACTIVATE
);
case
WM_ACTIVATE
:
/* The default action in Windows is to set the keyboard focus to
* the window, if it's being activated and not minimized */
if
(
LOWORD
(
wParam
)
!=
WA_INACTIVE
)
{
if
(
!
IsIconic
(
hwnd
))
NtUserSetFocus
(
hwnd
);
}
break
;
case
WM_MOUSEWHEEL
:
if
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_CHILD
)
return
SendMessageW
(
GetParent
(
hwnd
),
WM_MOUSEWHEEL
,
wParam
,
lParam
);
break
;
case
WM_ERASEBKGND
:
case
WM_ICONERASEBKGND
:
{
...
...
@@ -325,9 +285,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
return
1
;
}
case
WM_GETDLGCODE
:
return
0
;
case
WM_CTLCOLORMSGBOX
:
case
WM_CTLCOLOREDIT
:
case
WM_CTLCOLORLISTBOX
:
...
...
dlls/win32u/defwnd.c
View file @
135e3176
...
...
@@ -270,6 +270,49 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
break
;
}
case
WM_SYNCPAINT
:
NtUserRedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_ERASENOW
|
RDW_ERASE
|
RDW_ALLCHILDREN
);
return
0
;
case
WM_SETREDRAW
:
if
(
wparam
)
set_window_style
(
hwnd
,
WS_VISIBLE
,
0
);
else
{
NtUserRedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_ALLCHILDREN
|
RDW_VALIDATE
);
set_window_style
(
hwnd
,
0
,
WS_VISIBLE
);
}
return
0
;
case
WM_CLOSE
:
NtUserDestroyWindow
(
hwnd
);
return
0
;
case
WM_MOUSEACTIVATE
:
if
(
get_window_long
(
hwnd
,
GWL_STYLE
)
&
WS_CHILD
)
{
result
=
send_message
(
get_parent
(
hwnd
),
WM_MOUSEACTIVATE
,
wparam
,
lparam
);
if
(
result
)
break
;
}
/* Caption clicks are handled by NC_HandleNCLButtonDown() */
result
=
HIWORD
(
lparam
)
==
WM_LBUTTONDOWN
&&
LOWORD
(
lparam
)
==
HTCAPTION
?
MA_NOACTIVATE
:
MA_ACTIVATE
;
break
;
case
WM_ACTIVATE
:
/* The default action in Windows is to set the keyboard focus to
* the window, if it's being activated and not minimized */
if
(
LOWORD
(
wparam
)
!=
WA_INACTIVE
&&
!
is_iconic
(
hwnd
))
NtUserSetFocus
(
hwnd
);
break
;
case
WM_MOUSEWHEEL
:
if
(
get_window_long
(
hwnd
,
GWL_STYLE
)
&
WS_CHILD
)
result
=
send_message
(
get_parent
(
hwnd
),
WM_MOUSEWHEEL
,
wparam
,
lparam
);
break
;
case
WM_GETDLGCODE
:
break
;
case
WM_SETTEXT
:
result
=
set_window_text
(
hwnd
,
(
void
*
)
lparam
,
ansi
);
break
;
...
...
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