don't ignore the same enter events more than once
This commit is contained in:
parent
1aa4c53a4f
commit
e47499a07c
1 changed files with 5 additions and 1 deletions
|
@ -1721,6 +1721,7 @@ void event_ignore_queued_enters()
|
||||||
{
|
{
|
||||||
GSList *saved = NULL, *it;
|
GSList *saved = NULL, *it;
|
||||||
XEvent *e;
|
XEvent *e;
|
||||||
|
gint i = 0;
|
||||||
|
|
||||||
XSync(ob_display, FALSE);
|
XSync(ob_display, FALSE);
|
||||||
|
|
||||||
|
@ -1731,10 +1732,13 @@ void event_ignore_queued_enters()
|
||||||
ObWindow *win;
|
ObWindow *win;
|
||||||
|
|
||||||
win = g_hash_table_lookup(window_map, &e->xany.window);
|
win = g_hash_table_lookup(window_map, &e->xany.window);
|
||||||
if (win && WINDOW_IS_CLIENT(win))
|
/* check to make sure we're not ignoring the same event multiple
|
||||||
|
times */
|
||||||
|
if (win && WINDOW_IS_CLIENT(win) && i >= ignore_enter_focus)
|
||||||
++ignore_enter_focus;
|
++ignore_enter_focus;
|
||||||
|
|
||||||
saved = g_slist_append(saved, e);
|
saved = g_slist_append(saved, e);
|
||||||
|
++i;
|
||||||
} else {
|
} else {
|
||||||
g_free(e);
|
g_free(e);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue