Disabled event effects; disable_stage() convenience function.

This commit is contained in:
Tomas Frydrych 2008-10-20 08:52:38 +01:00
parent b422faa4fe
commit 7ddb3a4663

View File

@ -84,11 +84,8 @@ G_MODULE_EXPORT MutterPlugin mutter_plugin =
.do_init = do_init, .do_init = do_init,
/* Which types of events this plugin supports */ /* Which types of events this plugin supports */
.features = MUTTER_PLUGIN_MINIMIZE | /* This plugin only uses the xevent callback for now */
MUTTER_PLUGIN_DESTROY | .features = 0,
MUTTER_PLUGIN_MAP |
MUTTER_PLUGIN_MAXIMIZE |
MUTTER_PLUGIN_UNMAXIMIZE,
/* And the corresponding handlers */ /* And the corresponding handlers */
@ -617,15 +614,26 @@ destroy (MutterWindow *mcw)
mutter_plugin_effect_completed (plugin, mcw, MUTTER_PLUGIN_DESTROY); mutter_plugin_effect_completed (plugin, mcw, MUTTER_PLUGIN_DESTROY);
} }
/*
* Use this function to disable stage input
*
* Used by the completion callback for the panel in/out effects
*/
static void
disable_stage (MutterPlugin *plugin)
{
gint screen_width, screen_height;
mutter_plugin_query_screen_size (plugin, &screen_width, &screen_height);
mutter_plugin_set_stage_input_area (plugin, 0, 0, screen_width, 1);
}
static void static void
on_panel_effect_complete (ClutterActor *panel, gpointer data) on_panel_effect_complete (ClutterActor *panel, gpointer data)
{ {
gboolean reactive = GPOINTER_TO_INT (data); gboolean reactive = GPOINTER_TO_INT (data);
MutterPlugin *plugin = get_plugin (); MutterPlugin *plugin = get_plugin ();
PluginPrivate *priv = plugin->plugin_private; PluginPrivate *priv = plugin->plugin_private;
gint screen_width, screen_height;
mutter_plugin_query_screen_size (plugin, &screen_width, &screen_height);
if (reactive) if (reactive)
{ {
@ -635,7 +643,7 @@ on_panel_effect_complete (ClutterActor *panel, gpointer data)
else else
{ {
priv->panel_back_in_progress = FALSE; priv->panel_back_in_progress = FALSE;
mutter_plugin_set_stage_input_area (plugin, 0, 0, screen_width, 1); disable_stage (plugin);
} }
} }