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
2c71c539
Commit
2c71c539
authored
Jun 30, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not do SetWindowPos(SWP_FRAMECHANGED) in the
DefFrameProc(WM_SETTEXT) handler, DefWindowProc already takes care of it.
parent
5972c738
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
mdi.c
windows/mdi.c
+10
-14
No files found.
windows/mdi.c
View file @
2c71c539
...
...
@@ -132,7 +132,7 @@ typedef struct
static
HBITMAP
hBmpClose
=
0
;
/* ----------------- declarations ----------------- */
static
void
MDI_UpdateFrameText
(
HWND
,
HWND
,
BOOL
,
LPCWSTR
);
static
void
MDI_UpdateFrameText
(
HWND
,
HWND
,
LPCWSTR
);
static
BOOL
MDI_AugmentFrameMenu
(
HWND
,
HWND
);
static
BOOL
MDI_RestoreFrameMenu
(
HWND
,
HWND
);
static
LONG
MDI_ChildActivate
(
HWND
,
HWND
);
...
...
@@ -592,7 +592,7 @@ static LONG MDI_ChildActivate( HWND client, HWND child )
MDI_RestoreFrameMenu
(
frame
,
child
);
}
MDI_UpdateFrameText
(
frame
,
client
,
TRUE
,
NULL
);
MDI_UpdateFrameText
(
frame
,
client
,
NULL
);
/* check if we have any children left */
if
(
!
child
)
...
...
@@ -929,13 +929,12 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
*
* Note: lpTitle can be NULL
*/
static
void
MDI_UpdateFrameText
(
HWND
frame
,
HWND
hClient
,
BOOL
repaint
,
LPCWSTR
lpTitle
)
static
void
MDI_UpdateFrameText
(
HWND
frame
,
HWND
hClient
,
LPCWSTR
lpTitle
)
{
WCHAR
lpBuffer
[
MDI_MAXTITLELENGTH
+
1
];
MDICLIENTINFO
*
ci
=
get_client_info
(
hClient
);
TRACE
(
"
repaint %i, frameText %s
\n
"
,
repaint
,
debugstr_w
(
lpTitle
));
TRACE
(
"
frameText %s
\n
"
,
debugstr_w
(
lpTitle
));
if
(
!
ci
)
return
;
...
...
@@ -984,9 +983,6 @@ static void MDI_UpdateFrameText( HWND frame, HWND hClient,
lpBuffer
[
0
]
=
'\0'
;
DefWindowProcW
(
frame
,
WM_SETTEXT
,
0
,
(
LPARAM
)
lpBuffer
);
if
(
repaint
)
SetWindowPos
(
frame
,
0
,
0
,
0
,
0
,
0
,
SWP_FRAMECHANGED
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOACTIVATE
|
SWP_NOZORDER
);
}
...
...
@@ -1255,7 +1251,7 @@ LRESULT WINAPI DefFrameProcA( HWND hwnd, HWND hwndMDIClient,
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
lParam
,
-
1
,
NULL
,
0
);
LPWSTR
text
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
lParam
,
-
1
,
text
,
len
);
MDI_UpdateFrameText
(
hwnd
,
hwndMDIClient
,
TRUE
,
text
);
MDI_UpdateFrameText
(
hwnd
,
hwndMDIClient
,
text
);
HeapFree
(
GetProcessHeap
(),
0
,
text
);
}
return
1
;
/* success. FIXME: check text length */
...
...
@@ -1329,7 +1325,7 @@ LRESULT WINAPI DefFrameProcW( HWND hwnd, HWND hwndMDIClient,
break
;
case
WM_SETTEXT
:
MDI_UpdateFrameText
(
hwnd
,
hwndMDIClient
,
TRUE
,
(
LPWSTR
)
lParam
);
MDI_UpdateFrameText
(
hwnd
,
hwndMDIClient
,
(
LPWSTR
)
lParam
);
return
1
;
/* success. FIXME: check text length */
case
WM_SETFOCUS
:
...
...
@@ -1387,7 +1383,7 @@ LRESULT WINAPI DefMDIChildProcA( HWND hwnd, UINT message,
case
WM_SETTEXT
:
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
if
(
ci
->
hwndActiveChild
==
hwnd
&&
IsZoomed
(
ci
->
hwndActiveChild
)
)
MDI_UpdateFrameText
(
GetParent
(
client
),
client
,
TRUE
,
NULL
);
MDI_UpdateFrameText
(
GetParent
(
client
),
client
,
NULL
);
return
1
;
/* success. FIXME: check text length */
case
WM_GETMINMAXINFO
:
...
...
@@ -1426,7 +1422,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
case
WM_SETTEXT
:
DefWindowProcW
(
hwnd
,
message
,
wParam
,
lParam
);
if
(
ci
->
hwndActiveChild
==
hwnd
&&
IsZoomed
(
ci
->
hwndActiveChild
)
)
MDI_UpdateFrameText
(
GetParent
(
client
),
client
,
TRUE
,
NULL
);
MDI_UpdateFrameText
(
GetParent
(
client
),
client
,
NULL
);
return
1
;
/* success. FIXME: check text length */
case
WM_GETMINMAXINFO
:
...
...
@@ -1480,7 +1476,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
if
(
hwnd
==
ci
->
hwndActiveChild
&&
wParam
!=
SIZE_MAXIMIZED
)
{
MDI_RestoreFrameMenu
(
GetParent
(
client
),
hwnd
);
MDI_UpdateFrameText
(
GetParent
(
client
),
client
,
TRUE
,
NULL
);
MDI_UpdateFrameText
(
GetParent
(
client
),
client
,
NULL
);
}
if
(
wParam
==
SIZE_MAXIMIZED
)
...
...
@@ -1488,7 +1484,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
TRACE
(
"maximizing child %p
\n
"
,
hwnd
);
MDI_AugmentFrameMenu
(
GetParent
(
client
),
hwnd
);
MDI_UpdateFrameText
(
GetParent
(
client
),
client
,
TRUE
,
NULL
);
MDI_UpdateFrameText
(
GetParent
(
client
),
client
,
NULL
);
}
if
(
wParam
==
SIZE_MINIMIZED
)
...
...
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