Don't try to focus the focused node

This commit is contained in:
Bastien Dejean 2013-06-29 21:45:21 +02:00
parent 4bcb9886f9
commit 92292f834f
2 changed files with 7 additions and 8 deletions

View file

@ -294,15 +294,14 @@ void grab_pointer(pointer_action_t pac)
frozen_pointer->window = c->window;
frozen_pointer->horizontal_fence = NULL;
frozen_pointer->vertical_fence = NULL;
bool backup;
switch (pac) {
case ACTION_FOCUS:
if (loc.node != mon->desk->focus) {
bool backup = pointer_follows_monitor;
pointer_follows_monitor = false;
focus_node(loc.monitor, loc.desktop, loc.node);
pointer_follows_monitor = backup;
}
backup = pointer_follows_monitor;
pointer_follows_monitor = false;
focus_node(loc.monitor, loc.desktop, loc.node);
pointer_follows_monitor = backup;
break;
case ACTION_MOVE:
case ACTION_RESIZE_SIDE:

4
tree.c
View file

@ -637,8 +637,8 @@ void pseudo_focus(desktop_t *d, node_t *n)
void focus_node(monitor_t *m, desktop_t *d, node_t *n)
{
if (n == NULL && d->root != NULL)
return;
if ((n == NULL && d->root != NULL)
|| n == mon->desk->focus)
if (mon->desk != d)
clear_input_focus();