mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
aggressively call SetForegroundWindow()
This commit is contained in:
parent
26ac51dca9
commit
a2885904c8
@ -402,14 +402,18 @@ open_window() {
|
|||||||
new_foreground_window = old_foreground_window;
|
new_foreground_window = old_foreground_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SetActiveWindow(new_foreground_window))
|
if (!SetActiveWindow(new_foreground_window)) {
|
||||||
{
|
windisplay_cat.warning()
|
||||||
|
<< "SetActiveWindow() failed!\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Let's aggressively call SetForegroundWindow() in addition to
|
||||||
|
// SetActiveWindow(). It seems to work in some cases to make the
|
||||||
|
// window come to the top, where SetActiveWindow doesn't work.
|
||||||
|
if (!SetForegroundWindow(new_foreground_window)) {
|
||||||
windisplay_cat.warning()
|
windisplay_cat.warning()
|
||||||
<< "SetForegroundWindow() failed!\n";
|
<< "SetForegroundWindow() failed!\n";
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine the initial open status of the IME.
|
// Determine the initial open status of the IME.
|
||||||
_ime_open = false;
|
_ime_open = false;
|
||||||
@ -799,17 +803,10 @@ open_fullscreen_window()
|
|||||||
// up the desktop during the mode change
|
// up the desktop during the mode change
|
||||||
const WindowClass &wclass = register_window_class(_properties);
|
const WindowClass &wclass = register_window_class(_properties);
|
||||||
HINSTANCE hinstance = GetModuleHandle(NULL);
|
HINSTANCE hinstance = GetModuleHandle(NULL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_hWnd = CreateWindow(wclass._name.c_str(), title.c_str(), window_style,
|
_hWnd = CreateWindow(wclass._name.c_str(), title.c_str(), window_style,
|
||||||
0, 0, dwWidth, dwHeight,
|
0, 0, dwWidth, dwHeight,
|
||||||
hDesktopWindow, NULL, hinstance, 0);
|
hDesktopWindow, NULL, hinstance, 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!_hWnd) {
|
if (!_hWnd) {
|
||||||
windisplay_cat.error()
|
windisplay_cat.error()
|
||||||
<< "CreateWindow() failed!" << endl;
|
<< "CreateWindow() failed!" << endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user