浏览代码

I am betting the resend_lost_keypresses is not needed anymore; lets see if this breaks anything; if not then I can come back and clean up windisplay; for now that function just returns

Asad M. Zaman 18 年之前
父节点
当前提交
d078fcb708
共有 1 个文件被更改,包括 10 次插入5 次删除
  1. 10 5
      panda/src/windisplay/winGraphicsWindow.cxx

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

@@ -1900,8 +1900,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
         }
         }
         break;
         break;
 
 
-
-     case PM_ACTIVE:
+     case PM_ACTIVE:
         if (windisplay_cat.is_debug()) {
         if (windisplay_cat.is_debug()) {
           windisplay_cat.debug()
           windisplay_cat.debug()
             << "PM_ACTIVE\n";
             << "PM_ACTIVE\n";
@@ -1909,8 +1908,8 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
         properties.set_foreground(true);
         properties.set_foreground(true);
         system_changed_properties(properties);
         system_changed_properties(properties);
         break;
         break;
-
-      case PM_INACTIVE:
+
+      case PM_INACTIVE:
         if (windisplay_cat.is_debug()) {
         if (windisplay_cat.is_debug()) {
           windisplay_cat.debug()
           windisplay_cat.debug()
             << "PM_INACTIVE\n";
             << "PM_INACTIVE\n";
@@ -1983,6 +1982,8 @@ process_1_event() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void WinGraphicsWindow::
 void WinGraphicsWindow::
 resend_lost_keypresses() {
 resend_lost_keypresses() {
+  _lost_keypresses = false;
+  return;
   nassertv(_lost_keypresses);
   nassertv(_lost_keypresses);
   if (windisplay_cat.is_debug()) {
   if (windisplay_cat.is_debug()) {
     windisplay_cat.debug()
     windisplay_cat.debug()
@@ -2046,7 +2047,11 @@ resend_lost_keypresses() {
       {
       {
           ButtonHandle key = lookup_key(i);
           ButtonHandle key = lookup_key(i);
           if (key != ButtonHandle::none())
           if (key != ButtonHandle::none())
-              _input_devices[0].button_down(key, message_time);
+            if (windisplay_cat.is_debug()) {
+              windisplay_cat.debug()
+                << "resending key: " << " (" << key << ")\n";
+            }
+          _input_devices[0].button_down(key, message_time);
       }
       }
   }
   }
 #endif  // WANT_NEW_FOCUS_MANAGMENT
 #endif  // WANT_NEW_FOCUS_MANAGMENT