middle click on dock task bar icon open app twice

Bug #1386200 reported by Gao Shichao on 2014-10-27
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Cairo-Dock Core
Undecided
Unassigned

Bug Description

$ cairo-dock -v
3.4.0
on archlinux in gnome-shell.
When I middle click on gnome-terminal (for example, other apps are same), two new window of gnome-terminal is launched instead of one ( the correct behavior).

I think it is a regression from previous version. The debug output (cairo-dock -l debug) is attached, I middle clicked gnome-terminal launcher in the end of the debug logging.

Gao Shichao (xgdgsc) wrote :

Same behavior over here on Debian Jessie, cairo-dock version 3.4.0

middle click opens two windows instead of one, another weird thing is they will open with two different sized windows too

Matthieu Baerts (matttbe) wrote :

Hello and sorry for the huge delay!

Do you still have this bug? It seems the dock received 2 signals (= 2 clicks). I'm not able to reproduce this bug on Ubuntu but I had this bug on ArchLinux.

Is it maybe possible to check if you have this bug with other apps which are also using GTK3?
Or by compiling this C code attached to this message?
You can easily test it by using this command:

   $ gcc `pkg-config --cflags gtk+-3.0` -o gtk_click gtk_click.c `pkg-config --libs gtk+-3.0` && ./gtk_click

Thanks!

I am a kde user but I really like something like cairo-dock. The
middle-click issue on every icon, something I got after installing
version 3.4, is a real pain. I tried looking in the source, but without
any documentation of specifically the class structure I made very little
headway. Since nobody else seemed interested in even looking at it, I
de-installed cairo-dock.
At the moment I use the kde dock with only icons. Not nearly as fancy as
cairo-dock but useable.
Since de-installing I noticed something else: no hung kde session any
more. I had that with some regularity. A completely dead session except
cairo-dock. It seems, that sometimes cairo-dock receives messages and
forgets to pass them on to other listeners. In windows terms, blocking
the message loop. (I am a windows programmer)
I tried your gtk-click. When I double-click I get the message box. But
not when I single-click, middle-click or right-click.

Greetz, Bob

Op 06-08-15 om 12:59 schreef Matthieu Baerts:
> Hello and sorry for the huge delay!
>
> Do you still have this bug? It seems the dock received 2 signals (= 2
> clicks). I'm not able to reproduce this bug on Ubuntu but I had this bug
> on ArchLinux.
>
> Is it maybe possible to check if you have this bug with other apps which are also using GTK3?
> Or by compiling this C code attached to this message?
> You can easily test it by using this command:
>
> $ gcc `pkg-config --cflags gtk+-3.0` -o gtk_click gtk_click.c `pkg-
> config --libs gtk+-3.0` && ./gtk_click
>
> Thanks!
>
> ** Attachment added: "gtk_click.c"
> https://bugs.launchpad.net/cairo-dock-core/+bug/1386200/+attachment/4440403/+files/gtk_click.c
>

Matthieu Baerts (matttbe) wrote :

> I tried looking in the source, but without any documentation of specifically the class structure I made very little headway.

Feel free to have a look to the wiki or http://doc.glx-dock.org ;-)

> Since nobody else seemed interested in even looking at it

It seems not all users have these bugs. This part of the code has not been modified recently and the middle click is managed just like the right and left clicks. I don't know why you have this bug only with the middle click. I'm suspecting a bug with GTK... And the middle click is not really used in many other applications.
Are you also using ArchLinux?

> It seems, that sometimes cairo-dock receives messages and forgets to pass them on to other listeners.

Seems strange. The dock should not block other listeners. You could maybe have conflicts with other taskbar but not sure that you will see them. Do you have concrete examples of these bugs?

> I tried your gtk-click. When I double-click I get the message box. But not when I single-click, middle-click or right-click.

Can you launch it from the terminal? After a right/left/middle/... click, you should see 4 lines like that:

    Hello World
    Click: button 2, type 4, state 16, time 12871105, event 0, x 22,429199, y 15,421783
    Hello World
    Click: button 2, type 7, state 528, time 12871205, event 0, x 22,429199, y 15,421783

