From 77204cbe3e70ac2df9495f8b6b564244b8907e34 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 24 Feb 2006 19:21:17 +0000 Subject: [PATCH] allow set_foreground to be requested --- panda/src/windisplay/winGraphicsWindow.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/panda/src/windisplay/winGraphicsWindow.cxx b/panda/src/windisplay/winGraphicsWindow.cxx index 473cc15b15..7ad01f41e3 100644 --- a/panda/src/windisplay/winGraphicsWindow.cxx +++ b/panda/src/windisplay/winGraphicsWindow.cxx @@ -297,6 +297,17 @@ set_properties_now(WindowProperties &properties) { properties.clear_z_order(); } + + if (properties.has_foreground() && properties.get_foreground()) { + if (!SetForegroundWindow(_hWnd)) { + windisplay_cat.warning() + << "SetForegroundWindow() failed!\n"; + } else { + _properties.set_foreground(true); + } + + properties.clear_foreground(); + } }