diff options
Diffstat (limited to 'src/corelib/x11/gfx_x11.pas')
-rw-r--r-- | src/corelib/x11/gfx_x11.pas | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/corelib/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas index d27a834c..23df9cbb 100644 --- a/src/corelib/x11/gfx_x11.pas +++ b/src/corelib/x11/gfx_x11.pas @@ -526,6 +526,7 @@ begin if FDisplay = nil then Exit; //==> + Terminated := False; DefaultScreen := XDefaultScreen(Display); RootWindow := XRootWindow(FDisplay, DefaultScreen); DefaultBackground := XBlackPixel(FDisplay, DefaultScreen); @@ -1101,13 +1102,16 @@ end; procedure TfpgWindowImpl.DoSetWindowVisible(const AValue: Boolean); begin - if AValue then begin - if not HandleIsValid then AllocateWindowHandle; + if AValue then + begin + if not HandleIsValid then + AllocateWindowHandle; XMapWindow(xapplication.Display, FWinHandle); Include(FWinFlags, xwsfMapped); end - else begin - if HandleIsValid and (xwsfMapped in FWinFlags) then + else + begin + if HandleIsValid and (xwsfMapped in FWinFlags) then XUnmapWindow(xapplication.Display, FWinHandle); end; end; |