Closed clercm closed 11 years ago
Ok, given the other issue, there must be something wrong about all this. Please answer the questions I asked in the other issue, and let me know if you have experienced anything like this or the other issue with any other applications.
Please check this: http://askubuntu.com/questions/36434/how-can-i-remove-duplicate-icons-for-launched-java-programs-in-the-launcher, and let me know if that helps.
In few words, you open IntelliJ, then run the first suggested in the top answer command, it will change the cursor, and you click on IntelliJ. This will give you its wmclass, and you add corresponding line to .desktop file (in /usr/share/applications or ~/.local/share/applications depending on whether it is installed globally or locally for one user).
Here is another link: http://wiki.go-docky.com/index.php?title=How_to_Customize_Window_Matching. Meanwhile I will try to see how cairo-dock resolves the issue.
I tried the first link but Idea didn't get any meaning full wmclass, so I followed the second link and with the agent I added a custom wmclass, restarted the system (still duplicated icons), changed the .desktop file, restarted the system and I still get duplicated icons.
Something, to note tho. The wmclass returned by xprop is: WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "Intellij_IDEA"
I did a diff between the output of xprop for each idea window open. Outside of the window title and the position / size on screen I get this (which do not seem related):
< _NET_WM_ICON_GEOMETRY(CARDINAL) = 1059, 888, 24, 134
< _MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x25, 0x0, 0x60, 0x1, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
---
> _NET_WM_ICON_GEOMETRY(CARDINAL) = 1088, 888, 24, 134
> _MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x60, 0x3, 0x60, 0x1, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
I am this close to install a fresh copy of Fedora 19 (for testing purposes) and will install there Cairo-Dock and IntelliJ Idea to test.
Couple more questions: 1) Did you try both sun-awt-X11-XFramePeer and Intellij_IDEA as StartupWMClass as described by the first link? 2) Do you see multiple icons in GS dash as well (on the left when you press Win key)?
1) It does not affect your extension, but then cairo merges all java applications into one group 2) Yes, the dash show several icons as well
Yes, the answer is quite predictable, because what I do at this moment is use of whatever GS detects as windows's app. So, if you see two separate icons in my extension, you should probably see two different apps in GS dash. I am curious if I could somehow get more info such as wmclass etc. using GS JS.
Hi, I dig into this and unfortunately had to conclude that this is not the extension's fault.
GS creates a separate App object for each Java-based application running. This is basically why you get several icons in Dash and in my panel.
I could definitely group them somehow into one, but there are several problems:
1) I would have to create some app-specific rules for that, which is not the best practice.
2) One icon representing one app behaves in a predictable manner: for example, when you right-click it, it opens app-specific menu (whether Gnome3-menu if one exists or a standard menu), when you quit app it sends this app a corresponding command, etc. With several apps grouped into one icon this will become ambiguous, and may lead to some other bugs.
Since, the issue is indeed GS-related and you have multiple icons in Dash as well, I would suggest you to report this to the Gnome team instead. Once they resolve it, it will be automatically resolved for my extension as well.
Another issue here is that you cannot even create Dash icon to start such app, or if you create then running it will create another one immediately.
Since I write in Gjs and all I have is the GS's API to access windows and apps, there is not much I can do about this, except artificially grouping the icons, which is not the best solution as I described above.
I will definitely look into this more, but for now I have to close this.
Thanks for looking into it, I will report to GS team.
It is now fixed upstream. It works perfectly with the latest GS when setting WM_CLASS.
Hi, thanks a lot for reporting that. Just wondering, what version of GS are you using that fixed Java issues?
It's in gnome shell master and should make it into 3.10 It didn't really fix java issue, they added support for WM_CLASS and a few others .desktop files fixes.
That should be enough, as long as Gnome-Shell recognizes different StartupWMClass'es provided by .desktop files and assigns different app objects. By the way, if you are using GS 3.9+, you are more than welcome to post any problems/bugs you encounter. I am going to make it compatible in the next few weeks or so.
Using the free version of Idea.
Starting multiple times Idea will result in multiple icons in the top bar, they will not group correctly into one icon with multiple thumbnails.
I have installed cairo-dock to see if it was an idea problem, but the grouping is correct in the dock.
Idea can be downloaded from: http://www.jetbrains.com/idea/