Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/Plugin.vala
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
namespace Gala {
public enum PluginFunction {
ADDITION,
WINDOW_SWITCHER,
WINDOW_OVERVIEW
WINDOW_SWITCHER
}

public enum LoadPriority {
Expand Down
4 changes: 0 additions & 4 deletions src/DesktopIntegration.vala
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,6 @@ public class Gala.DesktopIntegration : GLib.Object {
}

public void show_windows_for (string app_id) throws IOError, DBusError {
if (wm.window_overview == null) {
throw new IOError.FAILED ("Window overview not provided by window manager");
}

App app;
if ((app = AppSystem.get_default ().lookup_app (app_id)) == null) {
throw new IOError.NOT_FOUND ("App not found");
Expand Down
9 changes: 1 addition & 8 deletions src/PluginManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class Gala.PluginManager : Object {
}

public string? window_switcher_provider { get; private set; default = null; }
public string? window_overview_provider { get; private set; default = null; }

private HashTable<string,Plugin> plugins;
private File plugin_dir;
Expand Down Expand Up @@ -125,18 +124,12 @@ public class Gala.PluginManager : Object {
private bool check_provides (string name, PluginFunction provides) {
var message = "Plugins %s and %s both provide %s functionality, using first one only";
switch (provides) {
case PluginFunction.WINDOW_OVERVIEW:
if (window_overview_provider != null) {
warning (message, window_overview_provider, name, "window overview");
return false;
}
window_overview_provider = name;
return true;
case PluginFunction.WINDOW_SWITCHER:
if (window_switcher_provider != null) {
warning (message, window_switcher_provider, name, "window switcher");
return false;
}

window_switcher_provider = name;
return true;
default:
Expand Down
14 changes: 5 additions & 9 deletions src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace Gala {

private WindowSwitcher? window_switcher = null;

public ActivatableComponent? window_overview { get; private set; }
public WindowOverview window_overview { get; private set; }

public ScreenSaverManager? screensaver { get; private set; }

Expand Down Expand Up @@ -290,12 +290,8 @@ namespace Gala {
Meta.KeyBinding.set_custom_handler ("switch-group-backward", window_switcher.handle_switch_windows);
}

if (plugin_manager.window_overview_provider == null
|| (window_overview = (plugin_manager.get_plugin (plugin_manager.window_overview_provider) as ActivatableComponent)) == null
) {
window_overview = new WindowOverview (this);
ui_group.add_child ((Clutter.Actor) window_overview);
}
window_overview = new WindowOverview (this);
ui_group.add_child (window_overview);

// Add the remaining components that should be on top
shell_group = new Clutter.Actor ();
Expand Down Expand Up @@ -884,7 +880,7 @@ namespace Gala {
launch_action (ActionKeys.PANEL_MAIN_MENU_ACTION);
break;
case ActionType.WINDOW_OVERVIEW:
if (window_overview == null || filter_action (WINDOW_OVERVIEW)) {
if (filter_action (WINDOW_OVERVIEW)) {
break;
}

Expand All @@ -896,7 +892,7 @@ namespace Gala {
critical ("Window overview is deprecated");
break;
case ActionType.WINDOW_OVERVIEW_ALL:
if (window_overview == null || filter_action (WINDOW_OVERVIEW)) {
if (filter_action (WINDOW_OVERVIEW)) {
break;
}

Expand Down