Ignore query to maximize/minimize window on Windows and X11

This makes these platform behave as MacOS in that regard and also fixes the editor window appearing in some cases even when --no-window has been passed.
This commit is contained in:
Pedro J. Estébanez 2020-11-18 00:33:39 +01:00
parent 04103db6bd
commit 0642f3efeb
2 changed files with 14 additions and 0 deletions

View file

@ -2269,6 +2269,10 @@ bool OS_Windows::is_window_resizable() const {
}
void OS_Windows::set_window_minimized(bool p_enabled) {
if (is_no_window_mode_enabled()) {
return;
}
if (p_enabled) {
maximized = false;
minimized = true;
@ -2285,6 +2289,10 @@ bool OS_Windows::is_window_minimized() const {
}
void OS_Windows::set_window_maximized(bool p_enabled) {
if (is_no_window_mode_enabled()) {
return;
}
if (p_enabled) {
maximized = true;
minimized = false;

View file

@ -1518,6 +1518,9 @@ bool OS_X11::is_window_resizable() const {
}
void OS_X11::set_window_minimized(bool p_enabled) {
if (is_no_window_mode_enabled()) {
return;
}
// Using ICCCM -- Inter-Client Communication Conventions Manual
XEvent xev;
Atom wm_change = XInternAtom(x11_display, "WM_CHANGE_STATE", False);
@ -1581,6 +1584,9 @@ bool OS_X11::is_window_minimized() const {
}
void OS_X11::set_window_maximized(bool p_enabled) {
if (is_no_window_mode_enabled()) {
return;
}
if (is_window_maximized() == p_enabled)
return;