Weird behaviors with "message counter" and "reset message counter" with Coccinella.

Bug #454535 reported by buzzdee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Coccinella
In Progress
Low
buzzdee

Bug Description

Problem was reported here: http://coccinella.im/node/363

will try to reproduce

Revision history for this message
buzzdee (sebastia) wrote :

Was able to reproduce this problem with disabled tabbed interface:

b/ If I use Coccinella (but in the background), I can see in the Dock that new messages came. I can also see the counter number incremented on each related chat/chatroom window. However, when I go to each of these windows, the counter does not reset and the number in parenthesis remains.

Revision history for this message
buzzdee (sebastia) wrote :

was able to reproduce this problem with enabled tabbed interface:

1- If there are several tabs (chatrooms or chats) and you have one of the tab selected (any of them), if Coccinella is in the background, and if that particular chatroom (or chat) receives a message... then the counter number is not properly incremented for this particular chatroom/chat. Indeed, instead of having a number appearing in the tab next to the name of the chatroom/contact, a number appears on the top of the window. Furthermore, that number will not start with usual (1), (2), (3) ... but will start with higher number (probably referring to the number of messages typed since the window was opened).

buzzdee (sebastia)
Changed in coccinella:
status: New → Confirmed
Revision history for this message
buzzdee (sebastia) wrote :

both problems should be fixed with svn revision #2746.

However the patch to fix the problem was:
$ svn diff jabber/Chat.tcl
Index: jabber/Chat.tcl
===================================================================
--- jabber/Chat.tcl (revision 2743)
+++ jabber/Chat.tcl (working copy)
@@ -1402,8 +1402,7 @@
     bind $w <<Find>> [namespace code [list Find $dlgtoken]]
     bind $w <<FindAgain>> [namespace code [list FindAgain $dlgtoken]]
     bind $w <<FindPrevious>> [namespace code [list FindAgain $dlgtoken -1]]
- # Wrong binding to toplevel.
- #bind $w <FocusIn> +[namespace code [list FocusIn $dlgtoken]]
+ bind $w <FocusIn> [namespace code [list FocusIn $dlgtoken]]
     bind $wtray <<TToolbarCollapse>> [namespace code [list TTCollapse $dlgtoken]]

     # For toplevel binds.

and I have no idea, why the binding to the topleves was wrong?????
Also I have no idea what the + in front of the [namespace code [list FocusIn $dlgtoken]] is good for.
both were working for me, with and without the +, so I omitted it.

Changed in coccinella:
status: Confirmed → In Progress
Revision history for this message
sander (s-devrieze) wrote :

==Tabs disabled==
1) First incoming message without opened chat dialogs-->dialog opened in background, message counter+1
2) clicking on Dock icon-->chat dialog in front with main Coccinella window behind it, *no* focus on the text input field, *no* reset of message counter in Dock (only in window title!).
3) clicking on main window when chat dialog is in front-->Dock message counter is reset (note: if the chat dialog is closed first, the Dock counter is not reset)
4) Second incoming message-->chat dialog raised to top, without focus (bad: it should stay in the background)

==Tabs enabled==
1) First incoming message without opened chat dialogs-->same behaviour as without tabs
2) clicking on Dock icon-->chat dialog in front with main Coccinella window behind it, *no* focus on the tab which has the oldest new messages text, *no* focus on the input field, *no* reset of message counter in Dock, message counter in the window title is reset for *all* contacts that had send you new messages.
3) clicking on main window when chat dialog is in front-->Dock message counter is reset (note: if the chat dialog is closed, the counter is also reset, so this is better behaviour as without tabs)
4) Second incoming message-->same behaviour as without tabs

Revision history for this message
buzzdee (sebastia) wrote :
Download full text (4.1 KiB)

Here how it looks like for me with windowmaker:

==Tabs disabled==
1) First incoming message without opened chat dialogs-->dialog opened in background, message counter+1
windowmaker: dialog opened in front and with focus to the input field, because it has focus, there is no mesage counter in the title bar (actually that is fine for me)

2) clicking on Dock icon-->chat dialog in front with main Coccinella window behind it, *no* focus on the text input field, *no* reset of message counter in Dock (only in window title!).
clicking on a minimized chat window icon in the dock brings up the window, with focus always to the input field, no matter whether it was at the subject or somewhere else, the message counter in the title bar is resetted. I see how many new message are there, because the old messages are lighter gey instead of black. (actually that is also fine for me)

3) clicking on main window when chat dialog is in front-->Dock message counter is reset (note: if the chat dialog is closed first, the Dock counter is not reset)
clicking on the main window when the chat dialog is in front of it (but without focus because a different app had focus), just brings the main window to front for me, the message counter stays in the title line. Only when I click the message window to get the focus to it, then the message counter in the title bar is resetted. (that is again find for me)

4) Second incoming message-->chat dialog raised to top, without focus (bad: it should stay in the background)
I have the same here, I found the following code to be the culprit:
        # 12th June 2009 - Mirko Graziani, <email address hidden>
        # https://bugs.launchpad.net/coccinella/+bug/297580
        # Bring the window over the others, but since
        # the "wm focusmodel" is set to 'passive',
        # the user is not interrupted in his work.
        wm focusmodel $dlgstate(w) passive
        wm attributes $dlgstate(w) -topmost 1
        wm attributes $dlgstate(w) -topmost 0

What I have seen on KDE (which I find is acutally very annoying:)
Whenever I receive a message, the window shows up and immediately goes back into the background, so I have a flicker for a fraction of a second (which could cause epileptic seizures, as written in bug #297580 ;)
Because the request of raising/lowering the window was only for windows, would it be feasible to only use that piece of code on windows OS? Or would it be feasible to add sth. to the preferences interface, where the user can choose whether he wants to have those flashing or not, regardless of the OS? But then, what to make the default value of that preference?
When I comment out the line:
wm attributes $dlgstate(w) -topmost 1
Then the window stays in background when the second message is received, which would be the best for me...
However, I still wonder why it goes to background with topmost 0 on KDE but stays on top with Windowmaker....

==Tabs enabled==
1) First incoming message without opened chat dialogs-->same behaviour as without tabs
same as described above, so fine for me
2) clicking on Dock icon-->chat dialog in front with main Coccinella window behind it, *no* focus on the tab which has the oldest new...

Read more...

buzzdee (sebastia)
Changed in coccinella:
milestone: 0.96.16 → 0.96.18
buzzdee (sebastia)
Changed in coccinella:
assignee: buzzdee (buzzdee) → buzzdee (sebastia)
Revision history for this message
sander (s-devrieze) wrote : Re: [Bug 454535] Re: Weird behaviors with "message counter" and "reset message counter" with Coccinella.

2009/10/25 buzzdee <email address hidden>:
> Here how it looks like for me with windowmaker:

I just tested with Gnome/Compiz:

> ==Tabs disabled==
> 1) First incoming message without opened chat dialogs-->dialog opened in background, message counter+1
> windowmaker: dialog opened in front and with focus to the input field, because it has focus, there is no mesage counter in the title bar (actually that is fine for me)

Gnome/Compiz == windowmaker. I don't think this behaviour is ok;
imagine an employee blindly writing a document with business secrets
in it...if this user receives a message, she may accidentally send
confidential information to this contact. A solution for this problem
is necessary.

2 & 3) not relevant here; there is no Dock in Gnome; this only exists
in Mac OS X.

> 4) Second incoming message-->chat dialog raised to top, without focus (bad: it should stay in the background)
> I have the same here, I found the following code to be the culprit:
>        # 12th June 2009 - Mirko Graziani, <email address hidden>
>        # https://bugs.launchpad.net/coccinella/+bug/297580
>        # Bring the window over the others, but since
>        # the "wm focusmodel" is set to 'passive',
>        # the user is not interrupted in his work.
>        wm focusmodel $dlgstate(w) passive
>        wm attributes $dlgstate(w) -topmost 1
>        wm attributes $dlgstate(w) -topmost 0
>
> What I have seen on KDE (which I find is acutally very annoying:)
> Whenever I receive a message, the window shows up and immediately goes back into the background, so I have a flicker for a fraction of a second (which could cause epileptic seizures, as written in bug #297580 ;)
> Because the request of raising/lowering the window was only for windows, would it be feasible to only use that piece of code on windows OS? Or would it be feasible to add sth. to the preferences interface, where the user can choose whether he wants to have those flashing or not, regardless of the OS? But then, what to make the default value of that preference?

No option in the preferences interface for this. Maybe it's good to
have this only on Windows.

> When I comment out the line:
> wm attributes $dlgstate(w) -topmost 1
> Then the window stays in background when the second message is received, which would be the best for me...
> However, I still wonder why it goes to background with topmost 0 on KDE but stays on top with Windowmaker....

With Gnome/Compiz I have the same behavior as you have with
Windowmaker. With Gnome/Metacity (no visual effects) I have the same
flickering as you have with KDE.

> ==Tabs enabled==
> 1) First incoming message without opened chat dialogs-->same behaviour as without tabs
> same as described above, so fine for me

Same behaviour too, and I don't like it that much for the reason
described above.

2 & 3) not relevant here; there is no Dock in Gnome; this only exists
in Mac OS X.

> 4) Second incoming message-->same behaviour as without tabs
> same here

idem

buzzdee (sebastia)
Changed in coccinella:
milestone: 0.96.18 → 0.96.20
buzzdee (sebastia)
Changed in coccinella:
milestone: 0.96.20 → 0.96.22
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.