mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
Made panda window get focus for keyboard event in nested multi window mode
This commit is contained in:
parent
c544c10fbf
commit
cb63f15d15
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user