Windows7 - Mouse not working, all windows + tray act like inactive

15
2013-10
  • Teo.sk

    I have this problem for two days now. First when it happened, logging out and back in helped, but now this occurs right after booting. I cannot activate any window by clicking into it, and also cannot minimalise, or close it with mouse. In few applications I cannot even interact with them with mouse (e.g. clicking on links in browser). I can scroll an active window with the trackball, and sometimes everything works normally for a little while. Everything works fine, when I use keyboard for this, I can resize, move, close windows with keyboard shortcuts, etc.

    I ran a complete Avast! scan, but it found nothing important. Also event viewer did not show any relevant errors. Here's a log from HijackThis if it helps anything.

  • Answers
  • Teo.sk

    It was actually a problem with my mouse device - the middle button was acting like stuck and always pressed. This caused the weird system behaviour.


  • Related Question

    How to make mouse in Windows 7 act the same as Windows XP
  • Phenom

    In Windows XP using TweakUI I could enable an option so that when my mouse goes over an inactive window, it makes that window the active window. There is also another separate option so that if the window becomes active, it automatically becomes the topmost window.

    I like to enable the former but not the latter.

    For Windows 7 I have not been able to find the same thing. What I found instead is an option inside windows that does something similar. If I move my mouse over an inactive window, I have to hover over it for a while before it becomes active. It is not instantaneous. The second problem is that once it does become active, it automatically makes itself the topmost window, covering other things I don't want covered.

    In summary, this is what I want in Windows 7:

    1. When my mouse goes over an inactive window, it immediately makes it the active window.

    2. When it activates the window, it does not raise it above other windows.


  • Related Answers
  • Community

    Thanks Phoshi for your answer. Since I stumbled on this link from a google-search I'm going to fill in some of the information missing from here and give a complete step-by-step guide for it:

    To get X-mouse working from a Vanilla Windows 7 install:

    1. Open the Control Panel
    2. Choose "Ease of Access"
    3. Choose "Change how your mouse works"
    4. Tick the box next to "Activate a window by hovering over it with the mouse" and hit "OK".
    5. Open regedit
    6. Locate HKEY_CURRENT_USER\Control Panel\Desktop\UserPreferenceMask - change the first byte only, you need to subtract hexidecimal 40 from value that is there (eg DF becomes 9F) - this disables Auto-raise on Activate
    7. Locate HKEY_CURRENT_USER\Control Panel\Desktop\ActiveWndTrkTimeout - change its value to something small. Lower values will make it more difficult to use floating temporary windows (such as the taskbar notification area widget) because they disappear of something else gets focus as you move to them, but lower values also improve responsiveness. You might start with 250ms and tweak it from there.
    8. Log out, log back in, et voila,...

    Steps 1-4 were mentioned in passing in the question, but not enumerated.

    Steps 5-8 are exactly what Phoshi said.

  • Joel Purra

    Instead of manual registry hacks, try using system calls from SystemParametersInfo, especially SPI_GETACTIVEWINDOWTRACKING, SPI_GETACTIVEWNDTRKZORDER, SPI_GETACTIVEWNDTRKTIMEOUT. Using these calls also save you from having to log out/in in order to apply the settings. I would recommend using X-Mouse Controls, which implements them.

    X-Mouse Controls: A tool to enable or disable active window tracking, raising and also the delay in milliseconds. This is known as x-mouse behavior.

    You only need to run it once, it is small, open source and takes care of the details for you.

  • Phoshi

    Right then!
    Open regedit, and let's get to work.

    Change

    HKEY_CURRENT_USER\Control Panel\Desktop\UserPreferenceMask
    

    into 9F 3E 07 80 12 00 00 00

    Then change

    HKEY_CURRENT_USER\Control Panel\Desktop\ActiveWndTrkTimeout
    

    to 0 (you might have to switch the datatype to decimal).

    Then log out, log in, and (hopefully) enjoy your window switching!

  • Phoshi

    This AutoHotkey script does that. Check the first lines, there are some parameters that change the behavior of the script:

    hover_task_buttons  = 1 ; hover over taskbar button to activate window
      hover_task_group  = 1 ; hover to select (or exit) from a window-group menu
                            ; (for Windows' "Group similar taskbar buttons" feature)
    hover_task_min_info = 0 ; only show info for minimized windows, don't activate
    hover_start_button  = 1 ; hover over start button to open start menu
    hover_min_max       = 1 ; minimize or maximize by hovering over the min/max buttons
    hover_any_window    = 0 ; activate any window by hovering (except the taskbar)
    
    hover_no_buttons    = 1 ; ignore hover if a mouse button is in the down state
    
    hover_delay       = 500 ; hover delay, from when the mouse stops moving
    
    ; WORKS, BUT NOT PERFECTLY: (brings the window forward, then puts it back in place)
    hover_keep_zorder   = 0 ; don't bring windows forward, only activate them
    

    You'll be interested in the last one listed above, hover_keep_zorder, with the caveat that it does not work perfectly (it worked fine for me though).

    Don't forget to also set hover_any_window to 1.