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)) {
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)
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: