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
499c26ce
Commit
499c26ce
authored
Jan 15, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Remove redundant visibility checks of a maximized MDI child, add an…
user32: Remove redundant visibility checks of a maximized MDI child, add an explanation why we do that.
parent
f6d5368d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
mdi.c
dlls/user32/mdi.c
+15
-7
No files found.
dlls/user32/mdi.c
View file @
499c26ce
...
...
@@ -120,6 +120,14 @@ typedef struct
/* At some points, particularly when switching MDI children, active and
* maximized MDI children may be not the same window, so we need to track
* them separately.
* The only place where we switch to/from maximized state is DefMDIChildProc
* WM_SIZE/SIZE_MAXIMIZED handler. We get that notification only after the
* ShowWindow(SW_SHOWMAXIMIZED) request, therefore window is guaranteed to
* be visible at the time we get the notification, and it's safe to assume
* that hwndChildMaximized is always visible.
* If the app plays games with WS_VISIBLE, WS_MAXIMIZE or any other window
* states it must keep coherency with USER32 on its own. This is true for
* Windows as well.
*/
UINT
nActiveChildren
;
HWND
hwndChildMaximized
;
...
...
@@ -355,7 +363,7 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
HMENU
oldFrameMenu
=
ci
->
hFrameMenu
;
ci
->
hFrameMenu
=
hmenuFrame
;
if
(
ci
->
hwndChildMaximized
&&
(
GetWindowLongW
(
ci
->
hwndChildMaximized
,
GWL_STYLE
)
&
WS_VISIBLE
)
)
if
(
ci
->
hwndChildMaximized
)
MDI_AugmentFrameMenu
(
hwndFrame
,
ci
->
hwndChildMaximized
);
return
(
LRESULT
)
oldFrameMenu
;
...
...
@@ -974,7 +982,7 @@ static void MDI_UpdateFrameText( HWND frame, HWND hClient, BOOL repaint, LPCWSTR
if
(
ci
->
frameTitle
)
{
if
(
ci
->
hwndChildMaximized
&&
(
GetWindowLongW
(
ci
->
hwndChildMaximized
,
GWL_STYLE
)
&
WS_VISIBLE
)
)
if
(
ci
->
hwndChildMaximized
)
{
/* combine frame title and child title if possible */
...
...
@@ -1220,8 +1228,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
return
0
;
case
WM_SIZE
:
if
(
IsWindow
(
ci
->
hwndActiveChild
)
&&
IsZoomed
(
ci
->
hwndActiveChild
)
&&
(
GetWindowLongW
(
ci
->
hwndActiveChild
,
GWL_STYLE
)
&
WS_VISIBLE
)
)
if
(
ci
->
hwndChildMaximized
)
{
RECT
rect
;
...
...
@@ -1230,9 +1237,9 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
rect
.
right
=
LOWORD
(
lParam
);
rect
.
bottom
=
HIWORD
(
lParam
);
AdjustWindowRectEx
(
&
rect
,
GetWindowLongA
(
ci
->
hwndActiveChil
d
,
GWL_STYLE
),
0
,
GetWindowLongA
(
ci
->
hwnd
ActiveChil
d
,
GWL_EXSTYLE
)
);
MoveWindow
(
ci
->
hwndActiveChil
d
,
rect
.
left
,
rect
.
top
,
AdjustWindowRectEx
(
&
rect
,
GetWindowLongA
(
ci
->
hwndChildMaximize
d
,
GWL_STYLE
),
0
,
GetWindowLongA
(
ci
->
hwnd
ChildMaximize
d
,
GWL_EXSTYLE
)
);
MoveWindow
(
ci
->
hwndChildMaximize
d
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
1
);
}
else
...
...
@@ -1507,6 +1514,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
break
;
case
WM_SIZE
:
/* This is the only place where we switch to/from maximized state */
/* do not change */
TRACE
(
"current active %p, maximized %p
\n
"
,
ci
->
hwndActiveChild
,
ci
->
hwndChildMaximized
);
...
...
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