Page 1 of 1

Activate window when scrolling

Posted: Sun Jul 04, 2021 11:53 pm
by anthony
XMBC Version: 2.19.2
Windows Version: 10
How long have you used XMBC?: 6 months

Thank you very much for the indispensable utility!

I have "Make scroll wheel scroll window under cursor" and "Activate window when scrolling" enabled. Sometimes the "Activate window..." feature stops working. The window still scrolls but the titlebar doesn't indicate that it has focus. When I send a close window shortcut, it closes the previous window, not the one I just scrolled. I can usually get it to work again by opening Settings and reapplying the settings. How can I troubleshoot this problem?

Re: Activate window when scrolling

Posted: Tue Jul 06, 2021 7:51 pm
by phil
Debug logging might help - it will give an awful lot of information so finding the relevant bits can be tricky - but if you manage to note the time that it does not work, finding entries in the log should be easier (for me at least).

Re: Activate window when scrolling

Posted: Tue Jul 06, 2021 8:57 pm
by anthony
Thanks for the reply.
The problem hasn't occurred today, but I will check the log when it does.

Re: Activate window when scrolling

Posted: Tue Jul 06, 2021 10:01 pm
by phil
You will need to enable debug logging first on the logging and updates tab (and that does have an impact on performance so it wont stay turned on after XMBC is restarted)

Re: Activate window when scrolling

Posted: Wed Jul 14, 2021 7:27 am
by anthony
The problem manifests itself when I start CMD with "Run as Admnistrator". When I scroll over CMD it works, but when I hover over any other window, the scrolling still applies to the CMD window. Can you reproduce this?

Re: Activate window when scrolling

Posted: Fri Jul 16, 2021 9:17 am
by phil
I'll try and have a look over the weekend (but its a rather busy one for me so I may not get a chance... please feel free to remind me next week if I haven't gotten back to you!)

Re: Activate window when scrolling

Posted: Sat Jul 17, 2021 11:53 am
by phil
Working fine here (of course).
Are you using the installed version or the portable version. If Installed, where did you install it (default c:\program files\highres.....\xmouse....?)

Because elevated windows are "special" ad for XMBC to properly interact with them (without running elevated itself) it needs the permission to act as an accessibility tool, and for that it NEEDS to be running from somewhere under the Program Files folder on your main OS drive! (It also needs to have a valid digital signature which XMBC has).

So that counts out the portable version (unless you ran it from under program files (or maybe \windows\system32!). But the installed version (installed to the default location) should be fine.

Re: Activate window when scrolling

Posted: Wed Jul 21, 2021 6:59 am
by anthony
I am using the portable version of XMBC. Should I run it elevated?

Re: Activate window when scrolling

Posted: Wed Jul 21, 2021 8:21 am
by phil
Well you can try running it elevated and see if that fixes it. That's probably the only way with the portable version (other than copying it to c:\program files\)

But its almost certainly the reason.

This is from the README Portable.txt in the portable distribution:

Code: Select all

It is important to remember that on Windows Vista/2008/7 or later, if you are using UAC (User 
Account Control), XMBC will only be able to interact with elevated applications (those running 
as Administrator) if XMBC itself is running as Administrator. To launch XMBC with Administrator 
permissions, right click the executable file and select "Run as Administrator". A UAC prompt 
will ask you to continue or to enter the Administrator credentials. If you don't have access to
this, XMBC will work in normal user mode but will interact only with other windows that are 
launched without administrator access. This means that if the input focus is on an elevated window, 
XMBC will NOT remap any buttons, invert scroll or handle any layer modifier keystrokes, nor will it
detect profiles as the mouse moves, until you physically activate a non-elevated window.

On top of that, in windows 8 and later, some additional functionality will not work in portable mode. 
Things such as ALT+TAB, WIN+X etc. require the application be signed and have UI Access in 
the manifest (which it has) but also that the program EXE be located in \Program Files 
or \Windows\System32. Blame Microsoft for this one.
The installed version should not have this problem either (assuming it is installed in the correct (default) location.