Page MenuHome

Fix T40065: Pressing Esc in separate render result window does not focus main window
ClosedPublic

Authored by Tamito Kajiyama (kjym3) on Jun 12 2014, 6:28 AM.

Details

Summary

Fix T40065: Pressing Esc in separate render result window does not focus main window.

The problem is that the render window keeps keybord input focus even after it has been
lowered. Windows maintains the Z-order of windows, so the present solution is to raise
the window that has been just below the render window.

Diff Detail

Event Timeline

Hi Thomas, could you please review this patch?

Added Nathan and Campbell, I don't maintain GHOST.

Silly question, Is there any guarantee GW_HWNDNEXT would be a window owned by Blender?
Checked docs for GetWindow and it didn't state this explicitly AFAICS.

Maybe its acceptable if some other window is raised too.

intern/ghost/intern/GHOST_WindowWin32.cpp
649

names are a bit confusing, how about hWnd -> hwnd_to_raise,

hWndInsertAfter - also confusing but... eh this is what MSVC calls also.

663

could just ignore if this fails. since the initial command worked.

Thanks @Thomas Dinges (dingto) !

@Campbell Barton (campbellbarton),
No, actually nothing happens if a non-Blender window is under the render window. I thought that non-Blender window will be raised, but that is not the case (tested under Windows 7).

Tamito Kajiyama (kjym3) updated this revision to Unknown Object (????).Jun 13 2014, 2:10 AM

Renamed an auto variable according to a code review comment.

Anything blocking this patch from going in?

No, but I thought the patch was supposed to wait for an approval to go in. I will commit it.