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:
parent
04103db6bd
commit
0642f3efeb
2 changed files with 14 additions and 0 deletions
|
@ -2269,6 +2269,10 @@ bool OS_Windows::is_window_resizable() const {
|
||||||
}
|
}
|
||||||
void OS_Windows::set_window_minimized(bool p_enabled) {
|
void OS_Windows::set_window_minimized(bool p_enabled) {
|
||||||
|
|
||||||
|
if (is_no_window_mode_enabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (p_enabled) {
|
if (p_enabled) {
|
||||||
maximized = false;
|
maximized = false;
|
||||||
minimized = true;
|
minimized = true;
|
||||||
|
@ -2285,6 +2289,10 @@ bool OS_Windows::is_window_minimized() const {
|
||||||
}
|
}
|
||||||
void OS_Windows::set_window_maximized(bool p_enabled) {
|
void OS_Windows::set_window_maximized(bool p_enabled) {
|
||||||
|
|
||||||
|
if (is_no_window_mode_enabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (p_enabled) {
|
if (p_enabled) {
|
||||||
maximized = true;
|
maximized = true;
|
||||||
minimized = false;
|
minimized = false;
|
||||||
|
|
|
@ -1518,6 +1518,9 @@ bool OS_X11::is_window_resizable() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OS_X11::set_window_minimized(bool p_enabled) {
|
void OS_X11::set_window_minimized(bool p_enabled) {
|
||||||
|
if (is_no_window_mode_enabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Using ICCCM -- Inter-Client Communication Conventions Manual
|
// Using ICCCM -- Inter-Client Communication Conventions Manual
|
||||||
XEvent xev;
|
XEvent xev;
|
||||||
Atom wm_change = XInternAtom(x11_display, "WM_CHANGE_STATE", False);
|
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) {
|
void OS_X11::set_window_maximized(bool p_enabled) {
|
||||||
|
if (is_no_window_mode_enabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (is_window_maximized() == p_enabled)
|
if (is_window_maximized() == p_enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue