diff --git a/fvwm/events.c b/fvwm/events.c index 819e20db6..b33c853f1 100644 --- a/fvwm/events.c +++ b/fvwm/events.c @@ -2143,26 +2143,7 @@ ENTER_DBG((stderr, "en: exit: found LeaveNotify\n")); { FvwmWindow *lf = get_last_screen_focus_window(); - if (!Scr.flags.is_pointer_on_this_screen) - { - Scr.flags.is_pointer_on_this_screen = 1; - if (lf && lf != &Scr.FvwmRoot && - !FP_DO_UNFOCUS_LEAVE(FW_FOCUS_POLICY(lf))) - { - SetFocusWindow(lf, True, FOCUS_SET_FORCE); - } - else if (lf != &Scr.FvwmRoot) - { - ForceDeleteFocus(); - } - else - { - /* This was the first EnterNotify event for the - * root window - ignore */ - } - set_last_screen_focus_window(NULL); - } - else if (!(sf = get_focus_window()) || + if (!(sf = get_focus_window()) || FP_DO_UNFOCUS_LEAVE(FW_FOCUS_POLICY(sf))) { DeleteFocus(True); @@ -2180,10 +2161,6 @@ ENTER_DBG((stderr, "en: exit: found LeaveNotify\n")); focus_grab_buttons(lf); return; } - else - { - Scr.flags.is_pointer_on_this_screen = 1; - } /* An EnterEvent in one of the PanFrameWindows activates the Paging or an EdgeCommand. */ @@ -2238,7 +2215,6 @@ ENTER_DBG((stderr, "en: exit: found LeaveNotify\n")); m = fw->m; /* this was in the HandleMotionNotify before, HEDU */ - Scr.flags.is_pointer_on_this_screen = 1; e = *te; int p = HandlePaging( &e, m->virtual_scr.EdgeScrollX, diff --git a/fvwm/focus.c b/fvwm/focus.c index 1b63b65b3..755b26aea 100644 --- a/fvwm/focus.c +++ b/fvwm/focus.c @@ -253,27 +253,6 @@ static void __update_windowlist( return; } -static Bool __try_other_screen_focus(const FvwmWindow *fw) -{ - if (fw == NULL && !Scr.flags.is_pointer_on_this_screen) - { - FvwmWindow *sf; - - sf = get_focus_window(); - set_focus_window(NULL); - if (sf != NULL) - { - focus_grab_buttons(sf); - } - /* DV (25-Nov-2000): Don't give the Scr.NoFocusWin the focus - * here. This would steal the focus from the other screen's - * root window again. */ - return True; - } - - return False; -} - /* * Sets the input focus to the indicated window. */ @@ -293,10 +272,6 @@ static void __set_focus_to_fwin( return; } __update_windowlist(fw, args->set_by, args->is_focus_by_flip_focus_cmd); - if (__try_other_screen_focus(fw) == True) - { - return; - } if (fw && !args->do_forbid_warp) { diff --git a/fvwm/fvwm3.c b/fvwm/fvwm3.c index 8c78fb637..2e9c2876e 100644 --- a/fvwm/fvwm3.c +++ b/fvwm/fvwm3.c @@ -1207,10 +1207,6 @@ static void InitVariables(void) /* Not the right place for this, should only be called once * somewhere .. */ - Scr.flags.is_pointer_on_this_screen = !!FQueryPointer( - dpy, Scr.Root, &JunkRoot, &JunkChild, &JunkX, &JunkY, &JunkX, - &JunkY, &JunkMask); - /* make sure colorset 0 exists */ alloc_colorset(0); diff --git a/fvwm/screen.h b/fvwm/screen.h index c88c4fa3a..cacf5bb3d 100644 --- a/fvwm/screen.h +++ b/fvwm/screen.h @@ -460,8 +460,6 @@ typedef struct ScreenInfo unsigned is_executing_complex_function : 1; unsigned is_executing_menu_function : 1; unsigned is_map_desk_in_progress : 1; - unsigned is_pointer_on_this_screen : 1; - unsigned is_single_screen : 1; unsigned is_window_scheduled_for_destroy : 1; unsigned is_wire_frame_displayed : 1; } flags;