mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix #16989: Re-focusing maximised window triggers a restore and maximise
Fixes #16989 by removing an SDL hack. Originally added to address issue #2158, I can't reproduce this issue with the hack removed. Tested on Linux (by CorySanin) and Windows (by Broxzier).
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
- Fix: [#16799] Browsing “Up” in the Load Save window shows no files, only folders.
|
||||
- Fix: [#16934] Park size displayed incorrectly in Park window.
|
||||
- Fix: [#16974] Small scenery ghosts can be deleted.
|
||||
- Fix: [#16989] Re-focusing maximised window triggers a restore and maximise.
|
||||
- Fix: [#17005] Unable to set patrol area for first staff member in park.
|
||||
- Fix: [#17017] [Plugin] Crash when using tile element properties that require a valid ride to be linked.
|
||||
- Fix: [#17073] Corrupt ride window and random crashes when trains have more than 144 cars.
|
||||
|
||||
@@ -339,23 +339,6 @@ public:
|
||||
context_quit();
|
||||
break;
|
||||
case SDL_WINDOWEVENT:
|
||||
// HACK: Fix #2158, OpenRCT2 does not draw if it does not think that the window is
|
||||
// visible - due a bug in SDL 2.0.3 this hack is required if the
|
||||
// window is maximised, minimised and then restored again.
|
||||
if (e.window.event == SDL_WINDOWEVENT_FOCUS_GAINED)
|
||||
{
|
||||
if (SDL_GetWindowFlags(_window) & SDL_WINDOW_MAXIMIZED)
|
||||
{
|
||||
SDL_RestoreWindow(_window);
|
||||
SDL_MaximizeWindow(_window);
|
||||
}
|
||||
if ((SDL_GetWindowFlags(_window) & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP)
|
||||
{
|
||||
SDL_RestoreWindow(_window);
|
||||
SDL_SetWindowFullscreen(_window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||
}
|
||||
}
|
||||
|
||||
if (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED)
|
||||
{
|
||||
OnResize(e.window.data1, e.window.data2);
|
||||
|
||||
Reference in New Issue
Block a user