aloneguid / bt

Browser Tamer
https://aloneguid.github.io/bt/
Apache License 2.0
134 stars 6 forks source link

Opened Browser is not being foregrounded #39

Closed tallen1983 closed 4 days ago

tallen1983 commented 10 months ago

When Browser Tamer decides it should open a link in Chrome's ProfileX, instead of that browser window being foregrounded, it just flashes in my task bar in the background. This happens if I have Chrome's ProfileX already open or not.

When not using Browser Tamer the browser is opened and foregrounded, so the expectation is it would work the same.

As it currently stands this makes Browser tamer only slightly easier to use than what I was previously doing (before clicking a particular link making sure I click the proper Chrome icon in my taskbar first to activate that profile).

aloneguid commented 10 months ago

Unfortunately this is up to a browser whether to foreground a window or not and has nothing to do with BT. Its tricky to find a correct foreground window if I would to try to implement a workaround as Chrome can have multiple windows for the same profile open and multiple profiles too. I could probably search taskbar for a flashing window and activate that but it needs a bit of experimentation as it's easy to do it very wrong.

tallen1983 commented 10 months ago

Thanks @aloneguid

I find it very odd that chrome behaves differently if you ask it to open a link compared to if windows does directly. I get it, it's a slightly different code path for them (chrome open this link and it decides what the last active window was vs chrome open this link inside this profile). But I'm wondering if there is some other magic that windows does that causes the window to come to the forefront (different API to launch it, etc).

aloneguid commented 10 months ago

I think this is resolved in 3.5.2.

mahoromax commented 10 months ago

No, it sadly is not :( I made sure I have 3.5.2 but things still open in the background.

Firefox and Edge behave differently, although I did not test them with multiple profiles.

paz commented 10 months ago

3.5.2 fixed this issue for me

PsychodelEKS commented 9 months ago

Not working for me either. Links are opened in background.

aloneguid commented 5 months ago

I will try a few things, it could be related to the fact that BT is not in foreground when links are opened, not quite sure.

mahoromax commented 5 months ago

I haven't actively exp'd this for a while, maybe I got used to it. I will try to observe and add in an edit.

Edit: Not happening to me anymore tbh... imo this has been fixed, maybe not with a BT update but with some windows/framework update maybe?

aloneguid commented 5 months ago

Please try 3.7.1, this has worked for me. I think the issue is BT is disposing process handles too early, and that's only reproducible in the release mode.

s-a-m commented 4 months ago

This is still happening in 3.7.3. It seems related to BT being in the foreground or minimized in the icon tray. That is, opening it up, helps links go in the foreground, while closing it up, sends links to the background by default. I'm using process rules and Firefox Developer Edition.

aloneguid commented 4 days ago

This should not be an issue anymore since v4.