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
26ab7010
Commit
26ab7010
authored
Jun 20, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move WM_SHOWWINDOW implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
04716457
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
58 deletions
+51
-58
defwnd.c
dlls/user32/defwnd.c
+26
-58
defwnd.c
dlls/win32u/defwnd.c
+25
-0
No files found.
dlls/user32/defwnd.c
View file @
26ab7010
...
...
@@ -73,57 +73,6 @@ HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType )
}
/***********************************************************************
* DEFWND_DefWinProc
*
* Default window procedure for messages that are the same in Ansi and Unicode.
*/
static
LRESULT
DEFWND_DefWinProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
switch
(
msg
)
{
case
WM_NCMOUSEMOVE
:
return
NC_HandleNCMouseMove
(
hwnd
,
wParam
,
lParam
);
case
WM_NCMOUSELEAVE
:
return
NC_HandleNCMouseLeave
(
hwnd
);
case
WM_SYSCOMMAND
:
return
NC_HandleSysCommand
(
hwnd
,
wParam
,
lParam
);
case
WM_SHOWWINDOW
:
{
LONG
style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
WND
*
pWnd
;
if
(
!
lParam
)
return
0
;
/* sent from ShowWindow */
if
((
style
&
WS_VISIBLE
)
&&
wParam
)
return
0
;
if
(
!
(
style
&
WS_VISIBLE
)
&&
!
wParam
)
return
0
;
if
(
!
GetWindow
(
hwnd
,
GW_OWNER
))
return
0
;
if
(
!
(
pWnd
=
WIN_GetPtr
(
hwnd
)))
return
0
;
if
(
pWnd
==
WND_OTHER_PROCESS
)
return
0
;
if
(
wParam
)
{
if
(
!
(
pWnd
->
flags
&
WIN_NEEDS_SHOW_OWNEDPOPUP
))
{
WIN_ReleasePtr
(
pWnd
);
return
0
;
}
pWnd
->
flags
&=
~
WIN_NEEDS_SHOW_OWNEDPOPUP
;
}
else
pWnd
->
flags
|=
WIN_NEEDS_SHOW_OWNEDPOPUP
;
WIN_ReleasePtr
(
pWnd
);
NtUserShowWindow
(
hwnd
,
wParam
?
SW_SHOWNOACTIVATE
:
SW_HIDE
);
break
;
}
default:
return
NtUserMessageCall
(
hwnd
,
msg
,
wParam
,
lParam
,
0
,
NtUserDefWindowProc
,
FALSE
);
}
return
0
;
}
static
LPARAM
DEFWND_GetTextA
(
WND
*
wndPtr
,
LPSTR
dest
,
WPARAM
wParam
)
{
LPARAM
result
=
0
;
...
...
@@ -184,6 +133,18 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
}
break
;
case
WM_NCMOUSEMOVE
:
result
=
NC_HandleNCMouseMove
(
hwnd
,
wParam
,
lParam
);
break
;
case
WM_NCMOUSELEAVE
:
result
=
NC_HandleNCMouseLeave
(
hwnd
);
break
;
case
WM_SYSCOMMAND
:
result
=
NC_HandleSysCommand
(
hwnd
,
wParam
,
lParam
);
break
;
case
WM_GETTEXTLENGTH
:
{
WND
*
wndPtr
=
WIN_GetPtr
(
hwnd
);
...
...
@@ -207,11 +168,6 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
}
break
;
case
WM_SETTEXT
:
case
WM_SYSCHAR
:
result
=
NtUserMessageCall
(
hwnd
,
msg
,
wParam
,
lParam
,
0
,
NtUserDefWindowProc
,
TRUE
);
break
;
case
WM_IME_CHAR
:
if
(
HIBYTE
(
wParam
))
PostMessageA
(
hwnd
,
WM_CHAR
,
HIBYTE
(
wParam
),
lParam
);
PostMessageA
(
hwnd
,
WM_CHAR
,
LOBYTE
(
wParam
),
lParam
);
...
...
@@ -281,7 +237,7 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
break
;
default:
result
=
DEFWND_DefWinProc
(
hwnd
,
msg
,
wParam
,
lParam
);
result
=
NtUserMessageCall
(
hwnd
,
msg
,
wParam
,
lParam
,
0
,
NtUserDefWindowProc
,
TRUE
);
break
;
}
...
...
@@ -357,6 +313,18 @@ LRESULT WINAPI DefWindowProcW(
}
break
;
case
WM_NCMOUSEMOVE
:
result
=
NC_HandleNCMouseMove
(
hwnd
,
wParam
,
lParam
);
break
;
case
WM_NCMOUSELEAVE
:
result
=
NC_HandleNCMouseLeave
(
hwnd
);
break
;
case
WM_SYSCOMMAND
:
result
=
NC_HandleSysCommand
(
hwnd
,
wParam
,
lParam
);
break
;
case
WM_GETTEXTLENGTH
:
{
WND
*
wndPtr
=
WIN_GetPtr
(
hwnd
);
...
...
@@ -431,7 +399,7 @@ LRESULT WINAPI DefWindowProcW(
break
;
default:
result
=
DEFWND_DefWinProc
(
hwnd
,
msg
,
wParam
,
lParam
);
result
=
NtUserMessageCall
(
hwnd
,
msg
,
wParam
,
lParam
,
0
,
NtUserDefWindowProc
,
FALSE
);
break
;
}
SPY_ExitMessage
(
SPY_RESULT_DEFWND
,
hwnd
,
msg
,
result
,
wParam
,
lParam
);
...
...
dlls/win32u/defwnd.c
View file @
26ab7010
...
...
@@ -2530,6 +2530,31 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
handle_set_cursor
(
hwnd
,
wparam
,
lparam
);
break
;
case
WM_SHOWWINDOW
:
{
LONG
style
=
get_window_long
(
hwnd
,
GWL_STYLE
);
WND
*
win
;
if
(
!
lparam
)
break
;
/* sent from ShowWindow */
if
((
style
&
WS_VISIBLE
)
&&
wparam
)
break
;
if
(
!
(
style
&
WS_VISIBLE
)
&&
!
wparam
)
break
;
if
(
!
get_window_relative
(
hwnd
,
GW_OWNER
))
break
;
if
(
!
(
win
=
get_win_ptr
(
hwnd
)))
break
;
if
(
win
==
WND_OTHER_PROCESS
)
break
;
if
(
wparam
)
{
if
(
!
(
win
->
flags
&
WIN_NEEDS_SHOW_OWNEDPOPUP
))
{
release_win_ptr
(
win
);
break
;
}
win
->
flags
&=
~
WIN_NEEDS_SHOW_OWNEDPOPUP
;
}
else
win
->
flags
|=
WIN_NEEDS_SHOW_OWNEDPOPUP
;
release_win_ptr
(
win
);
NtUserShowWindow
(
hwnd
,
wparam
?
SW_SHOWNOACTIVATE
:
SW_HIDE
);
break
;
}
case
WM_CTLCOLORMSGBOX
:
case
WM_CTLCOLOREDIT
:
case
WM_CTLCOLORLISTBOX
:
...
...
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