Merge lp://qastaging/~3v1n0/bamf/desktop-class-matching-improved into lp://qastaging/bamf/0.4

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 469
Merged at revision: 460
Proposed branch: lp://qastaging/~3v1n0/bamf/desktop-class-matching-improved
Merge into: lp://qastaging/bamf/0.4
Diff against target: 1185 lines (+459/-304)
6 files modified
src/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)
To merge this branch: bzr merge lp://qastaging/~3v1n0/bamf/desktop-class-matching-improved
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Review via email: mp+102741@code.qastaging.launchpad.net

Commit message

BamfLegacyWindow and BamfMatcher changes needed to get the proper WM_CLASS / desktop-class matching in BAMF.

Description of the change

BamfLegacyWindow and BamfMatcher changes needed to get the proper WM_CLASS matching in BAMF.

This mostly allow to get the wanted experience with the Chrome/Chromium web applications
so now:
 - When a Web application is launched and has a matching .desktop file (this means that
   the file should include the StartupWMClass parameter that matches the window's class
   instance name) then it's matched as a new application using that file.
 - When a Web application is launched and has not a matching .desktop file (no file
   matches its class), then we fallback to the know .desktop files (so very likely to the
   parent application desktop).

Changes include:
 - BamfLegacyWindow is now able to fetch both the window class name and instance name also
   for non-gtk3 builds (instead of using libwnck, we fallback to Xlib)
 - BamfXutils now avoid to open a display connection per request.
 - BamfMatcher includes now the utility function
   bamf_matcher_get_application_by_desktop_file that allows to remove a lot of code
   duplication. It correctly matches the chromium web applications and avoids the re-usage
   of non-optimum running .desktop files.

To post a comment you must log in.
467. By Marco Trevisan (Treviño)

BamfMatcher: free the temporary list we use to order the windows by stack

468. By Marco Trevisan (Treviño)

BamfMatcher: be more explicit about the desktop file to use for a new application.

469. By Marco Trevisan (Treviño)

BamfMatcher: oops... Forgot an else when checking the type of new application we should create

Revision history for this message
Jason Smith (jassmith) wrote :

+1 looks okay

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches