Page 1 of 1

Changing Firefox Tabs does not trigger Profile Change

Posted: Thu May 27, 2021 4:07 pm
by evolut1010
XMBC Version: 2.19.2
Windows Version: 10 Home 19042
Mouse Information (brand/model): Logitech
How long have you used XMBC?: 3 Months
What language and keyboard layout do you use in Windows?: English

I have 2 profiles:
Caption: .*reddit.* (any website A)
Process: firefox.exe
Class: MozillaWindowClass
Enable Regular Expression Matching Checked

Caption: .*ebay.* (any website B)
Process: firefox.exe
Class: MozillaWindowClass
Enable Regular Expression Matching Checked

When switching between these 2 firefox tabs the profiles change only AFTER clicking another application.

Desired behavior: On reddit with reddit-profile, click on ebay-tab and ebay-profile is activated.
Current behavior: On reddit with reddit-profile, click on ebay-tab and reddit-profile is still active.
Current workaround: On reddit with reddit-profile, click on ebay-tab, click on <windows-desktop> and general-profile is activated, click on ebay-tab and ebay-profile is activated.

I am using 'change mouse cursor when profile is active' to easily visualize when the profiles switch.

I am able to achieve the desired behavior in chrome using equivalent window details, but can't seem to get it to work on firefox.

Re: Changing Firefox Tabs does not trigger Profile Change

Posted: Thu May 27, 2021 5:19 pm
by phil
The problem is that XMBC monitors the process under the mouse and when it changes, it runs through the profile list looking for matches.
But when you change tabs, the process is NOT changing so XMBC is not triggering its code to look for the profile of the window under the cursor.

It only does this search as infrequently as possible because the performance of the search, especially with regex enabled is rather slow - and doing it every time the mouse moves (for example) would cause pointer lag.

I thought there was something special in there to account for this and to look a little more often but maybe I'm wrong, or its not working (I may be getting confused with profiles that are defined for windows regions - its been a while since I looked at that area!)... Its possible that the workaround was only put in for Chrome (if its working on Chrome but that would be a little surprising as I tend to use Firefox (actually Waterfox) by default so I'd be surprised if I had completely missed it out.... Unfortunately the browsers change quite frequently which can also break the way these little workaround work (changing windows class names etc that XMBc is looking for)...

I will have to actually have a look (not at home right now) and get back to you.