The dock is using the same signals as this gtk-click program. Button 2 = middle click ; type 4 = pressed ; type 7 = released.

bobbinyolk (regs-i) wrote :

output of gtk-click:
Hello World
Click: button 1, type 4, state 16, time 10844528, event 0, x 37,395569,
y 8,311096
Hello World
Click: button 1, type 7, state 272, time 10844671, event 0, x 37,395569,
y 8,311096
Hello World
Click: button 1, type 4, state 16, time 10853624, event 0, x 35,395569,
y 14,311096
Hello World
Click: button 1, type 7, state 272, time 10853799, event 0, x 35,395569,
y 14,311096
Hello World
Click: button 2, type 4, state 16, time 10874416, event 0, x 29,646301,
y 13,653229
Hello World
Click: button 2, type 7, state 528, time 10874576, event 0, x 29,646301,
y 13,653229
Hello World
Click: button 3, type 4, state 16, time 10883880, event 0, x 23,646301,
y 16,653229
Hello World
Click: button 3, type 7, state 1040, time 10884632, event 0, x
23,646301, y 16,653229

About the dead gui, I cannot reproduce it. When I run cairo-dock it just
sometimes happens. No specific action or sequence of actions springs to
mind. That doesn't mean there isn't such a thing, but you have to have
some inkling to start finding it.

I'm using openSUSE and no ArchLinux. I'll compile cairo-dock from source
again, remove all the current configuration and try and see first of all
if the middle-click issue still exists. But that may happen sometime
next week at the soonest.

I've been looking at the existing documentation, but I sorely miss a
picture of how all classes hang together. When I design software that is
the first thing I make. If only to verify the correctness of the
entities and also later to know where to program what functionality.

Op 06-08-15 om 21:42 schreef Matthieu Baerts:
>> I tried looking in the source, but without any documentation of
> specifically the class structure I made very little headway.
>
> Feel free to have a look to the wiki or http://doc.glx-dock.org ;-)
>
>> Since nobody else seemed interested in even looking at it
> It seems not all users have these bugs. This part of the code has not been modified recently and the middle click is managed just like the right and left clicks. I don't know why you have this bug only with the middle click. I'm suspecting a bug with GTK... And the middle click is not really used in many other applications.
> Are you also using ArchLinux?
>
>> It seems, that sometimes cairo-dock receives messages and forgets to
> pass them on to other listeners.
>
> Seems strange. The dock should not block other listeners. You could
> maybe have conflicts with other taskbar but not sure that you will see
> them. Do you have concrete examples of these bugs?
>
>> I tried your gtk-click. When I double-click I get the message box. But
> not when I single-click, middle-click or right-click.
>
> Can you launch it from the terminal? After a right/left/middle/...
> click, you should see 4 lines like that:
>
> Hello World
> Click: button 2, type 4, state 16, time 12871105, event 0, x 22,429199, y 15,421783
> Hello World
> Click: button 2, type 7, state 528, time 12871205, event 0, x 22,429199, y 15,421783
>
> The dock is using the same signals as this gtk-click program. Button 2 =
> middle click ; type 4 = pressed ; type 7 = released.
>

Matthieu Baerts (matttbe) wrote :

The output of gtk-click indicates that there is no double-click.

If you still have this bug, it's hard for us to debug because the code is almost the same for the right and left click. Maybe it can be interesting to report this bug to GTK devs...

> I've been looking at the existing documentation, but I sorely miss a picture of how all classes hang together.

Maybe there are some tools to draw UML graph, maybe Eclipse can do that?

bobbinyolk (regs-i) wrote :

Sorry I'm so late but it's been a busy time for me.
I've built the latest version from source but the bug is still there.
Something must have changed since the previous version that processed
right-clicks fine.
As far as documentation is concerned, the main developer(s) should draw
a class relation schema. For me, knowing nothing, this is utterly
impossible.

Op 06-08-15 om 23:50 schreef Matthieu Baerts:
> The output of gtk-click indicates that there is no double-click.
>
> If you still have this bug, it's hard for us to debug because the code
> is almost the same for the right and left click. Maybe it can be
> interesting to report this bug to GTK devs...
>
>> I've been looking at the existing documentation, but I sorely miss a
> picture of how all classes hang together.
>
> Maybe there are some tools to draw UML graph, maybe Eclipse can do that?
>

Matthieu Baerts (matttbe) wrote :

> Something must have changed since the previous version that processed
> right-clicks fine.

This part of the code on Cairo-Dock has not changed :-/
This is why I think this bug is related to other changes on GTK code. Or maybe linked to Archlinux because I think we are only able to reproduce it on ArchLinux.

> As far as documentation is concerned, the main developer(s) should draw
> a class relation schema. For me, knowing nothing, this is utterly
> impossible.

Sorry, due to the lack of time, only this doc is available: http://doc.glx-dock.org/

bobbinyolk (regs-i) wrote :

Op 11-10-15 om 11:20 schreef Matthieu Baerts:
> This part of the code on Cairo-Dock has not changed :-/ This is why I
> think this bug is related to other changes on GTK code. Or maybe
> linked to Archlinux because I think we are only able to reproduce it
> on ArchLinux.
Ahem. I'm on openSUSE 13.2 .......

No Name (smilegg1085) wrote :

I'm affected by the same behaviour on Ubuntu Mate 15.10 (x64), MATE 1.10.2, Cairo-dock 3.4.1

no longer affects: ubuntu
lordcris (lordcris) wrote :

I have the same issue. Gnome 3.18.2 on Gentoo Linux
Cairo Dock 3.4.0

Jay Schmidek (shim) wrote :

I have this issue on archlinux in gnome-shell as well. I submitted a pull request that fixes this: https://github.com/Cairo-Dock/cairo-dock-core/pull/4

Samarth Mathur (samarth-math) wrote :

I have this issue in mint18..!

ok this is quite strange because I can't reproduce it and the code seems
correct :-/
so I've applied the patch proposed by Jay Schmidek, plus 2 other minor bug
fixes I found during my tests ;-)
feel free to pull from git and verify, thanks everybody :-)

2016-09-18 2:54 GMT+02:00 Samarth Mathur <email address hidden>:

> I have this issue in mint18..!
>
> --
> You received this bug notification because you are a member of Cairo-
> Dock Devs, which is subscribed to Cairo-Dock Core.
> https://bugs.launchpad.net/bugs/1386200
>
> Title:
> middle click on dock task bar icon open app twice
>
> Status in Cairo-Dock Core:
> New
>
> Bug description:
> $ cairo-dock -v
> 3.4.0
> on archlinux in gnome-shell.
> When I middle click on gnome-terminal (for example, other apps are
> same), two new window of gnome-terminal is launched instead of one ( the
> correct behavior).
>
> I think it is a regression from previous version. The debug output
> (cairo-dock -l debug) is attached, I middle clicked gnome-terminal
> launcher in the end of the debug logging.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/cairo-dock-core/+bug/1386200/+subscriptions
>
> _______________________________________________
> Mailing list: https://launchpad.net/~cairo-dock-team
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~cairo-dock-team
> More help : https://help.launchpad.net/ListHelp
>

Diego Solo (diegosolo) wrote :

Hi! The pull requests are in place, but no one has merged it yet (https://github.com/Cairo-Dock/cairo-dock-core/pulls), almost a year later. Has the project been abandoned?

Wapsi (miikka-veijonen) wrote :

For me the patch fixes the problem only partially: When I open the second window by middle clicking it opens one new windows as it should. But now if I open third (or fourth...) window by middle clicking it opens two windows every time again.

Are you able to reproduce this?

No Name (smilegg1085) wrote :

4 years later... bug status: new. Really?)

Ubuntu-mate 18.04
Same behaviour.

Changed in cairo-dock-core:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers