瀏覽代碼

fix right-click menu deadlock on IE

David Rose 16 年之前
父節點
當前提交
83b78b6587
共有 1 個文件被更改,包括 10 次插入8 次删除
  1. 10 8
      panda/src/windisplay/winGraphicsWindow.cxx

+ 10 - 8
panda/src/windisplay/winGraphicsWindow.cxx

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