File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,4 +23,5 @@ public interface Dock.DesktopIntegration : GLib.Object {
2323
2424 public abstract RunningApplication [] get_running_applications () throws GLib .DBusError , GLib .IOError ;
2525 public abstract Window [] get_windows () throws GLib .DBusError , GLib .IOError ;
26+ public abstract void show_windows_for (string app_id ) throws GLib .DBusError , GLib .IOError ;
2627}
Original file line number Diff line number Diff line change @@ -239,8 +239,10 @@ public class Dock.Launcher : Gtk.Button {
239239
240240 if (action != null ) {
241241 app_info. launch_action (action, context);
242- } else {
242+ } else if (windows . length () <= 1 ) {
243243 app_info. launch (null , context);
244+ } else if (LauncherManager . get_default (). desktop_integration != null ) {
245+ LauncherManager . get_default (). desktop_integration. show_windows_for (app_info. get_id ());
244246 }
245247 } catch (Error e) {
246248 critical (e. message);
Original file line number Diff line number Diff line change 1212 }
1313
1414 public Launcher ? added_launcher { get ; set ; default = null ; }
15+ public Dock . DesktopIntegration ? desktop_integration { get ; private set ; }
1516
1617 private List<Launcher > launchers; // Only used to keep track of launcher indices
17- private Dock . DesktopIntegration desktop_integration;
1818 private GLib . HashTable<unowned string, Dock . Launcher > app_to_launcher;
1919
2020 static construct {
You can’t perform that action at this time.
0 commit comments