dash: simplify app retrieval from AppWellIcon
This has also the benefit of getting the application even if it can not be retrieved through AppSystem, which can happen if the runtime WMClass does not match the one of the desktop file. This especially looked wrong with the following commits related to the bug. https://bugzilla.gnome.org/show_bug.cgi?id=657315
This commit is contained in:
parent
df0151d338
commit
95abdeb919
@ -23,8 +23,7 @@ const DASH_ITEM_HOVER_TIMEOUT = 300;
|
|||||||
|
|
||||||
function getAppFromSource(source) {
|
function getAppFromSource(source) {
|
||||||
if (source instanceof AppDisplay.AppWellIcon) {
|
if (source instanceof AppDisplay.AppWellIcon) {
|
||||||
let appSystem = Shell.AppSystem.get_default();
|
return source.app;
|
||||||
return appSystem.lookup_app(source.getId());
|
|
||||||
} else if (source.metaWindow) {
|
} else if (source.metaWindow) {
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
return tracker.get_window_app(source.metaWindow);
|
return tracker.get_window_app(source.metaWindow);
|
||||||
|
Loading…
Reference in New Issue
Block a user