]> Dogcows Code - chaz/openbox/commitdiff
prefix and capitalize the ObFocusFallbackType enum
authorDana Jansens <danakj@orodu.net>
Thu, 10 Jul 2003 16:42:42 +0000 (16:42 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 10 Jul 2003 16:42:42 +0000 (16:42 +0000)
openbox/client.c
openbox/event.c
openbox/focus.c
openbox/focus.h
openbox/screen.c

index 1fd91f608ddabfbc67c75482388f4009740ca8f5..141bfcb949f52864740f89c2c122a50c5d4ed12a 100644 (file)
@@ -168,9 +168,9 @@ void client_manage_all()
         if (active) {
             g_assert(WINDOW_IS_CLIENT(active));
             if (!client_focus(WINDOW_AS_CLIENT(active)))
-                focus_fallback(Fallback_NoFocus);
+                focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);
         } else
-            focus_fallback(Fallback_NoFocus);
+            focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);
     }
 }
 
@@ -2418,7 +2418,7 @@ void client_unfocus(ObClient *self)
 #ifdef DEBUG_FOCUS
     g_message("client_unfocus for %lx", self->window);
 #endif
-    focus_fallback(Fallback_Unfocusing);
+    focus_fallback(OB_FOCUS_FALLBACK_UNFOCUSING);
 }
 
 void client_activate(ObClient *self)
index 8acca386af828c78d4cb0f8d75a9276dff33c8c9..7a1f66e93a40c3ab9807890d2fd3926fcdd84a3b 100644 (file)
@@ -432,7 +432,7 @@ static gboolean event_ignore(XEvent *e, ObClient *client)
                 g_message("no valid FocusIn and no FocusOut events found, "
                           "falling back");
 #endif
-                focus_fallback(Fallback_NoFocus);
+                focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);
             }
         }
        break;
index b64d3e0071e4332feeff8b3fa25e4c83e04bd5a8..f330e527546c685a297363a03e898acad878772f 100644 (file)
@@ -172,7 +172,7 @@ static gboolean focus_fallback_transient(ObClient *top, ObClient *old)
     return client_focus(target);
 }
 
-void focus_fallback(FallbackType type)
+void focus_fallback(ObFocusFallbackType type)
 {
     GList *it;
     ObClient *old = NULL;
@@ -185,13 +185,13 @@ void focus_fallback(FallbackType type)
     */
     focus_set_client(NULL);
 
-    if (!(type == Fallback_Desktop ?
+    if (!(type == OB_FOCUS_FALLBACK_DESKTOP ?
           config_focus_last_on_desktop : config_focus_last)) {
         if (config_focus_follow) focus_under_pointer();
         return;
     }
 
-    if (type == Fallback_Unfocusing && old) {
+    if (type == OB_FOCUS_FALLBACK_UNFOCUSING && old) {
         /* try for transient relations */
         if (old->transient_for) {
             if (old->transient_for == OB_TRAN_GROUP) {
@@ -226,7 +226,7 @@ void focus_fallback(FallbackType type)
     }
 
     for (it = focus_order[screen_desktop]; it != NULL; it = it->next)
-        if (type != Fallback_Unfocusing || it->data != old)
+        if (type != OB_FOCUS_FALLBACK_UNFOCUSING || it->data != old)
             if (client_normal(it->data) &&
                 /* dont fall back to 'anonymous' fullscreen windows. theres no
                    checks for this is in transient/group fallbacks, so they can
index d917367bed1d3e7e299d3fff102d0ea70a864231..a7f70a0e11b761041df3d4d59b9c1ed3b5d49c2a 100644 (file)
@@ -23,13 +23,14 @@ void focus_shutdown();
 void focus_set_client(struct _ObClient *client);
 
 typedef enum {
-    Fallback_Desktop,    /* switching desktops */
-    Fallback_Unfocusing, /* forcefully remove focus from the current window */
-    Fallback_NoFocus     /* nothing has focus for some reason */
-} FallbackType;
+    OB_FOCUS_FALLBACK_DESKTOP,    /*!< switching desktops */
+    OB_FOCUS_FALLBACK_UNFOCUSING, /*!< forcefully remove focus from the
+                                    current window */
+    OB_FOCUS_FALLBACK_NOFOCUS     /*!< nothing has focus for some reason */
+} ObFocusFallbackType;
 
 /*! Call this when you need to focus something! */
-void focus_fallback(FallbackType type);
+void focus_fallback(ObFocusFallbackType type);
 
 /*! Cycle focus amongst windows
   Returns the _ObClient to which focus has been cycled, or NULL if none. */
index c9b05a514013aba8eab10346a118224c012e1a5a..e2e141dd6d7e194943e25e0b59b50d4d879fe868 100644 (file)
@@ -346,9 +346,13 @@ void screen_set_desktop(guint num)
     /* focus the last focused window on the desktop, and ignore enter events
        from the switch so it doesnt mess with the focus */
     while (XCheckTypedEvent(ob_display, EnterNotify, &e));
+#ifdef DEBUG_FOCUS
     g_message("switch fallback");
-    focus_fallback(Fallback_Desktop);
+#endif
+    focus_fallback(OB_FOCUS_FALLBACK_DESKTOP);
+#ifdef DEBUG_FOCUS
     g_message("/switch fallback");
+#endif
 
     dispatch_ob(Event_Ob_Desktop, num, old);
 }
@@ -489,7 +493,7 @@ void screen_show_desktop(gboolean show)
                 client_focus(it->data))
                 break;
     } else {
-        focus_fallback(Fallback_NoFocus);
+        focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);
     }
 
     show = !!show; /* make it boolean */
This page took 0.039705 seconds and 4 git commands to generate.