[Windows] Fix setting initial non-exclusive window mode.
This commit is contained in:
parent
cdd2313ba2
commit
db0109b237
|
@ -3926,7 +3926,9 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
|
||||||
WindowRect.top += offset.y;
|
WindowRect.top += offset.y;
|
||||||
WindowRect.bottom += offset.y;
|
WindowRect.bottom += offset.y;
|
||||||
|
|
||||||
|
if (p_mode != WINDOW_MODE_FULLSCREEN && p_mode != WINDOW_MODE_EXCLUSIVE_FULLSCREEN) {
|
||||||
AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle);
|
AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle);
|
||||||
|
}
|
||||||
|
|
||||||
WindowID id = window_id_counter;
|
WindowID id = window_id_counter;
|
||||||
{
|
{
|
||||||
|
|
|
@ -2653,7 +2653,7 @@ void Window::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("popup_exclusive_centered_clamped", "from_node", "minsize", "fallback_ratio"), &Window::popup_exclusive_centered_clamped, DEFVAL(Size2i()), DEFVAL(0.75));
|
ClassDB::bind_method(D_METHOD("popup_exclusive_centered_clamped", "from_node", "minsize", "fallback_ratio"), &Window::popup_exclusive_centered_clamped, DEFVAL(Size2i()), DEFVAL(0.75));
|
||||||
|
|
||||||
// Keep the enum values in sync with the `Mode` enum.
|
// Keep the enum values in sync with the `Mode` enum.
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Windowed,Minimized,Maximized,Fullscreen"), "set_mode", "get_mode");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Windowed,Minimized,Maximized,Fullscreen,Exclusive Fullscreen"), "set_mode", "get_mode");
|
||||||
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "title"), "set_title", "get_title");
|
ADD_PROPERTY(PropertyInfo(Variant::STRING, "title"), "set_title", "get_title");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue