When switching focus from a window to the desktop, the "passive" signal was being...
authorrephorm <rephorm>
Thu, 18 Aug 2005 05:03:15 +0000 (05:03 +0000)
committerrephorm <rephorm@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 18 Aug 2005 05:03:15 +0000 (05:03 +0000)
It looks like the section I commented out was unnecessary, and duplicated logic handled earlier in the function. (The original "else if ((!focus) && (bd->focused))" block). Can someone else verify this for me?

SVN revision: 16228

src/bin/e_border.c

index 36a9c689ba334a873093d627961191eb3854a119..6ef6826085a8c5ab4da8438fc8ce482de150bb7f 100644 (file)
@@ -940,11 +940,15 @@ e_border_focus_set(E_Border *bd, int focus, int set)
          }
        e_hints_active_window_set(bd->zone->container->manager, bd);
      }
+
+#if 0
+   /* i'm pretty sure this case is handled above -- this was resulting in the "passive"
+    * event getting sent twice when going from a window to the desktop. --rephorm */
    else if ((!bd->focused) && (focused == bd))
      {
        if (focused)
          {
-//          printf("unfocus previous\n");
+//          printf("unfocus previous 2\n");
             edje_object_signal_emit(focused->bg_object, "passive", "");
             e_focus_event_focus_out(focused);
             /* FIXME: Sometimes we should leave the window fullscreen! */
@@ -959,6 +963,7 @@ e_border_focus_set(E_Border *bd, int focus, int set)
          }
        e_hints_active_window_set(bd->zone->container->manager, NULL);
      }
+#endif
    if (bd->focused) focused = bd;
    else if ((!bd->focused) && (focused == bd)) focused = NULL;
 }