ctrlAltTab: Use a symbolic icon for desktop windows
The nautilus icon sticks out pretty badly among the symbolic icons we use for other desktop components. This commit finds windows of type DESKTOP, and uses the video-display-symbolic icon for them. https://bugzilla.gnome.org/show_bug.cgi?id=697914
This commit is contained in:
parent
e96d9e0ea1
commit
33cad9a824
@ -96,12 +96,18 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
let windowTracker = Shell.WindowTracker.get_default();
|
let windowTracker = Shell.WindowTracker.get_default();
|
||||||
let textureCache = St.TextureCache.get_default();
|
let textureCache = St.TextureCache.get_default();
|
||||||
for (let i = 0; i < windows.length; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
let icon;
|
let icon = null;
|
||||||
let app = windowTracker.get_window_app(windows[i]);
|
let iconName = null;
|
||||||
if (app)
|
if (windows[i].get_window_type () == Meta.WindowType.DESKTOP) {
|
||||||
icon = app.create_icon_texture(POPUP_APPICON_SIZE);
|
iconName = 'video-display-symbolic';
|
||||||
else
|
} else {
|
||||||
icon = textureCache.bind_pixbuf_property(windows[i], 'icon');
|
let app = windowTracker.get_window_app(windows[i]);
|
||||||
|
if (app)
|
||||||
|
icon = app.create_icon_texture(POPUP_APPICON_SIZE);
|
||||||
|
else
|
||||||
|
icon = textureCache.bind_pixbuf_property(windows[i], 'icon');
|
||||||
|
}
|
||||||
|
|
||||||
items.push({ name: windows[i].title,
|
items.push({ name: windows[i].title,
|
||||||
proxy: windows[i].get_compositor_private(),
|
proxy: windows[i].get_compositor_private(),
|
||||||
focusCallback: Lang.bind(windows[i],
|
focusCallback: Lang.bind(windows[i],
|
||||||
@ -109,6 +115,7 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
Main.activateWindow(this, timestamp);
|
Main.activateWindow(this, timestamp);
|
||||||
}),
|
}),
|
||||||
iconActor: icon,
|
iconActor: icon,
|
||||||
|
iconName: iconName,
|
||||||
sortGroup: SortGroup.MIDDLE });
|
sortGroup: SortGroup.MIDDLE });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user