fix window activation z-order

git-svn-id: trunk@4908 -
This commit is contained in:
micha 2003-12-19 18:18:17 +00:00
parent 2573d5f219
commit 11a8c94ee7
4 changed files with 51 additions and 6 deletions

View File

@ -258,7 +258,7 @@ Begin
WM_ACTIVATE:
Begin
Case Lo(WParam) Of
WA_ACTIVE:
WA_ACTIVE, WA_CLICKACTIVE:
Begin
LMessage.Msg := LM_ACTIVATE;
End;
@ -271,8 +271,8 @@ Begin
WM_ACTIVATEAPP:
Begin
if WParam <> 0 then
if Windows.IsWindowVisible(Window) then
Windows.SetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, $53);
if Window = TWin32Object(InterfaceObject).AppHandle then
Windows.SetWindowPos(TWin32Object(InterfaceObject).AppHandle, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE);
End;
WM_CAPTURECHANGED:
Begin
@ -906,6 +906,9 @@ end;
{
$Log$
Revision 1.77 2003/12/19 18:18:17 micha
fix window activation z-order
Revision 1.76 2003/12/17 16:06:43 micha
bring windows to top on application activation

View File

@ -131,6 +131,8 @@ Type
{$I win32winapih.inc}
{$I win32lclintfh.inc}
property AppHandle: HWND read FAppHandle;
End;
{$I win32listslh.inc}
@ -185,6 +187,9 @@ End.
{ =============================================================================
$Log$
Revision 1.63 2003/12/19 18:18:17 micha
fix window activation z-order
Revision 1.62 2003/12/18 10:17:00 micha
remove non-useful variable wndlist (thx vincent)

View File

@ -2331,9 +2331,8 @@ Begin
Assert(False, 'Trace: [TWin32Object.ShowHide] Showing the window');
if TControl(Sender).FCompStyle = csHintWindow then
begin
// NOTE: for some reason, 1.9.x generates the wrong constant here...
// Windows.SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW or SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE);
Windows.SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, $53);
// NOTE: for some reason, 1.9.x generates the wrong constant here...
Windows.SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW or SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE or SWP_NOOWNERZORDER);
end else begin
Windows.ShowWindow(Handle, SW_SHOW);
end;
@ -2888,6 +2887,9 @@ End;
{
$Log$
Revision 1.147 2003/12/19 18:18:17 micha
fix window activation z-order
Revision 1.146 2003/12/18 10:59:51 micha
fix notebook page out of bounds while destroying

View File

@ -252,6 +252,38 @@ Begin
End; {Case}
End;
function WindowPosFlagsToString(Flags: UINT): string;
var
FlagsStr: string;
begin
if (Flags and SWP_DRAWFRAME) <> 0 then
FlagsStr := FlagsStr + '|SWP_DRAWFRAME';
if (Flags and SWP_HIDEWINDOW) <> 0 then
FlagsStr := FlagsStr + '|SWP_HIDEWINDOW';
if (Flags and SWP_NOACTIVATE) <> 0 then
FlagsStr := FlagsStr + '|SWP_NOACTIVATE';
if (Flags and SWP_NOCOPYBITS) <> 0 then
FlagsStr := FlagsStr + '|SWP_NOCOPYBITS';
if (Flags and SWP_NOMOVE) <> 0 then
FlagsStr := FlagsStr + '|SWP_NOMOVE';
if (Flags and SWP_NOOWNERZORDER) <> 0 then
FlagsStr := FlagsStr + '|SWP_NOOWNERZORDER';
if (Flags and SWP_NOREDRAW) <> 0 then
FlagsStr := FlagsStr + '|SWP_NOREDRAW';
if (Flags and SWP_NOSENDCHANGING) <> 0 then
FlagsStr := FlagsStr + '|SWP_NOSENDCHANGING';
if (Flags and SWP_NOSIZE) <> 0 then
FlagsStr := FlagsStr + '|SWP_NOSIZE';
if (Flags and SWP_NOZORDER) <> 0 then
FlagsStr := FlagsStr + '|SWP_NOZORDER';
if (Flags and SWP_SHOWWINDOW) <> 0 then
FlagsStr := FlagsStr + '|SWP_SHOWWINDOW';
if Length(FlagsStr) > 0 then
FlagsStr := Copy(FlagsStr, 2, Length(FlagsStr)-1);
Result := FlagsStr;
end;
{------------------------------------------------------------------------------
Procedure: EventTrace
Params: Message - Event name
@ -716,6 +748,9 @@ End;
{ =============================================================================
$Log$
Revision 1.32 2003/12/19 18:18:17 micha
fix window activation z-order
Revision 1.31 2003/12/18 08:51:01 micha
fix accelerators: now registered per window