Skip to content

Commit 51557ef

Browse files
committed
WindowModes: Switch winGraphicsWindow to use window_mode instead of fullscreen and undecorated
1 parent 4dbc662 commit 51557ef

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

panda/src/windisplay/winGraphicsWindow.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -334,19 +334,19 @@ set_properties_now(WindowProperties &properties) {
334334
properties.clear_minimized();
335335
}
336336

337-
if (properties.has_fullscreen()) {
338-
if (properties.get_fullscreen() && !is_fullscreen()) {
337+
if (properties.has_window_mode()) {
338+
if (properties.get_window_mode() == WindowProperties::W_fullscreen && !is_fullscreen()) {
339339
if (do_fullscreen_switch()){
340-
_properties.set_fullscreen(true);
341-
properties.clear_fullscreen();
340+
_properties.set_window_mode(properties.get_window_mode());
341+
properties.clear_window_mode();
342342
} else {
343343
windisplay_cat.warning()
344344
<< "Switching to fullscreen mode failed!\n";
345345
}
346-
} else if (!properties.get_fullscreen() && is_fullscreen()){
346+
} else if (properties.get_window_mode() != WindowProperties::W_fullscreen && is_fullscreen()){
347347
if (do_windowed_switch()){
348-
_properties.set_fullscreen(false);
349-
properties.clear_fullscreen();
348+
_properties.set_window_mode(properties.get_window_mode());
349+
properties.clear_window_mode();
350350
} else {
351351
windisplay_cat.warning()
352352
<< "Switching to windowed mode failed!\n";
@@ -913,7 +913,7 @@ make_style(bool fullscreen) {
913913

914914
if (fullscreen){
915915
window_style |= WS_SYSMENU;
916-
} else if (!_properties.get_undecorated()) {
916+
} else if (_properties.get_window_mode() != WindowProperties::W_undecorated) {
917917
window_style |= (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX);
918918

919919
if (!_properties.get_fixed_size()) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy