]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
default focus text color for titlebars is black
[chaz/openbox] / openbox / action.c
index 6b98bcb251bf8c878e473e2f1477acccea5d8910..a58441b08a754df95821feae2e8a3a1d7d9662e4 100644 (file)
@@ -92,6 +92,7 @@ Action *action_from_string(char *name)
         a = action_new(action_toggle_maximize_vert);
     } else if (!g_ascii_strcasecmp(name, "sendtodesktop")) {
         a = action_new(action_send_to_desktop);
+        a->data.sendto.follow = TRUE;
     } else if (!g_ascii_strcasecmp(name, "sendtonextdesktop")) {
         a = action_new(action_send_to_next_desktop);
         a->data.sendtonextprev.wrap = FALSE;
@@ -300,7 +301,7 @@ void action_resize_relative_horz(union ActionData *data)
 void action_resize_relative_vert(union ActionData *data)
 {
     Client *c = data->relative.c;
-    if (c)
+    if (c && !c->shaded)
         client_configure(c, Corner_TopLeft, c->area.x, c->area.y,
                          c->area.width, c->area.height + data->relative.delta,
                          TRUE, TRUE);
@@ -365,10 +366,14 @@ void action_toggle_maximize_vert(union ActionData *data)
 
 void action_send_to_desktop(union ActionData *data)
 {
-    if (data->desktop.c)
-        if (data->desktop.desk < screen_num_desktops ||
-            data->desktop.desk == DESKTOP_ALL)
-            client_set_desktop(data->desktop.c, data->desktop.desk, TRUE);
+    if (data->sendto.c) {
+        if (data->sendto.desk < screen_num_desktops ||
+            data->sendto.desk == DESKTOP_ALL) {
+            client_set_desktop(data->desktop.c,
+                               data->sendto.desk, data->sendto.follow);
+            if (data->sendto.follow) screen_set_desktop(data->sendto.desk);
+        }
+    }
 }
 
 void action_send_to_next_desktop(union ActionData *data)
@@ -627,10 +632,8 @@ void action_resize(union ActionData *data)
     int w = data->resize.x;
     int h = data->resize.y;
  
-    if (!c || !client_normal(c)) return;
+    if (!c || c->shaded || !client_normal(c)) return;
 
-    /* XXX window snapping/struts */
-    
     dispatch_resize(c, &w, &h, data->resize.corner);
     
     w -= c->frame->size.left + c->frame->size.right;
This page took 0.020447 seconds and 4 git commands to generate.