Unused function deleted
authorPatryk Kaczmarek <patryk.k@samsung.com>
Tue, 7 Jul 2015 09:49:51 +0000 (11:49 +0200)
committerTomasz Olszak <t.olszak@samsung.com>
Thu, 9 Jul 2015 15:08:37 +0000 (00:08 +0900)
   -_get_window_object_from_given is not used after this commit:
            9218c05897b60a59c5b0b5276d763246e5a90942

Change-Id: I5bfe138a7025cd8854bee971b56033aa08f4435c
Signed-off-by: Patryk Kaczmarek <patryk.k@samsung.com>
src/window_tracker.c

index eae96e6..454f1e4 100644 (file)
@@ -7,47 +7,6 @@ static void *user_data;
 static AtspiEventListener *listener;
 static AtspiAccessible *last_active_win;
 
-static AtspiAccessible*
-_get_window_object_from_given(AtspiAccessible *obj)
-{
-   if (!obj)
-      return NULL;
-
-   if (atspi_accessible_get_role(obj, NULL) != ATSPI_ROLE_DESKTOP_FRAME)
-      return NULL;
-
-   AtspiAccessible *win = NULL;
-   AtspiAccessible *app = NULL;
-   AtspiAccessible *ret = NULL;
-   AtspiStateSet *st = NULL;
-   int desktop_childs;
-   int app_childs;
-   int i,j;
-
-   desktop_childs = atspi_accessible_get_child_count(obj, NULL);
-
-   for (i=0; i < desktop_childs; i++)
-      {
-         app = atspi_accessible_get_child_at_index(obj, i, NULL);
-         if (atspi_accessible_get_role(app, NULL) == ATSPI_ROLE_APPLICATION)
-            {
-               app_childs = atspi_accessible_get_child_count(app, NULL);
-               for (j=0; j < app_childs; j++)
-                  {
-                     win = atspi_accessible_get_child_at_index(app, j, NULL);
-                     if (win) {
-                        st = atspi_accessible_get_state_set (win);
-                        if (atspi_state_set_contains(st, ATSPI_STATE_ACTIVE)) {
-                           return win;
-                        }
-                     }
-                  }
-            }
-      }
-
-   return ret;
-}
-
 static void
 _on_atspi_window_cb(const AtspiEvent *event)
 {
@@ -65,7 +24,7 @@ _on_atspi_window_cb(const AtspiEvent *event)
          !strcmp(event->type, "window:destroy"))
       {
          if (last_active_win != event->source)
-           return;
+            return;
          if (user_cb) user_cb(user_data, NULL);
          last_active_win = NULL;
       }