diff options
author | DS <vorunbekannt75@web.de> | 2023-02-06 15:05:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-06 15:05:44 +0100 |
commit | 51dffc416a30417aedb533cb9fb817bca1c7a81c (patch) | |
tree | 49f092c7ed807327dd9a0312ddc5116203dd7fc1 /source/Irrlicht/CIrrDeviceLinux.cpp | |
parent | 8f13ae81e58984a4096229fb644d0d4e88136536 (diff) | |
download | irrlicht-51dffc416a30417aedb533cb9fb817bca1c7a81c.tar.xz |
Add WindowMaximized creation parameter and isWindowMaximized() (#142)
Diffstat (limited to 'source/Irrlicht/CIrrDeviceLinux.cpp')
-rw-r--r-- | source/Irrlicht/CIrrDeviceLinux.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp index 91d1e47..b447015 100644 --- a/source/Irrlicht/CIrrDeviceLinux.cpp +++ b/source/Irrlicht/CIrrDeviceLinux.cpp @@ -118,7 +118,7 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param) currentTouchedCount(0),
#endif
Width(param.WindowSize.Width), Height(param.WindowSize.Height),
- WindowHasFocus(false), WindowMinimized(false),
+ WindowHasFocus(false), WindowMinimized(false), WindowMaximized(param.WindowMaximized),
ExternalWindow(false), AutorepeatSupport(0)
{
#ifdef _DEBUG
@@ -168,6 +168,9 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param) return;
createGUIAndScene();
+
+ if (param.WindowMaximized)
+ maximizeWindow();
}
@@ -1200,6 +1203,13 @@ bool CIrrDeviceLinux::isWindowMinimized() const }
+//! returns last state from maximizeWindow() and restoreWindow()
+bool CIrrDeviceLinux::isWindowMaximized() const
+{
+ return WindowMaximized;
+}
+
+
//! returns color format of the window.
video::ECOLOR_FORMAT CIrrDeviceLinux::getColorFormat() const
{
@@ -1284,6 +1294,8 @@ void CIrrDeviceLinux::maximizeWindow() }
XMapWindow(XDisplay, XWindow);
+
+ WindowMaximized = true;
#endif
}
@@ -1310,6 +1322,8 @@ void CIrrDeviceLinux::restoreWindow() }
XMapWindow(XDisplay, XWindow);
+
+ WindowMaximized = false;
#endif
}
|