Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

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

27 Feb 2012   #11

W7 Pro SP1 64bit

No problem. Glad it is working more to your liking now.

Thanks for posting back with our findings.

My System SpecsSystem Spec
05 Mar 2012   #12

Windows 7

This issue is still creating problems for me.

The issue has improved somewhat since making the Registry setting change, but it hasn't gone away.

Is it possible to file a bug-report with Microsoft about this issue? Doesn't this bother other users? This issue is so bad I find using Windows a major pain because I'm constantly having to get the window to have focus before I can do anything with it.

Any advice you have I'd be thankful for :)
My System SpecsSystem Spec
27 Jan 2015   #13

7 x64 Ultimate

Quote   Quote: Originally Posted by UsernameIssues View Post
Quote   Quote: Originally Posted by swinchester4 View Post
.....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.

I realise this is an old thread, however a search reveals no other threads about this exact issue (although, there are plenty of threads related to similar issues regarding stealing of focus - but not this exact issue).

So the problem is exactly as UsernameIssues above has explained it - when clicking in the taskbar to launch an application, the taskbar becomes the last thing to have focus, and therefore when closing the window that was opened from the taskbar, the taskbar grabs focus, since the taskbar is the last thing to have focus.

The taskbar should not be grabbing focus, there is literally no reason why the taskbar needs to have focus. Focus should be handed to the last window that had focus!.

So, is there any way to completely obliterate the stupid taskbar from having focus? Perhaps some registry setting that disables the taskbar from ever getting focus?
My System SpecsSystem Spec


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

Thread Tools

Similar help and support threads
Thread Forum
Custom PC refuses to grab window updates
This is an old computer that was running a "modded" windows 7 ultimate. I no longer needed the ultimate and after formatting i installed windows 7 home premium NOT MODDED with an official windows 7 CD and key. The ultimate had no issues it ran fine and was good. This home premium wont do a basic...
Windows Updates & Activation
Window with 'Focus' won't stay on top of other windows
Is there a Microsoft fix for this -- or third party program that will fix this? Thank you..........
General Discussion
window focus with mouse pointer
hi, On one of my computers when the mouse pointer moves to another window the focus automatically goes to that window. But this does not happen on my other machine. Where can I find the setting to do this?i know this is not a big problem it is just that i am not able to resolve it>>> plz help
General Discussion
window loses focus
For some reason the "focus" goes away from the page I'm on and my cursor disappears Whether it's in Word on the Internet etc. I can click back on the page and it reappears. The "title" bar lightens up so the focus must be going to another program. It happens no matter what I'm looking at. Hide...
General Discussion
Window focus getting lost every few seconds
Since past 2-3 weeks I have noticed an issue that bugs me too much. The focus on a window keeps getting lost automatically. Lets say I am reading a page or writing in a textbox (like this one), the current focus would automatically get lost and again need to click somewhere in the program. I...
General Discussion

Our Sites

Site Links

About Us

Find 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 15:43.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App