diff --git a/panda/src/display/config_display.cxx b/panda/src/display/config_display.cxx index fc6fbeed68..579e32b788 100644 --- a/panda/src/display/config_display.cxx +++ b/panda/src/display/config_display.cxx @@ -184,22 +184,10 @@ ConfigVariableInt win_size "replaces the deprecated win-width and win-height variables.")); ConfigVariableInt win_origin -("win-origin", "0 0", +("win-origin", "", PRC_DESC("This is the default position at which to open a new window. This " "replaces the deprecated win-origin-x and win-origin-y variables.")); -ConfigVariableInt win_width -("win-width", 0); - -ConfigVariableInt win_height -("win-height", 0); - -ConfigVariableInt win_origin_x -("win-origin-x", 0); - -ConfigVariableInt win_origin_y -("win-origin-y", 0); - ConfigVariableBool fullscreen ("fullscreen", false); diff --git a/panda/src/display/config_display.h b/panda/src/display/config_display.h index 1301ca65bf..0220a59650 100644 --- a/panda/src/display/config_display.h +++ b/panda/src/display/config_display.h @@ -63,10 +63,6 @@ extern EXPCL_PANDA ConfigVariableBool color_scale_via_lighting; extern EXPCL_PANDA ConfigVariableInt win_size; extern EXPCL_PANDA ConfigVariableInt win_origin; -extern EXPCL_PANDA ConfigVariableInt win_width; -extern EXPCL_PANDA ConfigVariableInt win_height; -extern EXPCL_PANDA ConfigVariableInt win_origin_x; -extern EXPCL_PANDA ConfigVariableInt win_origin_y; extern EXPCL_PANDA ConfigVariableBool fullscreen; extern EXPCL_PANDA ConfigVariableBool undecorated; extern EXPCL_PANDA ConfigVariableBool cursor_hidden; diff --git a/panda/src/display/windowProperties.cxx b/panda/src/display/windowProperties.cxx index e145dc0a35..b2c2db8dd4 100644 --- a/panda/src/display/windowProperties.cxx +++ b/panda/src/display/windowProperties.cxx @@ -61,23 +61,13 @@ get_default() { props.set_open(true); - if (win_width.has_value() && win_height.has_value() && - !win_size.has_value()) { - props.set_size(win_width, win_height); - - } else { - if (win_size.get_num_words() == 1) { - props.set_size(win_size[0], win_size[0]); - } else { - props.set_size(win_size[0], win_size[1]); - } + if (win_size.get_num_words() == 1) { + props.set_size(win_size[0], win_size[0]); + } else if (win_size.get_num_words() >= 2) { + props.set_size(win_size[0], win_size[1]); } - if (win_origin_x.has_value() && win_origin_y.has_value() && - !win_origin.has_value()) { - props.set_origin(win_origin_x, win_origin_y); - - } else { + if (win_origin.get_num_words() >= 2) { props.set_origin(win_origin[0], win_origin[1]); }