Reappearing windows
If I have multiple tabs in Pidgin opened when using this plugin. If every window in tab has had some communication. When closing the main window it reappears every time with one less tab than before.
If I would give example:
If the main window has 4 tabs opened, I have to click 4 times to close the main window (each time the main window disappears and reappears with one less tab attached to it).
Hmm... that sounds odd! I wonder if it's sending a "mark as read" notification, that triggers the window to reopen with a "looks like there's something about to come through, better open a new window!" kind of event?
Would it be possible to try do it again, but have the debug window open first (from the Buddy List, Help->Debug Window), then copy-paste from the debug log here? (make sure to check that there's no personal info in there first)
@EionRobb yes it is peculiar. Here is a debug log. I have had two windows and had to close it twice.
That log does maybe look like what I was thinking:
- The group chat window is closed
- The plugin gets a signal from Pidgin that the last message in the window is no longer unread
- The plugin tells the server that the group chat has been read
- The server broadcasts to all Chat clients (including the Pidgin that just sent it in step 3) that the messages are read
- The plugin sees an incoming event for the group chat and opens a window to prepare for its contents
- The plugin processes the "message is read" event, resulting in no message content on screen
So at the moment a window is opened for any event coming in, even if we don't process it or if there's no content to the message (eg if it's for a message type we don't yet process like a calendar invite or something)
I guess to resolve we should check if the event(s) are going to be rendered and if not, don't open the window.