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
c7e0697e
Commit
c7e0697e
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_WINDOWPOSCHANGED implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
3ec9c299
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
33 deletions
+27
-33
defwnd.c
dlls/user32/defwnd.c
+0
-33
defwnd.c
dlls/win32u/defwnd.c
+27
-0
No files found.
dlls/user32/defwnd.c
View file @
c7e0697e
...
@@ -39,35 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(win);
...
@@ -39,35 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(win);
#define DRAG_FILE 0x454C4946
#define DRAG_FILE 0x454C4946
/***********************************************************************
/***********************************************************************
* DEFWND_HandleWindowPosChanged
*
* Handle the WM_WINDOWPOSCHANGED message.
*/
static
void
DEFWND_HandleWindowPosChanged
(
HWND
hwnd
,
const
WINDOWPOS
*
winpos
)
{
RECT
rect
;
WIN_GetRectangles
(
hwnd
,
COORDS_PARENT
,
NULL
,
&
rect
);
if
(
!
(
winpos
->
flags
&
SWP_NOCLIENTMOVE
))
SendMessageW
(
hwnd
,
WM_MOVE
,
0
,
MAKELONG
(
rect
.
left
,
rect
.
top
));
if
(
!
(
winpos
->
flags
&
SWP_NOCLIENTSIZE
)
||
(
winpos
->
flags
&
SWP_STATECHANGED
))
{
if
(
IsIconic
(
hwnd
))
{
SendMessageW
(
hwnd
,
WM_SIZE
,
SIZE_MINIMIZED
,
0
);
}
else
{
WPARAM
wp
=
IsZoomed
(
hwnd
)
?
SIZE_MAXIMIZED
:
SIZE_RESTORED
;
SendMessageW
(
hwnd
,
WM_SIZE
,
wp
,
MAKELONG
(
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
)
);
}
}
}
/***********************************************************************
* DEFWND_ControlColor
* DEFWND_ControlColor
*
*
* Default colors for control painting.
* Default colors for control painting.
...
@@ -158,10 +129,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
...
@@ -158,10 +129,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
case
WM_NCMOUSELEAVE
:
case
WM_NCMOUSELEAVE
:
return
NC_HandleNCMouseLeave
(
hwnd
);
return
NC_HandleNCMouseLeave
(
hwnd
);
case
WM_WINDOWPOSCHANGED
:
DEFWND_HandleWindowPosChanged
(
hwnd
,
(
const
WINDOWPOS
*
)
lParam
);
break
;
case
WM_RBUTTONUP
:
case
WM_RBUTTONUP
:
{
{
POINT
pt
;
POINT
pt
;
...
...
dlls/win32u/defwnd.c
View file @
c7e0697e
...
@@ -489,6 +489,29 @@ static LONG handle_window_pos_changing( HWND hwnd, WINDOWPOS *winpos )
...
@@ -489,6 +489,29 @@ static LONG handle_window_pos_changing( HWND hwnd, WINDOWPOS *winpos )
return
0
;
return
0
;
}
}
static
void
handle_window_pos_changed
(
HWND
hwnd
,
const
WINDOWPOS
*
winpos
)
{
RECT
rect
;
get_window_rects
(
hwnd
,
COORDS_PARENT
,
NULL
,
&
rect
,
get_thread_dpi
()
);
if
(
!
(
winpos
->
flags
&
SWP_NOCLIENTMOVE
))
send_message
(
hwnd
,
WM_MOVE
,
0
,
MAKELONG
(
rect
.
left
,
rect
.
top
));
if
(
!
(
winpos
->
flags
&
SWP_NOCLIENTSIZE
)
||
(
winpos
->
flags
&
SWP_STATECHANGED
))
{
if
(
is_iconic
(
hwnd
))
{
send_message
(
hwnd
,
WM_SIZE
,
SIZE_MINIMIZED
,
0
);
}
else
{
WPARAM
wp
=
is_zoomed
(
hwnd
)
?
SIZE_MAXIMIZED
:
SIZE_RESTORED
;
send_message
(
hwnd
,
WM_SIZE
,
wp
,
MAKELONG
(
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
));
}
}
}
/***********************************************************************
/***********************************************************************
* draw_moving_frame
* draw_moving_frame
*
*
...
@@ -2324,6 +2347,10 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
...
@@ -2324,6 +2347,10 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
case
WM_WINDOWPOSCHANGING
:
case
WM_WINDOWPOSCHANGING
:
return
handle_window_pos_changing
(
hwnd
,
(
WINDOWPOS
*
)
lparam
);
return
handle_window_pos_changing
(
hwnd
,
(
WINDOWPOS
*
)
lparam
);
case
WM_WINDOWPOSCHANGED
:
handle_window_pos_changed
(
hwnd
,
(
const
WINDOWPOS
*
)
lparam
);
break
;
case
WM_PAINTICON
:
case
WM_PAINTICON
:
case
WM_PAINT
:
case
WM_PAINT
:
{
{
...
...
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