mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 13:02:10 +02:00
Qt: bugfix for wrong reported windowstate when we minimize maximized window.
git-svn-id: trunk@20886 -
This commit is contained in:
parent
fd84610a3c
commit
222aa23fd7
@ -188,6 +188,7 @@ type
|
|||||||
function getTextStatic: Boolean; virtual;
|
function getTextStatic: Boolean; virtual;
|
||||||
function getHeight: Integer;
|
function getHeight: Integer;
|
||||||
function getWidth: Integer;
|
function getWidth: Integer;
|
||||||
|
function getWindowState: QtWindowStates;
|
||||||
procedure grabMouse; virtual;
|
procedure grabMouse; virtual;
|
||||||
function hasFocus: Boolean; virtual;
|
function hasFocus: Boolean; virtual;
|
||||||
procedure lowerWidget; virtual;
|
procedure lowerWidget; virtual;
|
||||||
@ -2743,7 +2744,7 @@ begin
|
|||||||
|
|
||||||
Msg.Msg := LM_SIZE;
|
Msg.Msg := LM_SIZE;
|
||||||
|
|
||||||
case QWidget_windowState(Widget) of
|
case getWindowState of
|
||||||
QtWindowMinimized: Msg.SizeType := SIZEICONIC;
|
QtWindowMinimized: Msg.SizeType := SIZEICONIC;
|
||||||
QtWindowMaximized: Msg.SizeType := SIZEFULLSCREEN;
|
QtWindowMaximized: Msg.SizeType := SIZEFULLSCREEN;
|
||||||
QtWindowFullScreen: Msg.SizeType := SIZEFULLSCREEN;
|
QtWindowFullScreen: Msg.SizeType := SIZEFULLSCREEN;
|
||||||
@ -3081,6 +3082,11 @@ begin
|
|||||||
Result := QWidget_width(Widget);
|
Result := QWidget_width(Widget);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TQtWidget.getWindowState: QtWindowStates;
|
||||||
|
begin
|
||||||
|
Result := QWidget_windowState(Widget);
|
||||||
|
end;
|
||||||
|
|
||||||
function TQtWidget.getClientBounds: TRect;
|
function TQtWidget.getClientBounds: TRect;
|
||||||
begin
|
begin
|
||||||
QWidget_contentsRect(getContainerWidget, @Result);
|
QWidget_contentsRect(getContainerWidget, @Result);
|
||||||
@ -4360,14 +4366,14 @@ begin
|
|||||||
FillChar(Msg, SizeOf(Msg), #0);
|
FillChar(Msg, SizeOf(Msg), #0);
|
||||||
|
|
||||||
Msg.Msg := LM_SIZE;
|
Msg.Msg := LM_SIZE;
|
||||||
|
Msg.SizeType := SIZENORMAL;
|
||||||
|
|
||||||
case QWidget_windowState(Widget) of
|
if getWindowState and QtWindowMinimized <> 0 then
|
||||||
QtWindowMinimized: Msg.SizeType := SIZEICONIC;
|
Msg.SizeType := SIZEICONIC
|
||||||
QtWindowMaximized: Msg.SizeType := SIZEFULLSCREEN;
|
|
||||||
QtWindowFullScreen: Msg.SizeType := SIZEFULLSCREEN;
|
|
||||||
else
|
else
|
||||||
Msg.SizeType := SIZENORMAL;
|
if (getWindowState and QtWindowFullScreen <> 0) or
|
||||||
end;
|
(getWindowState and QtWindowMaximized <> 0) then
|
||||||
|
Msg.SizeType := SIZEFULLSCREEN;
|
||||||
|
|
||||||
Msg.SizeType := Msg.SizeType or Size_SourceIsInterface;
|
Msg.SizeType := Msg.SizeType or Size_SourceIsInterface;
|
||||||
|
|
||||||
|
@ -4807,7 +4807,7 @@ begin
|
|||||||
|
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Widget := TQTWidget(hWnd);
|
Widget := TQtWidget(hWnd);
|
||||||
|
|
||||||
if Widget <> nil then
|
if Widget <> nil then
|
||||||
begin
|
begin
|
||||||
@ -4817,7 +4817,7 @@ begin
|
|||||||
SW_MINIMIZE: Widget.setWindowState(QtWindowMinimized);
|
SW_MINIMIZE: Widget.setWindowState(QtWindowMinimized);
|
||||||
SW_SHOWMINIMIZED: Widget.ShowMinimized;
|
SW_SHOWMINIMIZED: Widget.ShowMinimized;
|
||||||
SW_SHOWMAXIMIZED: Widget.ShowMaximized;
|
SW_SHOWMAXIMIZED: Widget.ShowMaximized;
|
||||||
SW_HIDE: TQTWidget(hWnd).setVisible(False);
|
SW_HIDE: Widget.setVisible(False);
|
||||||
end;
|
end;
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user