Changing Firefox Tabs does not trigger Profile Change

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Post Reply
evolut1010
New User
Posts: 1
Joined: Thu May 27, 2021 3:49 pm

Changing Firefox Tabs does not trigger Profile Change

Post 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.

User avatar
phil
Site Admin
Posts: 6762
Joined: Sun Apr 06, 2003 11:12 pm

Re: Changing Firefox Tabs does not trigger Profile Change

Post 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.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

Post Reply