mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 22:00:38 +02:00
Gtk: TGtkWidgetSet.ShowWindow(), changed behaviour so it's win32 and qt compatibile.Respect SW_SHOW and SW_HIDE if handle is PGtkWidget without window.
git-svn-id: trunk@34098 -
This commit is contained in:
parent
b360e5a0bf
commit
5d7716606b
@ -9677,8 +9677,25 @@ end;
|
|||||||
function TGtkWidgetSet.ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean;
|
function TGtkWidgetSet.ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean;
|
||||||
var
|
var
|
||||||
GtkWindow: PGtkWindow;
|
GtkWindow: PGtkWindow;
|
||||||
|
Widget: PGtkWidget;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
|
Widget := PGtkWidget(hWND);
|
||||||
|
if Widget = nil then
|
||||||
|
RaiseGDBException('TGtkWidgetSet.ShowWindow hWnd is nil');
|
||||||
|
|
||||||
|
if not GtkWidgetIsA(Widget,GTK_TYPE_WINDOW) then
|
||||||
|
begin
|
||||||
|
// we are pure gtkwidget so only SW_SHOW AND SW_HIDE CAN GO
|
||||||
|
case nCmdShow of
|
||||||
|
SW_SHOWNORMAL,
|
||||||
|
SW_SHOW: gtk_widget_show(Widget);
|
||||||
|
SW_HIDE: gtk_widget_hide(Widget);
|
||||||
|
end;
|
||||||
|
Result := nCmdShow in [SW_SHOW, SW_HIDE];
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
GtkWindow:=PGtkWindow(hWnd);
|
GtkWindow:=PGtkWindow(hWnd);
|
||||||
if GtkWindow=nil then
|
if GtkWindow=nil then
|
||||||
RaiseGDBException('TGtkWidgetSet.ShowWindow hWnd is nil');
|
RaiseGDBException('TGtkWidgetSet.ShowWindow hWnd is nil');
|
||||||
|
Loading…
Reference in New Issue
Block a user