summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-12-15 14:41:35 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-12-15 14:41:35 +0000
commit8d72ce46b657389294c960d0451e043de6ede273 (patch)
tree6157f74854529625c4de8f694513e910bd808d9e /src/corelib
parent1291b44c5d0b5abaecba661f01d1034c3df2344a (diff)
downloadfpGUI-8d72ce46b657389294c960d0451e043de6ede273.tar.xz
* Added a new WindowAttribute called waStayOnTop. * Modified the SplashScreen example to use the new window attribute. * Modified gfx_x11 to use the new waStayOnTop attribute and also to define a window type SplashScreen via newlayers.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/gdi/gfx_gdi.pas4
-rw-r--r--src/corelib/gfxbase.pas2
-rw-r--r--src/corelib/x11/gfx_x11.pas7
3 files changed, 11 insertions, 2 deletions
diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas
index e35023ba..d7ef5a70 100644
--- a/src/corelib/gdi/gfx_gdi.pas
+++ b/src/corelib/gdi/gfx_gdi.pas
@@ -1045,6 +1045,10 @@ begin
DoMoveWindow(FLeft, FTop);
end;
+ if waStayOnTop in FWindowAttributes then
+ SetWindowPos(FWinHandle, HWND_TOPMOST, 0, 0, 0, 0,
+ SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE);
+
// the forms require some adjustments before the Window appears
SetWindowParameters;
end;
diff --git a/src/corelib/gfxbase.pas b/src/corelib/gfxbase.pas
index 97438276..12522b61 100644
--- a/src/corelib/gfxbase.pas
+++ b/src/corelib/gfxbase.pas
@@ -21,7 +21,7 @@ type
TWindowType = (wtChild, wtWindow, wtModalForm, wtPopup);
- TWindowAttribute = (waSizeable, waAutoPos, waScreenCenterPos);
+ TWindowAttribute = (waSizeable, waAutoPos, waScreenCenterPos, waStayOnTop);
TWindowAttributes = set of TWindowAttribute;
TMouseCursor = (mcDefault, mcArrow, mcCross, mcIBeam, mcSizeEW, mcSizeNS,
diff --git a/src/corelib/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas
index f77b6f8e..04a9f9b4 100644
--- a/src/corelib/x11/gfx_x11.pas
+++ b/src/corelib/x11/gfx_x11.pas
@@ -1109,7 +1109,12 @@ begin
//XSetTransientForHint(xapplication.display, FWinHandle, TfpgWindowImpl(Parent).FWinHandle);
end;
end;
-
+
+ // todo: This needs testing!!
+ if (FWindowType = wtPopup) and (waStayOnTop in FWindowAttributes) then
+ // we have a Splash screen
+ fpgApplication.netlayer.WindowSetType(FWinHandle, nwtSplash);
+
XSelectInput(xapplication.Display, wh, KeyPressMask or KeyReleaseMask or
ButtonPressMask or ButtonReleaseMask or
EnterWindowMask or LeaveWindowMask or