unity confused with chrome/chromium web apps
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
BAMF |
Fix Released
|
High
|
Marco Trevisan (Treviño) | ||
Chromium |
Unknown
|
Unknown
|
|||
Unity |
Fix Released
|
Medium
|
Marco Trevisan (Treviño) | ||
Unity Distro Priority |
Fix Committed
|
Undecided
|
Unassigned | ||
libwnck |
Fix Released
|
Medium
|
|||
unity-2d |
Invalid
|
Wishlist
|
Unassigned | ||
bamf (Ubuntu) |
Fix Released
|
Undecided
|
Marco Trevisan (Treviño) | ||
Precise |
Fix Released
|
Undecided
|
Marco Trevisan (Treviño) | ||
Quantal |
Fix Released
|
Undecided
|
Unassigned | ||
chromium-browser (Ubuntu) |
Fix Released
|
Medium
|
Fabien Tassin | ||
Precise |
Fix Released
|
Medium
|
Fabien Tassin | ||
unity (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Unassigned | ||
unity-2d (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Precise |
Invalid
|
Undecided
|
Unassigned |
Bug Description
SRU testcase
1. start chromium-browser
2. create a webapp for twitter.com
3. drag it to launcher while chromium is already running
4. click its icon you will see twitter.com is opened in a new window but is still associated with chromium icon
5. now install Bamf from precise-proposed
6. note that twitter window is associated to the newly dropped icon in the launcher.
On my classic desktop panel, i have 2 webapps launchers in the gnome-panel.
Basically, they are just "chromium-browser --app=http://
Chromium is my default browser.
In the new unity based desktop mode, those webapps now appear nicely.
The problem is that when i start my default web browser, unity highlights on the left one of my webapp launchers, instead of creating one for the browser itself.
And worse.. once the browser is running, i can't start this webapp anymore as unity keeps raising the main browser instead.
For the other webapp, it works as expected.
ii libunity-misc0 0.1.1-0ubuntu3 Miscellaneous functions for Unity - shared library
ii libunity0 0.2.46-0ubuntu5 binding to get places into the launcher - shared library
ii libunity3 3.2.8-0ubuntu1 binding to get places into the launcher - shared library
ii unity 3.2.8-0ubuntu1 Interface for Ubuntu Desktop Edition
ii unity-asset-pool 0.8.18-0ubuntu2 Unity Assets Pool
ii unity-common 3.2.8-0ubuntu1 Common files for the interface for Ubuntu Desktop Edition
ii unity-place-
ii unity-place-files 0.5.32-0ubuntu1 File place for unity
=======
This bug would be an ideal bug for someone to get started hacking on Unity, here's some information:
* Time to fix: unknown but large
* Difficulty: brutal
* Implementation:
This is a complex issue to solve correctly. The most correct implementation associates URI's with windows inside of bamf. Such that bamf's exported tree becomes BamfApplication -> BamfWindow ->BamfUri (currently called BamfTab and incomplete in source).
To achieve this goal there are three primary components. The first is a BamfUriSource. This source is a class used by an application to export its known URI's over dbus to BAMF. The implementation details are not that important, however it is important that it be trackable (so if it crashes we can eliminate references to it) and that it provide two way communication. In short, it needs to tell the bamf daemon about all the uri's it has, and the bamf daemon needs to in turn be able to ask a bamf uri source to "show" a specific uri in its window.
Bamf Daemon will then convert the BamfUriSource into many BamfUri's for exporting over the bus. A bamf uri should look something like and inherit from BamfView:
char * bamf_uri_get_uri (BamfUri *self)
char * bamf_uri_get_icon (BamfUri *self)
char * bamf_uri_get_title (BamfUri *self)
void bamf_uri_show (BamfUri *self)
In short: that part sucks
The second part is making web browsers export tab uri information over dbus using BamfUriSource. This should be somewhat simple if you know the browser plugin API's using a standard NPAPI plugin. The C potion of the plugin can consume bamf and pass data along, while the javascript can communicate with the browser to get relevant information about the state of the system.
The third and final task is to hook this all into unity. This is relatively straightforward to do. By making a launcher shortcut that points to a uri rather than an application, unity can associate an BamfUri with it, watching when it opens and closes. When clicked, unity can call bamf_uri_show () on the proper uri, which will result in the window raising itself and flipping to the appropriate tab. Excellent.
The most clarifying thing I can think to say here is that when you call bamf_uri_show, what should happen is libbamf will call Show on the correct dbus object that was exported by bamfdaemon. Bamfdaemon will then find the associated BamfUriSource for that BamfUri object, can call show back on it, passing along the id of the uri it wishes to have shown. The NPAPI plugin will receive this call, and pass the information up to the javascript layer, which should then raise the window and switch tabs. Like a boss.
* Where to look: lp:bamf and lp:unity are the primary consumers.
-lp:bamf requires the most work. BamfTabSource and BamfTab need to be converted, exported, and consumed in libbamf
-lp:unity would simply consume the newly exported information
* Workflow information: http://
Related branches
- Jason Smith (community): Approve
-
Diff: 488 lines (+198/-40)3 files modifiedsrc/bamf-application.c (+50/-3)
src/bamf-application.h (+6/-0)
src/bamf-matcher.c (+142/-37)
- Jason Smith (community): Approve
-
Diff: 1185 lines (+459/-304)6 files modifiedsrc/bamf-legacy-window.c (+51/-16)
src/bamf-legacy-window.h (+14/-15)
src/bamf-matcher.c (+319/-250)
src/bamf-view.c (+3/-1)
src/bamf-xutils.c (+68/-20)
src/bamf-xutils.h (+4/-2)
- Jason Smith (community): Approve
-
Diff: 111 lines (+28/-16)2 files modifiedsrc/bamf-application.c (+16/-11)
src/bamf-matcher.c (+12/-5)
- Jason Smith (community): Approve
-
Diff: 434 lines (+140/-75)3 files modifiedsrc/bamf-application.c (+29/-19)
src/bamf-matcher.c (+108/-56)
src/bamf-matcher.h (+3/-0)
Changed in unity: | |
status: | New → Confirmed |
Changed in bamf: | |
status: | New → Confirmed |
Changed in bamf (Ubuntu): | |
status: | New → Confirmed |
Changed in unity (Ubuntu): | |
status: | New → Confirmed |
Changed in unity: | |
assignee: | nobody → Treviño (Marco Trevisan) (3v1n0) |
Changed in bamf: | |
assignee: | nobody → Treviño (Marco Trevisan) (3v1n0) |
Changed in unity: | |
status: | Confirmed → Invalid |
Changed in unity (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in bamf (Ubuntu): | |
status: | Invalid → In Progress |
Changed in bamf (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in bamf: | |
status: | Fix Committed → Fix Released |
Changed in chromium-browser (Ubuntu): | |
status: | New → Fix Committed |
assignee: | nobody → Fabien Tassin (fta) |
importance: | Undecided → Medium |
Changed in chromium-browser (Ubuntu): | |
status: | Fix Released → Fix Committed |
Changed in unity-2d: | |
status: | New → Fix Released |
Changed in bamf (Ubuntu): | |
status: | Fix Committed → Confirmed |
Changed in unity: | |
assignee: | Treviño (Marco Trevisan) (3v1n0) → Unity Community Hackers (unity-community-hackers) |
status: | Invalid → Confirmed |
Changed in bamf (Ubuntu): | |
assignee: | nobody → Unity Community Hackers (unity-community-hackers) |
description: | updated |
Changed in unity (Ubuntu): | |
status: | Invalid → Confirmed |
Changed in unity-2d: | |
importance: | Undecided → Wishlist |
status: | Fix Released → Confirmed |
Changed in unity-2d: | |
status: | Confirmed → Fix Released |
Changed in libwnck: | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in unity-2d: | |
status: | Fix Released → Confirmed |
Changed in unity: | |
milestone: | 4.2.0 → 4.4.0 |
Changed in unity: | |
milestone: | 4.4.0 → 4.6.0 |
Changed in unity-2d: | |
status: | Confirmed → Fix Released |
Changed in unity: | |
milestone: | 4.6.0 → 4.8.0 |
Changed in libwnck: | |
status: | New → Fix Released |
Changed in unity: | |
milestone: | 4.8.0 → 4.12.0 |
Changed in unity: | |
milestone: | 4.12.0 → 4.14.0 |
Changed in unity: | |
assignee: | Unity Community Hackers (unity-community-hackers) → Jason Smith (jassmith) |
Changed in unity: | |
milestone: | 4.14.0 → 4.16.0 |
Changed in unity: | |
milestone: | 4.16.0 → 4.18.0 |
Changed in unity: | |
status: | Confirmed → Fix Committed |
Changed in unity: | |
status: | Fix Committed → Fix Released |
Changed in unity (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in unity: | |
status: | Fix Released → New |
Changed in unity (Ubuntu): | |
status: | Fix Released → New |
Changed in unity: | |
status: | New → Confirmed |
Changed in unity: | |
status: | Fix Committed → Fix Released |
Changed in unity (Ubuntu): | |
status: | Fix Committed → Fix Released |
Changed in bamf (Ubuntu): | |
status: | Fix Released → Triaged |
Changed in unity (Ubuntu): | |
status: | Fix Released → Confirmed |
Changed in bamf (Ubuntu): | |
status: | Fix Released → Confirmed |
Changed in bamf: | |
importance: | Undecided → Medium |
status: | Fix Released → Confirmed |
Changed in unity: | |
importance: | Medium → High |
milestone: | 4.26.0 → 4.28.0 |
Changed in unity: | |
milestone: | 4.28.0 → 4.30.0 |
Changed in unity: | |
milestone: | 4.30.0 → 5.4.0 |
assignee: | Jason Smith (jassmith) → Marco Trevisan (Treviño) (3v1n0) |
Changed in bamf: | |
importance: | Medium → High |
status: | Confirmed → Triaged |
Changed in unity: | |
importance: | High → Medium |
status: | Confirmed → Triaged |
Changed in unity: | |
milestone: | 5.4.0 → 5.6.0 |
tags: | added: distro-priority |
Changed in unity-2d: | |
status: | Fix Released → Invalid |
Changed in unity-2d (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in unity: | |
milestone: | 5.6.0 → 5.8.0 |
summary: |
- unity confused with chromium web apps + unity confused with chrome/chromium web apps |
tags: | added: rls-p-tracking |
Changed in unity: | |
milestone: | 5.8.0 → 5.10.0 |
tags: | added: hitlist |
tags: | removed: rls-p-tracking |
Changed in unity: | |
milestone: | 5.10.0 → 5.12.0 |
Changed in unity: | |
status: | Triaged → In Progress |
Changed in bamf: | |
status: | Triaged → In Progress |
Changed in bamf: | |
milestone: | none → 0.2.116 |
Changed in unity (Ubuntu): | |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
status: | Confirmed → In Progress |
Changed in bamf (Ubuntu): | |
assignee: | Unity Community Hackers (unity-community-hackers) → Marco Trevisan (Treviño) (3v1n0) |
status: | Confirmed → In Progress |
Changed in bamf: | |
status: | In Progress → Fix Committed |
Changed in bamf (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in unity: | |
status: | In Progress → Fix Committed |
Changed in unity (Ubuntu): | |
status: | In Progress → Fix Committed |
description: | updated |
no longer affects: | unity (Ubuntu) |
Changed in bamf (Ubuntu): | |
status: | Fix Committed → Confirmed |
Changed in bamf: | |
status: | Fix Committed → Fix Released |
Changed in unity: | |
status: | Fix Committed → Fix Released |
Changed in bamf: | |
status: | Fix Released → Fix Committed |
Changed in bamf (Ubuntu): | |
status: | Confirmed → Fix Committed |
Changed in bamf (Ubuntu Precise): | |
status: | Confirmed → Fix Committed |
Changed in bamf: | |
status: | Fix Committed → Fix Released |
Changed in bamf (Ubuntu Quantal): | |
status: | Confirmed → Fix Released |
This also affects Docky. The proper place to fix this is Chromium. Here is the related Chromium issue: code.google. com/p/chromium/ issues/ detail? id=42587
http://