diff --git a/src/compositor/meta-plugin-manager.c b/src/compositor/meta-plugin-manager.c index eb684971b..8dfc97a37 100644 --- a/src/compositor/meta-plugin-manager.c +++ b/src/compositor/meta-plugin-manager.c @@ -149,7 +149,7 @@ meta_plugin_manager_kill_switch_workspace (MetaPluginManager *plugin_mgr) gboolean meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr, MetaWindowActor *actor, - unsigned long event) + MetaPluginEffect event) { MetaPlugin *plugin = plugin_mgr->plugin; MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin); @@ -196,7 +196,7 @@ meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr, } break; default: - g_warning ("Incorrect handler called for event %lu", event); + g_warning ("Incorrect handler called for event %d", event); } return retval; @@ -214,7 +214,7 @@ meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr, gboolean meta_plugin_manager_event_maximize (MetaPluginManager *plugin_mgr, MetaWindowActor *actor, - unsigned long event, + MetaPluginEffect event, gint target_x, gint target_y, gint target_width, @@ -253,7 +253,7 @@ meta_plugin_manager_event_maximize (MetaPluginManager *plugin_mgr, } break; default: - g_warning ("Incorrect handler called for event %lu", event); + g_warning ("Incorrect handler called for event %d", event); } return retval; diff --git a/src/compositor/meta-plugin-manager.h b/src/compositor/meta-plugin-manager.h index 66a22adcd..19773715f 100644 --- a/src/compositor/meta-plugin-manager.h +++ b/src/compositor/meta-plugin-manager.h @@ -26,15 +26,15 @@ #include #include -#define META_PLUGIN_MINIMIZE (1<<0) -#define META_PLUGIN_MAXIMIZE (1<<1) -#define META_PLUGIN_UNMAXIMIZE (1<<2) -#define META_PLUGIN_MAP (1<<3) -#define META_PLUGIN_DESTROY (1<<4) -#define META_PLUGIN_SWITCH_WORKSPACE (1<<5) -#define META_PLUGIN_UNMINIMIZE (1<<6) - -#define META_PLUGIN_ALL_EFFECTS (~0) +typedef enum { + META_PLUGIN_MINIMIZE, + META_PLUGIN_MAXIMIZE, + META_PLUGIN_UNMAXIMIZE, + META_PLUGIN_MAP, + META_PLUGIN_DESTROY, + META_PLUGIN_SWITCH_WORKSPACE, + META_PLUGIN_UNMINIMIZE, +} MetaPluginEffect; /** * MetaPluginManager: (skip) @@ -48,11 +48,11 @@ void meta_plugin_manager_load (const gchar *plugin_name); gboolean meta_plugin_manager_event_simple (MetaPluginManager *mgr, MetaWindowActor *actor, - unsigned long event); + MetaPluginEffect event); gboolean meta_plugin_manager_event_maximize (MetaPluginManager *mgr, MetaWindowActor *actor, - unsigned long event, + MetaPluginEffect event, gint target_x, gint target_y, gint target_width, diff --git a/src/compositor/meta-window-actor-private.h b/src/compositor/meta-window-actor-private.h index 5f495d6f1..f014e703e 100644 --- a/src/compositor/meta-window-actor-private.h +++ b/src/compositor/meta-window-actor-private.h @@ -8,6 +8,7 @@ #include #include #include "meta-surface-actor.h" +#include "meta-plugin-manager.h" MetaWindowActor *meta_window_actor_new (MetaWindow *window); @@ -55,8 +56,8 @@ void meta_window_actor_sync_updates_frozen (MetaWindowActor *self); void meta_window_actor_queue_frame_drawn (MetaWindowActor *self, gboolean no_delay_frame); -void meta_window_actor_effect_completed (MetaWindowActor *actor, - gulong event); +void meta_window_actor_effect_completed (MetaWindowActor *actor, + MetaPluginEffect event); MetaSurfaceActor *meta_window_actor_get_surface (MetaWindowActor *self); void meta_window_actor_update_surface (MetaWindowActor *self); diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index d61c2fb30..a518898e5 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -1043,7 +1043,7 @@ meta_window_actor_effect_in_progress (MetaWindowActor *self) } static gboolean -is_freeze_thaw_effect (gulong event) +is_freeze_thaw_effect (MetaPluginEffect event) { switch (event) { @@ -1058,8 +1058,8 @@ is_freeze_thaw_effect (gulong event) } static gboolean -start_simple_effect (MetaWindowActor *self, - gulong event) +start_simple_effect (MetaWindowActor *self, + MetaPluginEffect event) { MetaWindowActorPrivate *priv = self->priv; MetaCompositor *compositor = priv->compositor; @@ -1123,8 +1123,8 @@ meta_window_actor_after_effects (MetaWindowActor *self) } void -meta_window_actor_effect_completed (MetaWindowActor *self, - gulong event) +meta_window_actor_effect_completed (MetaWindowActor *self, + MetaPluginEffect event) { MetaWindowActorPrivate *priv = self->priv; @@ -1300,7 +1300,7 @@ meta_window_actor_show (MetaWindowActor *self, { MetaWindowActorPrivate *priv = self->priv; MetaCompositor *compositor = priv->compositor; - gulong event = 0; + MetaPluginEffect event; g_return_if_fail (!priv->visible); @@ -1335,7 +1335,7 @@ meta_window_actor_hide (MetaWindowActor *self, { MetaWindowActorPrivate *priv = self->priv; MetaCompositor *compositor = priv->compositor; - gulong event = 0; + MetaPluginEffect event = 0; g_return_if_fail (priv->visible);