Morph21 / MercuryTrade-Community-Fork

An overlay application for Path of Exile(Tracking, Trading, Chat, etc)
MIT License
140 stars 23 forks source link

Add basic Multiple Client support #127

Open rpav opened 2 years ago

rpav commented 2 years ago

Addresses #123. This adds a dropdown which is populated with a few options to support multiple clients:

Probably "Never Switch" should be the default, but this seemed like the "safe" option. This adds a bit of utility in ChatHelper, alters the window test based on PID, and adds a dropdown to General Settings.

(I haven't had a ton of time and I had a working PID text field which did the job for a bit, and I've been less motivated to code than play. ;)

Probably the next big step would be handling the PIDs in messages and always switching to the right window, but I haven't looked at the message stuff at all. Adding a PID parameter to switch, as well as a default "do the default thing" would likely be an easy migration.

Also once a PID is found, there is almost certainly a win32 API to find just its windows and/or switch directly, but I didn't look that up. And my Java is very rusty so likely code unideal in other ways. But this seems to work.

Morph21 commented 2 years ago

That fix doesn't work like it should. When you select option "never change" and you have turned on "whisper helper" after clicking "whipser" in pathofexile.com/trade you will not be redirected to poe instead focus will be still on browser

rpav commented 2 years ago

Yeah .. "Never change" never changes at all. Probably "old behavior" ought to be selected in this case.

Really there needs to be a bit deeper integration from a few places for doing the appropriate switching. Having a character/account name with the PID would be helpful too for the poetrade stuff to pick the exact window.

Probably ideally, if "multi-window" was selected, Mercury would pop up when it detected a new window+pid and ask you which account this was, and that would be all anyone needed to do.

LordBlick commented 9 months ago

I do not understand why „never change” is wrong here if it will be not default option… As as a conscious user I consider any window switching as disturbing for me. Many people has two or more monitors and simple click or Alt-Tab is not a big deal. Even browsing PoE/trade on separate(older?) computer(no matter which platform, even on Linux) works fine and game window is still active and receives internaly outgoing whisper with higlighted item.