summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/corelib/fpg_base.pas1
-rw-r--r--src/corelib/gdi/fpg_gdi.pas9
-rw-r--r--src/corelib/x11/fpg_x11.pas9
3 files changed, 17 insertions, 2 deletions
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas
index 6d0eb771..c982e019 100644
--- a/src/corelib/fpg_base.pas
+++ b/src/corelib/fpg_base.pas
@@ -497,6 +497,7 @@ type
procedure ActivateWindow; virtual; abstract;
procedure CaptureMouse; virtual; abstract;
procedure ReleaseMouse; virtual; abstract;
+ procedure BringToFront; virtual; abstract;
procedure SetFullscreen(AValue: Boolean); virtual;
property HasHandle: boolean read HandleIsValid;
property WindowType: TWindowType read FWindowType write FWindowType;
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index 77d476ab..9f8abfbc 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2011 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -197,6 +197,7 @@ type
procedure CaptureMouse; override;
procedure ReleaseMouse; override;
procedure SetFullscreen(AValue: Boolean); override;
+ procedure BringToFront; override;
end;
@@ -2015,6 +2016,12 @@ begin
WindowSetFullscreen(AValue, True);
end;
+procedure TfpgGDIWindow.BringToFront;
+begin
+ if HasHandle then
+ BringWindowToTop(FWinHandle);
+end;
+
function TfpgGDIWindow.HandleIsValid: boolean;
begin
Result := FWinHandle > 0;
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas
index da169246..ccfdf95d 100644
--- a/src/corelib/x11/fpg_x11.pas
+++ b/src/corelib/x11/fpg_x11.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2011 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -242,6 +242,7 @@ type
procedure CaptureMouse; override;
procedure ReleaseMouse; override;
procedure SetFullscreen(AValue: Boolean); override;
+ procedure BringToFront; override;
end;
@@ -2616,6 +2617,12 @@ begin
fpgApplication.netlayer.WindowSetFullscreen(FWinHandle, AValue);
end;
+procedure TfpgX11Window.BringToFront;
+begin
+ if HasHandle then
+ XRaiseWindow(xapplication.display, FWinHandle);
+end;
+
{ TfpgX11FontResource }
function TfpgX11FontResource.DoGetTextWidthClassic(const txt: string): integer;