From cb63f15d15505cf5b5687bda52dfd605a1badc11 Mon Sep 17 00:00:00 2001 From: Gyedo Jeon Date: Fri, 8 May 2009 22:38:01 +0000 Subject: [PATCH] Made panda window get focus for keyboard event in nested multi window mode --- panda/src/windisplay/winGraphicsWindow.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/panda/src/windisplay/winGraphicsWindow.cxx b/panda/src/windisplay/winGraphicsWindow.cxx index e596fd8221..4b37b2b3ed 100644 --- a/panda/src/windisplay/winGraphicsWindow.cxx +++ b/panda/src/windisplay/winGraphicsWindow.cxx @@ -1174,6 +1174,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { SetCapture(hwnd); _input_devices[0].set_pointer_in_window(translate_mouse(LOWORD(lparam)), translate_mouse(HIWORD(lparam))); _input_devices[0].button_down(MouseButton::button(0), get_message_time()); + SetFocus(hwnd); // [gjeon] to get the keyboard event break; case WM_MBUTTONDOWN: @@ -1183,6 +1184,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { SetCapture(hwnd); _input_devices[0].set_pointer_in_window(translate_mouse(LOWORD(lparam)), translate_mouse(HIWORD(lparam))); _input_devices[0].button_down(MouseButton::button(1), get_message_time()); + SetFocus(hwnd); // [gjeon] to get the keyboard event break; case WM_RBUTTONDOWN: @@ -1192,6 +1194,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { SetCapture(hwnd); _input_devices[0].set_pointer_in_window(translate_mouse(LOWORD(lparam)), translate_mouse(HIWORD(lparam))); _input_devices[0].button_down(MouseButton::button(2), get_message_time()); + SetFocus(hwnd); // [gjeon] to get the keyboard event break; case WM_XBUTTONDOWN: