how do I get the top-most window to always grab focus?

Page 1 of 2 12 LastLast

  1. Posts : 6
    Windows 7
       #1

    how do I get the top-most window to always grab focus?


    I just got a new computer and it has Windows 7. Windows 7 is driving me nuts because the top-most window will not automatically get focus. For example, say I have Windows-Explorer and Notepad open. I have Notepad focused and am working in it. I then close Notepad, which leaves Windows-Explorer as the only open window on the desktop. Yet the Windows-Explorer window will not automaticlaly get focus. Instead it is "greyed" out and the only way I can focus it is to click on the window. This is so ANNOYING.

    Also, when I assign a keyboard shortcut (e.g., to open Internet Explorer if I assign Ctrl+Alt+I), it will never open with focus. It will open the app but it will be "greyed out" and it will not get focus until I click on it.

    This never happened on Windows XP. On XP the top-most window would always get focus if there was no window "above it" or if the window "above it" was closed.

    Is there any way to get Windows 7 to behave like Windows XP with windows getting focus?
      My Computer


  2. Posts : 370
    Windows 7 Ultimate x64
       #2

    When you close a program, focus returns to wherever it was before you focussed on the program you just closed. However, the problem here is if you have Explorer open, for example, open Notepad with the Start menu, then close Notepad, focus returns to the Start menu / taskbar because that's where it was last.

    There's an option in the Ease of Access settings to have it focus on whatever the mouse is hovering over, if that helps - go to Ease of Access > Make the mouse easier to use, then check 'Activate a window by hovering over it with the mouse'.
      My Computer


  3. Posts : 24,479
    Windows 7 Ultimate X64 SP1
       #3

    Welcome to Seven Forums swinchester4. Here is where CJ meant to go:
    Control Panel\All Control Panel Items\Ease of Access Center.
    You can find several settings there which can make Win 7 easier to use.
      My Computer


  4. Posts : 6
    Windows 7
    Thread Starter
       #4

    CreepinJesus said:
    When you close a program, focus returns to wherever it was before you focussed on the program you just closed. However, the problem here is if you have Explorer open, for example, open Notepad with the Start menu, then close Notepad, focus returns to the Start menu / taskbar because that's where it was last.
    This is not true. You can prove it: open Notepad and type a few letters. Then open Internet Explorer. Now close Internet Explorer. The focus does not return to Notepad. The focus also does not land on the Taskbar--I can't use the cursor keys to move across the taskbar. The focus is in never-never-land until I click on a window. When testing this, I am not opening anything from the Start menu. Everything I open is on the Taskbar.

    I can't believe people can live with this bug. It is driving me nuts.

    Thanks for posting about the Control Panel setting but I was already aware of this. It doesn't solve the problem because my mouse won't necessarily be positioned over the top most window when I close something else.
      My Computer


  5. Posts : 10,485
    W7 Pro SP1 64bit
       #5

    swinchester4 said:
    .....You can prove it: open Notepad and type a few letters. Then open Internet Explorer. Now close Internet Explorer. The focus does not return to Notepad......

    open Notepad
    okay, I did that via the start menu


    type a few letters
    okay, I typed a few letters into the notepad editor


    Then open Internet Explorer
    okay, but to do that I clicked on the IE shortcut that is pinned to the taskbar and therein lies the problem: I have now made an entry in the window Z order stack for the taskbar.


    Now close Internet Explorer
    okay, I've closed IE and the focus reverts to the last item that was in focus - the taskbar.


    To prove this z-order to yourself:
    open notepad
    open IE
    click on notepad to bring it into focus
    click in IE to bring it into focus
    close IE
    notepad should now be in focus

    I do not know if this is behavior can be changed based on the theme settings, but my quick testing indicates that the taskbar (or quick launch area) is a part of the window z-order stack for W7, XP, W2k. My testing in Vista and W98 seemed to show that the taskbar never enters the window z-order stack.
      My Computer


  6. Posts : 6
    Windows 7
    Thread Starter
       #6

    Thanks for illustrating this for me.

    This is the most retarted design because once the focus is on the taskbar you still can't use the cursor keys to navigate it.

    I would be grateful if you figure out a way to take the taskbar out of the z-order stack that you would post the how-to here. I still have a Windows XP machine and it does not behave this way. So I assume there has got to be some way to make Windows 7 not do this.
      My Computer


  7. Posts : 10,485
    W7 Pro SP1 64bit
       #7

    swinchester4 said:
    ........I still have a Windows XP machine and it does not behave this way.........
    All 4 of the XP computers that I just tested included the taskbar in the windows z-order... even if I change the themes around. So the key to making this happen for you lies in figuring out how your XP system is setup... or figuring out how you are opening things on that XP system.

    On your XP system:
    open notepad via the start menu
    (do not use an OS shortcut key)
    (do not use a shortcut on the desktop)

    open IE via the start menu
    (do not use an OS shortcut key)
    (do not use a shortcut on the desktop)
    (do not use a shortcut on the quick launch toolbar)

    close IE via Alt-F4
    close notepad via Alt-F4

    For me, attempting to close notepad via Alt-F4 brings up the windows shut down dialog box because notepad was not in focus.

    Again on the XP system, if you make a desktop shortcut for notepad and IE, and repeat the steps above using those desktop shortcuts, you may find that the desktop is not added to the windows z-order stack. The same is true for a W7 desktop and maybe that will be your work around: make/use desktop shortcuts for your most frequented apps.
      My Computer


  8. Posts : 6
    Windows 7
    Thread Starter
       #8

    Okay.

    First, I tested my Windows XP machine and it does NOT behave the same way the 7 machine does. The top window on my XP machine always gets focused. Even when doing your "experiment"

    Second: I think I solved the problem on my 7 machine. I edited the registry the ForegroundLockTimeout entry I think. I set it to zero and now 7 is behaving how I want.

    But here's the funny part. I checked my XP machine and the ForegroundLockTimeout registry setting is the default setting (ie, the setting that I don't like on the 7 machine). So I have no idea why the XP machine is behaving different than the 7 machine. By the way, I checked three other XP machines at work and ALL of them behave the same as my XP machine--they all give focus to the top most window yet have the default ForegroundLockTimeout registry setting. So something else has got to be at work here on the XP machines. I'd still like to find out what it is if possible. If you come across any more info on this, I'd be thankful if you posted what you learn.

    Thanks!
      My Computer


  9. Posts : 10,485
    W7 Pro SP1 64bit
       #9

    That is weird, I cannot find any XP computer that acts as you describe and I would not have thought that the registry key that you modified would have impacted this particular behavior in W7. Thanks for sharing that... maybe others will find your thread if this drives them crazy.
      My Computer


  10. Posts : 6
    Windows 7
    Thread Starter
       #10

    Okay, UsernameIssues, you are right afterall.

    After some more experimentation I realized you are right and that things like using "Quicklists" in WinXP to launch the applications cause the windows to behave differently than launching the apps from a Taskbar Icon in Win7.

    So you are absolutely correct. Thank you so much for your posts and help in my figuring this out. It was so kind of you :)

    With the registry hack I made, Windows 7 is not behaving much much better and no longer giving me grief :)

    Thanks again.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:51.
Find Us