mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
whitespace cleanup; use g_slice in scratch plugin.
This commit is contained in:
parent
1e59d63e31
commit
30ece059cf
@ -504,8 +504,7 @@ on_map_effect_complete (ClutterActor *actor, gpointer data)
|
||||
mutter_plugin.running--;
|
||||
|
||||
/* Now notify the manager that we are done with this effect */
|
||||
mutter_plugin_effect_completed (&mutter_plugin, mc_window,
|
||||
MUTTER_PLUGIN_MAP);
|
||||
mutter_plugin_effect_completed (&mutter_plugin, mc_window, MUTTER_PLUGIN_MAP);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -42,7 +42,8 @@
|
||||
|
||||
#define PANEL_SLIDE_THRESHOLD 2
|
||||
#define PANEL_HEIGHT 40
|
||||
#define ACTOR_DATA_KEY "MCCP-Moblin-actor-data"
|
||||
#define ACTOR_DATA_KEY "MCCP-scratch-actor-data"
|
||||
static GQuark actor_data_quark = 0;
|
||||
|
||||
typedef struct PluginPrivate PluginPrivate;
|
||||
typedef struct ActorPrivate ActorPrivate;
|
||||
@ -55,14 +56,10 @@ static void maximize (MutterWindow *actor,
|
||||
gint x, gint y, gint width, gint height);
|
||||
static void unmaximize (MutterWindow *actor,
|
||||
gint x, gint y, gint width, gint height);
|
||||
|
||||
static void switch_workspace (const GList **actors, gint from, gint to,
|
||||
MetaMotionDirection direction);
|
||||
|
||||
static void kill_effect (MutterWindow *actor, gulong event);
|
||||
|
||||
static gboolean xevent_filter (XEvent *xev);
|
||||
|
||||
static gboolean reload (const char *params);
|
||||
|
||||
/*
|
||||
@ -154,15 +151,28 @@ struct ActorPrivate
|
||||
/*
|
||||
* Actor private data accessor
|
||||
*/
|
||||
static void
|
||||
free_actor_private (gpointer data)
|
||||
{
|
||||
if (G_LIKELY (data != NULL))
|
||||
g_slice_free (ActorPrivate, data);
|
||||
}
|
||||
|
||||
static ActorPrivate *
|
||||
get_actor_private (MutterWindow *actor)
|
||||
{
|
||||
ActorPrivate * priv = g_object_get_data (G_OBJECT (actor), ACTOR_DATA_KEY);
|
||||
ActorPrivate *priv = g_object_get_qdata (G_OBJECT (actor), actor_data_quark);
|
||||
|
||||
if (!priv)
|
||||
if (G_UNLIKELY (actor_data_quark == 0))
|
||||
actor_data_quark = g_quark_from_static_string (ACTOR_DATA_KEY);
|
||||
|
||||
if (G_UNLIKELY (!priv))
|
||||
{
|
||||
priv = g_new0 (ActorPrivate, 1);
|
||||
g_object_set_data_full (G_OBJECT (actor), ACTOR_DATA_KEY, priv, g_free);
|
||||
priv = g_slice_new0 (ActorPrivate);
|
||||
|
||||
g_object_set_qdata_full (G_OBJECT (actor),
|
||||
actor_data_quark, priv,
|
||||
free_actor_private);
|
||||
}
|
||||
|
||||
return priv;
|
||||
@ -373,8 +383,7 @@ minimize (MutterWindow *mcw)
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
mutter_plugin_effect_completed (plugin, mcw,
|
||||
MUTTER_PLUGIN_MINIMIZE);
|
||||
mutter_plugin_effect_completed (plugin, mcw, MUTTER_PLUGIN_MINIMIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -401,8 +410,7 @@ on_maximize_effect_complete (ClutterActor *actor, gpointer data)
|
||||
plugin->running--;
|
||||
|
||||
/* Now notify the manager that we are done with this effect */
|
||||
mutter_plugin_effect_completed (plugin, mcw,
|
||||
MUTTER_PLUGIN_MAXIMIZE);
|
||||
mutter_plugin_effect_completed (plugin, mcw, MUTTER_PLUGIN_MAXIMIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -465,8 +473,7 @@ maximize (MutterWindow *mcw,
|
||||
return;
|
||||
}
|
||||
|
||||
mutter_plugin_effect_completed (plugin, mcw,
|
||||
MUTTER_PLUGIN_MAXIMIZE);
|
||||
mutter_plugin_effect_completed (plugin, mcw, MUTTER_PLUGIN_MAXIMIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -491,8 +498,7 @@ unmaximize (MutterWindow *mcw,
|
||||
}
|
||||
|
||||
/* Do this conditionally, if the effect requires completion callback. */
|
||||
mutter_plugin_effect_completed (plugin, mcw,
|
||||
MUTTER_PLUGIN_UNMAXIMIZE);
|
||||
mutter_plugin_effect_completed (plugin, mcw, MUTTER_PLUGIN_UNMAXIMIZE);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -514,8 +520,7 @@ on_map_effect_complete (ClutterActor *actor, gpointer data)
|
||||
plugin->running--;
|
||||
|
||||
/* Now notify the manager that we are done with this effect */
|
||||
mutter_plugin_effect_completed (plugin, mcw,
|
||||
MUTTER_PLUGIN_MAP);
|
||||
mutter_plugin_effect_completed (plugin, mcw, MUTTER_PLUGIN_MAP);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -556,8 +561,7 @@ map (MutterWindow *mcw)
|
||||
|
||||
}
|
||||
else
|
||||
mutter_plugin_effect_completed (plugin, mcw,
|
||||
MUTTER_PLUGIN_MAP);
|
||||
mutter_plugin_effect_completed (plugin, mcw, MUTTER_PLUGIN_MAP);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -576,8 +580,7 @@ on_destroy_effect_complete (ClutterActor *actor, gpointer data)
|
||||
|
||||
plugin->running--;
|
||||
|
||||
mutter_plugin_effect_completed (plugin, mcw,
|
||||
MUTTER_PLUGIN_DESTROY);
|
||||
mutter_plugin_effect_completed (plugin, mcw, MUTTER_PLUGIN_DESTROY);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -611,8 +614,7 @@ destroy (MutterWindow *mcw)
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
mutter_plugin_effect_completed (plugin, mcw,
|
||||
MUTTER_PLUGIN_DESTROY);
|
||||
mutter_plugin_effect_completed (plugin, mcw, MUTTER_PLUGIN_DESTROY);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -633,8 +635,7 @@ on_panel_effect_complete (ClutterActor *panel, gpointer data)
|
||||
else
|
||||
{
|
||||
priv->panel_back_in_progress = FALSE;
|
||||
mutter_plugin_set_stage_input_area (plugin, 0, 0,
|
||||
screen_width, 1);
|
||||
mutter_plugin_set_stage_input_area (plugin, 0, 0, screen_width, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user