diff --git a/fvwm/events.c b/fvwm/events.c index ec02274b2..ff00c2e6c 100644 --- a/fvwm/events.c +++ b/fvwm/events.c @@ -2261,13 +2261,6 @@ void HandleEnterNotify(const evh_args_t *ea) char *edge_command = NULL; struct monitor *m = monitor_get_current(); - if ( - Scr.UnknownWinFocused != None && - (sf = get_focus_window()) != NULL && - sf == Scr.StolenFocusFvwmWin) - { - _refocus_stolen_focus_win(ea); - } /* check for edge commands */ if (ewp->window == m->PanFrameTop.win) { @@ -2285,6 +2278,15 @@ void HandleEnterNotify(const evh_args_t *ea) { edge_command = m->PanFrameRight.command; } + + if ( + Scr.UnknownWinFocused != None && + (sf = get_focus_window()) != NULL && + sf == Scr.StolenFocusFvwmWin) + { + _refocus_stolen_focus_win(ea); + } + if (edge_command && ewp->mode == NotifyUngrab && ewp->detail == NotifyAncestor) {