wf_toggle_fullscreen: change hwnd parent
Also: do not lose focus
This commit is contained in:
parent
8b443989bb
commit
4bfa11bcca
@ -250,9 +250,11 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
|
||||
break;
|
||||
|
||||
case WM_KILLFOCUS:
|
||||
DEBUG_KBD("loosing focus %X", hWnd);
|
||||
if (g_focus_hWnd == hWnd)
|
||||
if (g_focus_hWnd == hWnd && wfi && !wfi->fullscreen)
|
||||
{
|
||||
DEBUG_KBD("loosing focus %X", hWnd);
|
||||
g_focus_hWnd = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -282,6 +282,7 @@ void wf_toggle_fullscreen(wfInfo* wfi)
|
||||
{
|
||||
ShowWindow(wfi->hwnd, SW_HIDE);
|
||||
wfi->fullscreen = !wfi->fullscreen;
|
||||
SetParent(wfi->hwnd, wfi->fullscreen ? NULL : wfi->hWndParent);
|
||||
wf_resize_window(wfi);
|
||||
ShowWindow(wfi->hwnd, SW_SHOW);
|
||||
SetForegroundWindow(wfi->hwnd);
|
||||
|
Loading…
Reference in New Issue
Block a user