mirror of
https://gitlab.com/cc-ru/ocelot/ocelot-desktop.git
synced 2025-12-24 04:52:47 +01:00
(KDE only) Fixed window close button disappearing after exiting from fullscreen mode
This commit is contained in:
parent
6c0b108fa9
commit
ccd200a2ca
@ -89,17 +89,31 @@ object UiHandler extends Logging {
|
||||
Display.setDisplayModeAndFullscreen(Display.getDesktopDisplayMode)
|
||||
}
|
||||
else {
|
||||
// Updating size from settings
|
||||
val settingsSize = Settings.get.windowSize
|
||||
root.size = if (settingsSize.isSet) Size2D(settingsSize.x, settingsSize.y) else Size2D(800, 600)
|
||||
|
||||
// Setting normal display mode (non-fullscreen by default)
|
||||
Display.setDisplayMode(new DisplayMode(root.size.width.toInt, root.size.height.toInt))
|
||||
|
||||
// Updating position from settings
|
||||
if (Settings.get.windowPosition.isSet)
|
||||
Display.setLocation(Settings.get.windowPosition.x, Settings.get.windowPosition.y)
|
||||
}
|
||||
|
||||
Display.setFullscreen(value)
|
||||
Display.setResizable(!value)
|
||||
// Window should be resizable even in fullscreen mode, because some DEs can hide close button after exit from it.
|
||||
// But it seems like there's lwjgl bug with internal resizable value caching
|
||||
// How to reproduce:
|
||||
// 1) Enter fullscreen mode via setDisplayModeAndFullscreen(...) or setFullScreen(true)
|
||||
// 2) Set window resizable via setResizable(true)
|
||||
// 3) Exit from fullscreen mode
|
||||
// 4) Set window resizable again
|
||||
// Result:
|
||||
// Window is not resizable and can't be resized with mouse
|
||||
// Expected behaviour:
|
||||
// Window should be resizable
|
||||
Display.setResizable(false)
|
||||
Display.setResizable(true)
|
||||
|
||||
Settings.get.windowFullscreen = value
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user