mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
windisplay: Fix parented child window being offset
This would happen if the undecorated flag is not set; it would receive an additional offset equal to the size of the window decoration. Fixes regression presumably caused by a968caf1d207023b2820cf4c31ae3e7324ffb218
This commit is contained in:
parent
576c25b3ea
commit
48fb2f721f
@ -298,6 +298,7 @@ set_properties_now(WindowProperties &properties) {
|
|||||||
// When switching undecorated mode, Windows will keep the window at the
|
// When switching undecorated mode, Windows will keep the window at the
|
||||||
// current outer size, whereas we want to keep it with the configured
|
// current outer size, whereas we want to keep it with the configured
|
||||||
// inner size. Store the current size and origin.
|
// inner size. Store the current size and origin.
|
||||||
|
if (_parent_window_handle == nullptr) {
|
||||||
LPoint2i top_left = _properties.get_origin();
|
LPoint2i top_left = _properties.get_origin();
|
||||||
LPoint2i bottom_right = top_left + _properties.get_size();
|
LPoint2i bottom_right = top_left + _properties.get_size();
|
||||||
|
|
||||||
@ -319,6 +320,7 @@ set_properties_now(WindowProperties &properties) {
|
|||||||
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED |
|
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED |
|
||||||
SWP_NOSENDCHANGING | SWP_SHOWWINDOW);
|
SWP_NOSENDCHANGING | SWP_SHOWWINDOW);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (properties.has_title()) {
|
if (properties.has_title()) {
|
||||||
std::string title = properties.get_title();
|
std::string title = properties.get_title();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user