]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
remove the ob_root var, its redundant of what Xlib already provides
[chaz/openbox] / openbox / client.c
index 1fd91f608ddabfbc67c75482388f4009740ca8f5..644198a77393c785137760a10da6398a777f4937 100644 (file)
@@ -67,7 +67,8 @@ void client_set_list()
     } else
        windows = NULL;
 
-    PROP_SETA32(ob_root, net_client_list, window, (guint32*)windows, size);
+    PROP_SETA32(RootWindow(ob_display, ob_screen),
+                net_client_list, window, (guint32*)windows, size);
 
     if (windows)
        g_free(windows);
@@ -113,7 +114,8 @@ void client_manage_all()
     XWMHints *wmhints;
     XWindowAttributes attrib;
 
-    XQueryTree(ob_display, ob_root, &w, &w, &children, &nchild);
+    XQueryTree(ob_display, RootWindow(ob_display, ob_screen),
+               &w, &w, &children, &nchild);
 
     /* remove all icon windows from the list */
     for (i = 0; i < nchild; i++) {
@@ -168,9 +170,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);
     }
 }
 
@@ -700,7 +702,7 @@ void client_update_transient_for(ObClient *self)
                    group */
                 if (t == self->group->leader ||
                     t == None ||
-                    t == ob_root) {
+                    t == RootWindow(ob_display, ob_screen)) {
                     /* window is a transient for its group! */
                     c = OB_TRAN_GROUP;
                 }
@@ -1485,27 +1487,28 @@ ObClient *client_search_focus_tree_full(ObClient *self)
     return client_search_focus_tree(self);
 }
 
-static StackLayer calc_layer(ObClient *self)
+static ObStackingLayer calc_layer(ObClient *self)
 {
-    StackLayer l;
+    ObStackingLayer l;
 
-    if (self->fullscreen) l = Layer_Fullscreen;
-    else if (self->type == OB_CLIENT_TYPE_DESKTOP) l = Layer_Desktop;
+    if (self->fullscreen) l = OB_STACKING_LAYER_FULLSCREEN;
+    else if (self->type == OB_CLIENT_TYPE_DESKTOP)
+        l = OB_STACKING_LAYER_DESKTOP;
     else if (self->type == OB_CLIENT_TYPE_DOCK) {
-        if (!self->below) l = Layer_Top;
-        else l = Layer_Normal;
+        if (!self->below) l = OB_STACKING_LAYER_TOP;
+        else l = OB_STACKING_LAYER_NORMAL;
     }
-    else if (self->above) l = Layer_Above;
-    else if (self->below) l = Layer_Below;
-    else l = Layer_Normal;
+    else if (self->above) l = OB_STACKING_LAYER_ABOVE;
+    else if (self->below) l = OB_STACKING_LAYER_BELOW;
+    else l = OB_STACKING_LAYER_NORMAL;
 
     return l;
 }
 
 static void client_calc_layer_recursive(ObClient *self, ObClient *orig,
-                                        StackLayer l, gboolean raised)
+                                        ObStackingLayer l, gboolean raised)
 {
-    StackLayer old, own;
+    ObStackingLayer old, own;
     GSList *it;
 
     old = self->layer;
@@ -1526,7 +1529,7 @@ static void client_calc_layer_recursive(ObClient *self, ObClient *orig,
 
 void client_calc_layer(ObClient *self)
 {
-    StackLayer l;
+    ObStackingLayer l;
     ObClient *orig;
 
     orig = self;
@@ -2418,7 +2421,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)
This page took 0.025829 seconds and 4 git commands to generate.