Share via

Does Win 11 fix the "stealing focus while typing" issue?

Craig Lambie 21 Reputation points
2021-11-01T16:19:58.193+00:00

New Windows. Exciting stuff.

However I wonder if they have fixed this long held problem of the pop ups "stealing focus" while you are typing?

The problem has been reported since Windows Vista, applications loading in the background, pop ups, etc steal focus.
In the meantime, you have gone off to another application and are maybe typing a question into a forum like this, and Boom up pops an important message like "Do you want to restart your computer" and you inadvertantly at that moment hit the y key, as you are typing "yellow" or "yesterday" at that exact moment - murphys law - and your computer goes down for 4 minutes while it does a full update of course...

I am sure you know the feeling.

So, does Win 11 fix this?
If not, can it? Vote up this question if you want it to happen.

@MrHappy @ImMrHappy

Windows for business | Windows Client for IT Pros | User experience | Other

4 answers

Sort by: Most helpful
  1. Saeid Yazdani 6 Reputation points
    2022-01-11T10:17:44.8+00:00

    No, it is still a torment to me and the only way to fix it is to shutdown and turn back on again. I think it has to do with VMMEM.EXE asa when this happens this goes ham on the resources :(

    Common Microsoft you can do better!

    1 person found this answer helpful.
    0 comments No comments

  2. OfTheRocks 5 Reputation points
    2026-04-08T16:31:41.6133333+00:00

    This has drove me nuts always too, I had AI generate this AHK code for me (AutoHotkey, if not familiar with it). Copied below if you're still interested in a solution:

    Hey, saw your post about applications stealing focus in Windows. It's drove me nuts always too, I had AI generate this AHK code for me (AutoHotkey, if not familiar with it). Copied below if you're still interested in a solution:
    #NoEnv
    #SingleInstance Force
    SetTimer, WatchFocus, 100
    UserSwitch := False
    LastHwnd := ""
    ; These actions count as intentional switches
    ~LButton::
    ~RButton::
    ~MButton::
        UserSwitch := True
        SetTimer, ResetFlag, -600
    return
    ~Alt & Tab::
    ~LWin & Tab::
        UserSwitch := True
        SetTimer, ResetFlag, -1500
    return
    ResetFlag:
        UserSwitch := False
    return
    WatchFocus:
        CurrentHwnd := WinExist("A")
        if (LastHwnd = "") {
            LastHwnd := CurrentHwnd
            return
        }
        if (CurrentHwnd != LastHwnd) {
            if (!UserSwitch) {
                ; Focus was stolen — restore it
                WinActivate, ahk_id %LastHwnd%
            } else {
                ; Intentional switch — accept it
                LastHwnd := CurrentHwnd
            }
        }
    return
    
    0 comments No comments

  3. Henning C. Nielsen 1 Reputation point
    2022-02-03T08:26:55.957+00:00

    You can set ForegroundLockTimeout to 0 in the registry. This has always been a problem since maybe Windows XP or 2000, and still is in Windows 11.

    https://www.lifewire.com/how-to-prevent-programs-from-stealing-focus-in-windows-2624453


  4. Shane Walsh 31 Reputation points
    2022-01-11T11:37:39.407+00:00

    All of these settings can be controlled via the control panel, so if Windows wants to restart it will do so when you tell it to. You can control the notifications, active hours etc..

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.