]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
if sm is disabled, there is nothing to shutdown, so don't go trying to free things...
[chaz/openbox] / openbox / action.c
index 24a0c6346396d39c45de365b372b106e008af1c6..8ad60931f9f40b2f709b00dcba7eb27455a17664 100644 (file)
@@ -1034,7 +1034,7 @@ void action_run_list(GSList *acts, ObClient *c, ObFrameContext context,
            it won't work right unless we XUngrabKeyboard first,
            even though we grabbed the key/button Asychronously.
            e.g. "gnome-panel-control --main-menu" */
-        XUngrabKeyboard(ob_display, event_lasttime);
+        XUngrabKeyboard(ob_display, event_curtime);
     }
 
     for (it = acts; it; it = g_slist_next(it)) {
@@ -1111,16 +1111,30 @@ void action_execute(union ActionData *data)
 
 void action_activate(union ActionData *data)
 {
-    client_activate(data->activate.any.c, data->activate.here);
+    /* similar to the openbox dock for dockapps, don't let user actions give
+       focus to 3rd-party docks (panels) either (unless they ask for it
+       themselves). */
+    if (data->client.any.c->type != OB_CLIENT_TYPE_DOCK) {
+        /* if using focus_delay, stop the timer now so that focus doesn't go
+           moving on us */
+        event_halt_focus_delay();
+
+        client_activate(data->activate.any.c, data->activate.here, TRUE);
+    }
 }
 
 void action_focus(union ActionData *data)
 {
-    /* if using focus_delay, stop the timer now so that focus doesn't go moving
-       on us */
-    event_halt_focus_delay();
+    /* similar to the openbox dock for dockapps, don't let user actions give
+       focus to 3rd-party docks (panels) either (unless they ask for it
+       themselves). */
+    if (data->client.any.c->type != OB_CLIENT_TYPE_DOCK) {
+        /* if using focus_delay, stop the timer now so that focus doesn't go
+           moving on us */
+        event_halt_focus_delay();
 
-    client_focus(data->client.any.c);
+        client_focus(data->client.any.c);
+    }
 }
 
 void action_unfocus (union ActionData *data)
@@ -1606,19 +1620,23 @@ void action_movetoedge(union ActionData *data)
     
     switch(data->diraction.direction) {
     case OB_DIRECTION_NORTH:
-        y = client_directional_edge_search(c, OB_DIRECTION_NORTH, data->diraction.hang)
+        y = client_directional_edge_search(c, OB_DIRECTION_NORTH,
+                                           data->diraction.hang)
             - (data->diraction.hang ? c->frame->area.height : 0);
         break;
     case OB_DIRECTION_WEST:
-        x = client_directional_edge_search(c, OB_DIRECTION_WEST, data->diraction.hang)
+        x = client_directional_edge_search(c, OB_DIRECTION_WEST,
+                                           data->diraction.hang)
             - (data->diraction.hang ? c->frame->area.width : 0);
         break;
     case OB_DIRECTION_SOUTH:
-        y = client_directional_edge_search(c, OB_DIRECTION_SOUTH, data->diraction.hang)
+        y = client_directional_edge_search(c, OB_DIRECTION_SOUTH,
+                                           data->diraction.hang)
             - (data->diraction.hang ? 0 : c->frame->area.height);
         break;
     case OB_DIRECTION_EAST:
-        x = client_directional_edge_search(c, OB_DIRECTION_EAST, data->diraction.hang)
+        x = client_directional_edge_search(c, OB_DIRECTION_EAST,
+                                           data->diraction.hang)
             - (data->diraction.hang ? 0 : c->frame->area.width);
         break;
     default:
This page took 0.023094 seconds and 4 git commands to generate.