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
b9a40c4b
Commit
b9a40c4b
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 default WM_WINDOWPOSCHANGING implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
63ce060e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
30 deletions
+24
-30
defwnd.c
dlls/user32/defwnd.c
+0
-3
win.h
dlls/user32/win.h
+0
-1
winpos.c
dlls/user32/winpos.c
+0
-25
defwnd.c
dlls/win32u/defwnd.c
+22
-0
win32u_private.h
dlls/win32u/win32u_private.h
+1
-0
window.c
dlls/win32u/window.c
+1
-1
No files found.
dlls/user32/defwnd.c
View file @
b9a40c4b
...
...
@@ -180,9 +180,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
NC_HandleNCCalcSize
(
hwnd
,
wParam
,
(
RECT
*
)
lParam
);
break
;
case
WM_WINDOWPOSCHANGING
:
return
WINPOS_HandleWindowPosChanging
(
hwnd
,
(
WINDOWPOS
*
)
lParam
);
case
WM_WINDOWPOSCHANGED
:
DEFWND_HandleWindowPosChanged
(
hwnd
,
(
const
WINDOWPOS
*
)
lParam
);
break
;
...
...
dlls/user32/win.h
View file @
b9a40c4b
...
...
@@ -60,7 +60,6 @@ static inline void WIN_ReleasePtr( WND *ptr )
extern
LRESULT
HOOK_CallHooks
(
INT
id
,
INT
code
,
WPARAM
wparam
,
LPARAM
lparam
,
BOOL
unicode
)
DECLSPEC_HIDDEN
;
extern
LONG
WINPOS_HandleWindowPosChanging
(
HWND
hwnd
,
WINDOWPOS
*
winpos
)
DECLSPEC_HIDDEN
;
extern
HWND
WINPOS_WindowFromPoint
(
HWND
hwndScope
,
POINT
pt
,
INT
*
hittest
)
DECLSPEC_HIDDEN
;
extern
void
WINPOS_ActivateOtherWindow
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
WINPOS_SysCommandSizeMove
(
HWND
hwnd
,
WPARAM
wParam
)
DECLSPEC_HIDDEN
;
...
...
dlls/user32/winpos.c
View file @
b9a40c4b
...
...
@@ -654,31 +654,6 @@ void WINPOS_ActivateOtherWindow(HWND hwnd)
/***********************************************************************
* WINPOS_HandleWindowPosChanging
*
* Default handling for a WM_WINDOWPOSCHANGING. Called from DefWindowProc().
*/
LONG
WINPOS_HandleWindowPosChanging
(
HWND
hwnd
,
WINDOWPOS
*
winpos
)
{
LONG
style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
if
(
winpos
->
flags
&
SWP_NOSIZE
)
return
0
;
if
((
style
&
WS_THICKFRAME
)
||
((
style
&
(
WS_POPUP
|
WS_CHILD
))
==
0
))
{
MINMAXINFO
info
=
NtUserGetMinMaxInfo
(
hwnd
);
winpos
->
cx
=
min
(
winpos
->
cx
,
info
.
ptMaxTrackSize
.
x
);
winpos
->
cy
=
min
(
winpos
->
cy
,
info
.
ptMaxTrackSize
.
y
);
if
(
!
(
style
&
WS_MINIMIZE
))
{
winpos
->
cx
=
max
(
winpos
->
cx
,
info
.
ptMinTrackSize
.
x
);
winpos
->
cy
=
max
(
winpos
->
cy
,
info
.
ptMinTrackSize
.
y
);
}
}
return
0
;
}
/***********************************************************************
* BeginDeferWindowPos (USER32.@)
*/
HDWP
WINAPI
BeginDeferWindowPos
(
INT
count
)
...
...
dlls/win32u/defwnd.c
View file @
b9a40c4b
...
...
@@ -195,6 +195,25 @@ static HICON set_window_icon( HWND hwnd, WPARAM type, HICON icon )
return
ret
;
}
static
LONG
handle_window_pos_changing
(
HWND
hwnd
,
WINDOWPOS
*
winpos
)
{
LONG
style
=
get_window_long
(
hwnd
,
GWL_STYLE
);
if
(
winpos
->
flags
&
SWP_NOSIZE
)
return
0
;
if
((
style
&
WS_THICKFRAME
)
||
((
style
&
(
WS_POPUP
|
WS_CHILD
))
==
0
))
{
MINMAXINFO
info
=
get_min_max_info
(
hwnd
);
winpos
->
cx
=
min
(
winpos
->
cx
,
info
.
ptMaxTrackSize
.
x
);
winpos
->
cy
=
min
(
winpos
->
cy
,
info
.
ptMaxTrackSize
.
y
);
if
(
!
(
style
&
WS_MINIMIZE
))
{
winpos
->
cx
=
max
(
winpos
->
cx
,
info
.
ptMinTrackSize
.
x
);
winpos
->
cy
=
max
(
winpos
->
cy
,
info
.
ptMinTrackSize
.
y
);
}
}
return
0
;
}
static
LRESULT
handle_sys_command
(
HWND
hwnd
,
WPARAM
wparam
,
LPARAM
lparam
)
{
if
(
!
is_window_enabled
(
hwnd
))
return
0
;
...
...
@@ -255,6 +274,9 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
break
;
}
case
WM_WINDOWPOSCHANGING
:
return
handle_window_pos_changing
(
hwnd
,
(
WINDOWPOS
*
)
lparam
);
case
WM_PAINTICON
:
case
WM_PAINT
:
{
...
...
dlls/win32u/win32u_private.h
View file @
b9a40c4b
...
...
@@ -434,6 +434,7 @@ extern HWND get_parent( HWND hwnd ) DECLSPEC_HIDDEN;
extern
HWND
get_hwnd_message_parent
(
void
)
DECLSPEC_HIDDEN
;
extern
DPI_AWARENESS_CONTEXT
get_window_dpi_awareness_context
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
BOOL
get_window_placement
(
HWND
hwnd
,
WINDOWPLACEMENT
*
placement
)
DECLSPEC_HIDDEN
;
extern
MINMAXINFO
get_min_max_info
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
HWND
get_window_relative
(
HWND
hwnd
,
UINT
rel
)
DECLSPEC_HIDDEN
;
extern
DWORD
get_window_thread
(
HWND
hwnd
,
DWORD
*
process
)
DECLSPEC_HIDDEN
;
extern
HWND
is_current_process_window
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
...
...
dlls/win32u/window.c
View file @
b9a40c4b
...
...
@@ -3657,7 +3657,7 @@ static void send_parent_notify( HWND hwnd, UINT msg )
*
* Get the minimized and maximized information for a window.
*/
static
MINMAXINFO
get_min_max_info
(
HWND
hwnd
)
MINMAXINFO
get_min_max_info
(
HWND
hwnd
)
{
LONG
style
=
get_window_long
(
hwnd
,
GWL_STYLE
);
LONG
exstyle
=
get_window_long
(
hwnd
,
GWL_EXSTYLE
);
...
...
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