]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
revert r6029, as it didnt fix anything.
[chaz/openbox] / openbox / action.c
index 556fc22564a50e36bbdee3f21341529b2c2f9324..5d1c08a9c356a164c4f0bf35e20dcdd746c5f59c 100644 (file)
@@ -892,6 +892,11 @@ ActionString actionstrings[] =
         action_growtoedge,
         setup_action_growtoedge_east
     },
+    {
+        "breakchroot",
+        action_break_chroot,
+        NULL
+    },
     {
         NULL,
         NULL,
@@ -1093,6 +1098,17 @@ void action_run_list(GSList *acts, ObClient *c, ObFrameContext context,
             if (a->data.any.interactive || a->func == action_moveresize) {
                 /* interactive actions are not queued */
                 a->func(&a->data);
+            } else if (context == OB_FRAME_CONTEXT_CLIENT ||
+                       (c && c->type == OB_CLIENT_TYPE_DESKTOP &&
+                        context == OB_FRAME_CONTEXT_DESKTOP)) {
+                /* XXX MORE UGLY HACK
+                   actions from clicks on client windows are NOT queued.
+                   this solves the mysterious click-and-drag-doesnt-work
+                   problem. it was because the window gets focused and stuff
+                   after the button event has already been passed through. i
+                   dont really know why it should care but it does and it makes
+                   a difference. */
+                a->func(&a->data);
             } else
                 ob_main_loop_queue_action(ob_main_loop, a);
         }
@@ -1389,7 +1405,7 @@ void action_resize_relative(union ActionData *data)
     h = oh + data->relative.deltay * c->size_inc.height
         + data->relative.deltayu * c->size_inc.height;
     
-    client_try_configure(c, OB_CORNER_TOPLEFT, &x, &y, &w, &h, &lw, &lh, TRUE);
+    client_try_configure(c, &x, &y, &w, &h, &lw, &lh, TRUE);
     client_move_resize(c, x + (ow - w), y + (oh - h), w, h);
     client_action_end(data);
 }
@@ -1727,7 +1743,7 @@ void action_showmenu(union ActionData *data)
 {
     if (data->showmenu.name) {
         menu_show(data->showmenu.name, data->any.x, data->any.y,
-                  data->showmenu.any.c);
+                  data->any.button, data->showmenu.any.c);
     }
 }
 
@@ -1790,7 +1806,7 @@ void action_movetoedge(union ActionData *data)
     default:
         g_assert_not_reached();
     }
-    frame_frame_gravity(c->frame, &x, &y);
+    frame_frame_gravity(c->frame, &x, &y, c->area.width, c->area.height);
     client_action_start(data);
     client_move(c, x, y);
     client_action_end(data);
@@ -1854,9 +1870,9 @@ void action_growtoedge(union ActionData *data)
     default:
         g_assert_not_reached();
     }
-    frame_frame_gravity(c->frame, &x, &y);
     width -= c->frame->size.left + c->frame->size.right;
     height -= c->frame->size.top + c->frame->size.bottom;
+    frame_frame_gravity(c->frame, &x, &y, width, height);
     client_action_start(data);
     client_move_resize(c, x, y, width, height);
     client_action_end(data);
@@ -1899,3 +1915,9 @@ void action_unshow_desktop(union ActionData *data)
 {
     screen_show_desktop(FALSE);
 }
+
+void action_break_chroot(union ActionData *data)
+{
+    /* break out of one chroot */
+    keyboard_reset_chains(1);
+}
This page took 0.023772 seconds and 4 git commands to generate.