summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/fpgfx.pas4
-rw-r--r--src/corelib/gdi/gfx_gdi.pas8
-rw-r--r--src/corelib/gfxbase.pas3
-rw-r--r--src/corelib/x11/gfx_x11.pas12
4 files changed, 13 insertions, 14 deletions
diff --git a/src/corelib/fpgfx.pas b/src/corelib/fpgfx.pas
index 11845e52..b94f45c1 100644
--- a/src/corelib/fpgfx.pas
+++ b/src/corelib/fpgfx.pas
@@ -184,8 +184,6 @@ type
end;
- { TfpgTimer }
-
TfpgTimer = class
private
FEnabled: boolean;
@@ -205,7 +203,7 @@ type
end;
- { Caret (text cursor). Inverts painting over text and has blinking
+ { Caret or text cursor, inverts painting over text and has blinking
support. }
TfpgCaret = class
private
diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas
index dca5ce15..6aa7f910 100644
--- a/src/corelib/gdi/gfx_gdi.pas
+++ b/src/corelib/gdi/gfx_gdi.pas
@@ -868,7 +868,8 @@ procedure TfpgWindowImpl.DoSetWindowVisible(const AValue: Boolean);
var
r: TRect;
begin
- if AValue then begin
+ if AValue then
+ begin
BringWindowToTop(FWinHandle);
if FWindowType in [wtPopup] then
@@ -883,13 +884,10 @@ begin
FLeft := r.Left;
FTop := r.Top;
end;
-
Windows.UpdateWindow(FWinHandle);
end
- else begin
+ else
Windows.ShowWindow(FWinHandle, SW_HIDE);
- end;
-
end;
procedure TfpgWindowImpl.DoMoveWindow(const x: TfpgCoord; const y: TfpgCoord);
diff --git a/src/corelib/gfxbase.pas b/src/corelib/gfxbase.pas
index 0d85a642..2b677e57 100644
--- a/src/corelib/gfxbase.pas
+++ b/src/corelib/gfxbase.pas
@@ -344,11 +344,14 @@ type
TfpgApplicationBase = class(TObject)
+ private
+ FTopModalForm: TfpgWindowBase;
protected
FIsInitialized: Boolean;
public
constructor Create(const AParams: string); virtual; abstract;
property IsInitialized: boolean read FIsInitialized;
+ property TopModalForm: TfpgWindowBase read FTopModalForm write FTopModalForm;
end;
diff --git a/src/corelib/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas
index 53b8c12c..d5a09843 100644
--- a/src/corelib/x11/gfx_x11.pas
+++ b/src/corelib/x11/gfx_x11.pas
@@ -691,11 +691,11 @@ begin
msgp.mouse.shiftstate := ConvertShiftState(ev.xbutton.state);
w := FindWindowByHandle(ev.xbutton.window);
- if fpgTopModalForm <> nil then
+ if xapplication.TopModalForm <> nil then
begin
// This is ugly!!!!!!!!!!!!!!!
ew := TfpgWindowImpl(WidgetParentForm(TfpgWidget(w)));
- if (ew <> nil) and (fpgTopModalForm <> ew) then
+ if (ew <> nil) and (xapplication.TopModalForm <> ew) then
blockmsg := true;
end;
@@ -758,11 +758,11 @@ begin
until not XCheckTypedWindowEvent(display, ev.xbutton.window, X.MotionNotify, @ev);
w := FindWindowByHandle(ev.xany.window);
- if fpgTopModalForm <> nil then
+ if xapplication.TopModalForm <> nil then
begin
// This is ugly!!!!!!!!!!!!!!!
ew := TfpgWindowImpl(WidgetParentForm(TfpgWidget(w)));
- if (ew <> nil) and (fpgTopModalForm <> ew) then
+ if (ew <> nil) and (xapplication.TopModalForm <> ew) then
blockmsg := true;
end;
@@ -780,11 +780,11 @@ begin
X.ClientMessage:
begin
w := FindWindowByHandle(ev.xany.window);
- if fpgTopModalForm <> nil then
+ if xapplication.TopModalForm <> nil then
begin
// This is ugly!!!!!!!!!!!!!!!
ew := TfpgWindowImpl(WidgetParentForm(TfpgWidget(w)));
- if (ew <> nil) and (fpgTopModalForm <> ew) then
+ if (ew <> nil) and (xapplication.TopModalForm <> ew) then
blockmsg := true;
end;