purple-discord icon indicating copy to clipboard operation
purple-discord copied to clipboard

chat window activates+focuses any time someone speaks in channels not on buddy list

Open zmike opened this issue 5 years ago • 14 comments

There are a number of scenarios in which this can occur:

  • a server changes the name of one of its channels
  • the user deletes the channel entry in the buddy list
  • the config option to automatically create channels in the buddy list is disabled when joining a new server

In any of these cases, a new chat window will be opened (or activated if the window/tab is already open) any time anyone speaks, emotes, or joins the server. This effectively renders pidgin unusable as the chat window will constantly grab focus.

zmike avatar Nov 13 '19 22:11 zmike

If anything, I think it would be work reconsidering the entire concept of activating a chat window by default. This seems unlikely to be what anyone would ever want out of a chat client, and I imagine there will continue to be more cases of this cropping up until it's eventually changed (e.g., #237 which was the same sort of issue).

zmike avatar Nov 13 '19 22:11 zmike

Irssi user here... I would rather the window open in more cases than not. (especially for mentions, DM, set) Not a programmer so if I am missing the point, please ignore :)

ZedDrebin avatar Nov 13 '19 22:11 ZedDrebin

Opening is fine, but activating (grabbing keyboard focus and switching to that window) seems pretty hostile for default behavior.

zmike avatar Nov 13 '19 22:11 zmike

Just wondering what version of the plugin you're using? We changed it to only 'present' (aka, steal focus) when you manually join a channel, as of a few months ago

EionRobb avatar Nov 13 '19 22:11 EionRobb

What should happen when you are mentioned on a channel of a server you are a member of, but the window/tab is not open at the time?

alexolog avatar Nov 13 '19 22:11 alexolog

I'm using purple-discord-0-25.20190805git250a8a0.fc30.x86_64 package from F30.

I should maybe mention that I use my discord account across multiple devices, so if pidgin is somehow relying on it being the only thing to interact with a given server then that's likely the cause of my issue.

zmike avatar Nov 13 '19 22:11 zmike

The 'open chat on mention' setting was the day before that package was built so should be in there https://github.com/EionRobb/purple-discord/commit/feebb60d8c2e66472a63ec726497fd31dce3fd4d

What values do you have for your "Number of users in a large channel" and "Open Chat when you are mention'd" advanced settings? eg image

EionRobb avatar Nov 14 '19 03:11 EionRobb

I do have those options: I've disabled the "open chat when you are @mentioned" option, and my number of users is set to 20 (the default). What does this user count option do?

zmike avatar Nov 14 '19 03:11 zmike

https://github.com/EionRobb/purple-discord#advanced-options If there's less than the '20' threshold number of people in the room, then it'll 'present' and get focus. If you change that to '0' then it'll treat all rooms as "large" and won't present.

EionRobb avatar Nov 14 '19 05:11 EionRobb

I have the same problem when I add a new server - any message in a channel will open and "present"a window. My large channel threshold is set to 3, and the mention open is checked.

Surprisingly, when I am explicitly mentioned in a channel that is on the buddy list, the window will not automatically open, even though mentioning @everybody or @here will.

alexolog avatar Nov 14 '19 05:11 alexolog

Huh, I missed that.

I think it'd probably be worth having a checkbox (which toggles the disabled state of that entry) for a setting to allow activating/presenting the window. Really feels like I'm going to hit this (a pidgin window ever activating/presenting itself as a result of this plugin is not something I want to experience) again somehow in the future and come back to file another ticket.

zmike avatar Nov 14 '19 05:11 zmike

@alexolog can you check your version? There was also a bug fixed in the past couple of months where new servers wouldn't have any users in them until you disconnected and reconnected, making the plugin think there was always 0 (i.e. below the threshold) number of users and thus needing to present

EionRobb avatar Nov 14 '19 05:11 EionRobb

Version: 0.9.2019.09.27.git.r633+.95167c103b9c+

alexolog avatar Nov 14 '19 06:11 alexolog

Good grief, thanks for mentioning the 0 threshold, the plugin now is usable. Jumping up and grabbing focus...c'mon...

Edit: ... Now group chats don't open at all ...regular DMs work...

Just open/join the chat when someone says something but don't go all presenty/grabby... The Steam plugin doesn't have this problem. This large server small server setting is bananas...

Bracket-H avatar Nov 19 '21 16:11 Bracket-H