Do not run effects during WM startup

When we first start up, we do not want to run effects on any pre-exising
windows (this is either the case we are starting up and there are no windows,
or we are replacing an exisint window manager, or worse, we crashed, and we
just want to get to the desired desktop as quick as possible).

Dithered about where to place the check; putting into the plugin manager
reduces the number of places (and files) in which it needs to be done.
This commit is contained in:
Tomas Frydrych 2009-08-05 19:05:10 +01:00
parent dafdecb4e8
commit 2c8df7d12e

View File

@ -27,6 +27,7 @@
#include "errors.h" #include "errors.h"
#include "workspace.h" #include "workspace.h"
#include "mutter-module.h" #include "mutter-module.h"
#include "../core/window-private.h"
#include <string.h> #include <string.h>
@ -401,6 +402,10 @@ mutter_plugin_manager_event_simple (MutterPluginManager *plugin_mgr,
{ {
GList *l = plugin_mgr->plugins; GList *l = plugin_mgr->plugins;
gboolean retval = FALSE; gboolean retval = FALSE;
MetaDisplay *display = meta_screen_get_display (plugin_mgr->screen);
if (display->display_opening)
return FALSE;
while (l) while (l)
{ {
@ -476,6 +481,10 @@ mutter_plugin_manager_event_maximize (MutterPluginManager *plugin_mgr,
{ {
GList *l = plugin_mgr->plugins; GList *l = plugin_mgr->plugins;
gboolean retval = FALSE; gboolean retval = FALSE;
MetaDisplay *display = meta_screen_get_display (plugin_mgr->screen);
if (display->display_opening)
return FALSE;
while (l) while (l)
{ {
@ -545,6 +554,10 @@ mutter_plugin_manager_switch_workspace (MutterPluginManager *plugin_mgr,
{ {
GList *l = plugin_mgr->plugins; GList *l = plugin_mgr->plugins;
gboolean retval = FALSE; gboolean retval = FALSE;
MetaDisplay *display = meta_screen_get_display (plugin_mgr->screen);
if (display->display_opening)
return FALSE;
while (l) while (l)
{ {