mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
windisplay: fix origin not respected when switching to windowed mode
This commit is contained in:
parent
14bdcf40fb
commit
b518da99a6
@ -283,6 +283,17 @@ process_events() {
|
|||||||
*/
|
*/
|
||||||
void WinGraphicsWindow::
|
void WinGraphicsWindow::
|
||||||
set_properties_now(WindowProperties &properties) {
|
set_properties_now(WindowProperties &properties) {
|
||||||
|
if (properties.has_fullscreen() && !properties.get_fullscreen() &&
|
||||||
|
is_fullscreen()) {
|
||||||
|
if (do_windowed_switch()) {
|
||||||
|
_properties.set_fullscreen(false);
|
||||||
|
properties.clear_fullscreen();
|
||||||
|
} else {
|
||||||
|
windisplay_cat.warning()
|
||||||
|
<< "Switching to windowed mode failed!\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GraphicsWindow::set_properties_now(properties);
|
GraphicsWindow::set_properties_now(properties);
|
||||||
if (!properties.is_any_specified()) {
|
if (!properties.is_any_specified()) {
|
||||||
// The base class has already handled this case.
|
// The base class has already handled this case.
|
||||||
@ -413,14 +424,6 @@ set_properties_now(WindowProperties &properties) {
|
|||||||
windisplay_cat.warning()
|
windisplay_cat.warning()
|
||||||
<< "Switching to fullscreen mode failed!\n";
|
<< "Switching to fullscreen mode failed!\n";
|
||||||
}
|
}
|
||||||
} else if (!properties.get_fullscreen() && is_fullscreen()){
|
|
||||||
if (do_windowed_switch()){
|
|
||||||
_properties.set_fullscreen(false);
|
|
||||||
properties.clear_fullscreen();
|
|
||||||
} else {
|
|
||||||
windisplay_cat.warning()
|
|
||||||
<< "Switching to windowed mode failed!\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user