fix right-click menu deadlock on IE

This commit is contained in:
David Rose 2009-12-19 04:01:30 +00:00
parent 6eba1cf08a
commit 83b78b6587

View File

@ -1290,7 +1290,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
// A button-click in the window means to grab the keyboard focus.
set_focus();
break;
return 0;
case WM_MBUTTONDOWN:
if (_lost_keypresses) {
@ -1301,9 +1301,10 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
_input_devices[0].button_down(MouseButton::button(1), get_message_time());
// A button-click in the window means to grab the keyboard focus.
set_focus();
break;
return 0;
case WM_RBUTTONDOWN:
cerr << "RBUTTONDOWN\n";
if (_lost_keypresses) {
resend_lost_keypresses();
}
@ -1312,7 +1313,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
_input_devices[0].button_down(MouseButton::button(2), get_message_time());
// A button-click in the window means to grab the keyboard focus.
set_focus();
break;
return 0;
case WM_XBUTTONDOWN:
{
@ -1328,7 +1329,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
_input_devices[0].button_down(MouseButton::button(4), get_message_time());
}
}
break;
return 0;
case WM_LBUTTONUP:
if (_lost_keypresses) {
@ -1336,7 +1337,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
}
ReleaseCapture();
_input_devices[0].button_up(MouseButton::button(0), get_message_time());
break;
return 0;
case WM_MBUTTONUP:
if (_lost_keypresses) {
@ -1344,15 +1345,16 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
}
ReleaseCapture();
_input_devices[0].button_up(MouseButton::button(1), get_message_time());
break;
return 0;
case WM_RBUTTONUP:
cerr << "RBUTTONUP\n";
if (_lost_keypresses) {
resend_lost_keypresses();
}
ReleaseCapture();
_input_devices[0].button_up(MouseButton::button(2), get_message_time());
break;
return 0;
case WM_XBUTTONUP:
{
@ -1367,7 +1369,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
_input_devices[0].button_up(MouseButton::button(4), get_message_time());
}
}
break;
return 0;
case WM_MOUSEWHEEL:
{