Compare commits

..

1 Commits

Author SHA1 Message Date
Niels De Graef
020b8ea8ed CI: add uncrustify config.
Run in the repo's root directory with for example

```
$ uncrustify -c data/uncrustify.cfg src/**/*.c
```
2019-07-11 11:17:45 +02:00
66 changed files with 1862 additions and 1184 deletions

31
NEWS
View File

@@ -1,34 +1,3 @@
3.33.4
======
* Discard page flip retries on hotplug [Jonas; !630]
* Add xdg-output v2 support [Olivier; #645]
* Restore DRM format fallbacks [Jonas; !662]
* Don't emit ::size-changed when only position changed [Daniel; !568]
* Expose workspace layout properties [Florian; !618]
* Don't use grab modifiers when shortcuts are inhibited [Olivier; #642]
* Fix stuttering due to unchanged power save mode notifications [Georges; !674]
* Add API to reorder workspaces [Adam; !670]
* Make picking a new focus window more reliable [Marco; !669]
* Defer actor allocation till shown [Carlos; !677]
* Try to use primary GPU for copy instead of glReadPixels [Pekka; !615]
* Unset pointer focus when the cursor is hidden [Jonas D.; !448]
* Fix modifier-drag on wayland subsurfaces [Robert; !604]
* Fix background corruption on Nvidia after resuming from suspend [Daniel; !600]
* Only grab the locate-pointer key when necessary [Olivier; !685, #647]
* Misc. bug fixes and cleanups [Florian, Jonas, Daniel, Robert, Olivier,
Georges, Marco, Carlos, Emmanuele; !648, !650, !647, !656, !658, !637,
!663, !660, !659, !665, !666, !668, !667, #667, !676, !678, #672, !680,
!683, !688, !689, !687]
Contributors:
Jonas Ådahl, Emmanuele Bassi, Adam Bieńkowski, Piotr Drąg, Jonas Dreßler,
Olivier Fourdan, Carlos Garnacho, Robert Mader, Florian Müllner,
Georges Basile Stavracas Neto, Pekka Paalanen, Marco Trevisan (Treviño),
Daniel van Vugt
Translators:
Fabio Tomat [fur], Kukuh Syafaat [id]
3.33.3 3.33.3
====== ======
* Prepare for running Xwayland on demand [Carlos; !420] * Prepare for running Xwayland on demand [Carlos; !420]

View File

@@ -252,13 +252,6 @@ clutter_clone_allocate (ClutterActor *self,
if (priv->clone_source == NULL) if (priv->clone_source == NULL)
return; return;
/* ClutterActor delays allocating until the actor is shown; however
* we cannot paint it correctly in that case, so force an allocation.
*/
if (clutter_actor_get_parent (priv->clone_source) != NULL &&
!clutter_actor_has_allocation (priv->clone_source))
clutter_actor_allocate_preferred_size (priv->clone_source, flags);
#if 0 #if 0
/* XXX - this is wrong: ClutterClone cannot clone unparented /* XXX - this is wrong: ClutterClone cannot clone unparented
* actors, as it will break all invariants * actors, as it will break all invariants

View File

@@ -1636,17 +1636,14 @@ clutter_script_translate_parameters (ClutterScript *script,
GObject *object, GObject *object,
const gchar *name, const gchar *name,
GList *properties, GList *properties,
GPtrArray **param_names, GArray **params)
GArray **param_values)
{ {
ClutterScriptable *scriptable = NULL; ClutterScriptable *scriptable = NULL;
ClutterScriptableIface *iface = NULL; ClutterScriptableIface *iface = NULL;
GList *l, *unparsed; GList *l, *unparsed;
gboolean parse_custom = FALSE; gboolean parse_custom = FALSE;
*param_names = g_ptr_array_new_with_free_func (g_free); *params = g_array_new (FALSE, FALSE, sizeof (GParameter));
*param_values = g_array_new (FALSE, FALSE, sizeof (GValue));
g_array_set_clear_func (*param_values, (GDestroyNotify) g_value_unset);
if (CLUTTER_IS_SCRIPTABLE (object)) if (CLUTTER_IS_SCRIPTABLE (object))
{ {
@@ -1662,7 +1659,7 @@ clutter_script_translate_parameters (ClutterScript *script,
for (l = properties; l != NULL; l = l->next) for (l = properties; l != NULL; l = l->next)
{ {
PropertyInfo *pinfo = l->data; PropertyInfo *pinfo = l->data;
GValue value = G_VALUE_INIT; GParameter param = { NULL };
gboolean res = FALSE; gboolean res = FALSE;
if (pinfo->is_child || pinfo->is_layout) if (pinfo->is_child || pinfo->is_layout)
@@ -1679,12 +1676,12 @@ clutter_script_translate_parameters (ClutterScript *script,
pinfo->name); pinfo->name);
if (parse_custom) if (parse_custom)
res = iface->parse_custom_node (scriptable, script, &value, res = iface->parse_custom_node (scriptable, script, &param.value,
pinfo->name, pinfo->name,
pinfo->node); pinfo->node);
if (!res) if (!res)
res = _clutter_script_parse_node (script, &value, res = _clutter_script_parse_node (script, &param.value,
pinfo->name, pinfo->name,
pinfo->node, pinfo->node,
pinfo->pspec); pinfo->pspec);
@@ -1696,8 +1693,9 @@ clutter_script_translate_parameters (ClutterScript *script,
continue; continue;
} }
g_ptr_array_add (*param_names, g_strdup (pinfo->name)); param.name = g_strdup (pinfo->name);
g_array_append_val (*param_values, value);
g_array_append_val (*params, param);
property_info_free (pinfo); property_info_free (pinfo);
} }
@@ -1712,8 +1710,7 @@ clutter_script_construct_parameters (ClutterScript *script,
GType gtype, GType gtype,
const gchar *name, const gchar *name,
GList *properties, GList *properties,
GPtrArray **construct_param_names, GArray **construct_params)
GArray **construct_param_values)
{ {
GObjectClass *klass; GObjectClass *klass;
GList *l, *unparsed; GList *l, *unparsed;
@@ -1721,17 +1718,14 @@ clutter_script_construct_parameters (ClutterScript *script,
klass = g_type_class_ref (gtype); klass = g_type_class_ref (gtype);
g_assert (klass != NULL); g_assert (klass != NULL);
*construct_param_names = g_ptr_array_new_with_free_func (g_free); *construct_params = g_array_new (FALSE, FALSE, sizeof (GParameter));
*construct_param_values = g_array_new (FALSE, FALSE, sizeof (GValue));
g_array_set_clear_func (*construct_param_values,
(GDestroyNotify) g_value_unset);
unparsed = NULL; unparsed = NULL;
for (l = properties; l != NULL; l = l->next) for (l = properties; l != NULL; l = l->next)
{ {
PropertyInfo *pinfo = l->data; PropertyInfo *pinfo = l->data;
GValue value = G_VALUE_INIT; GParameter param = { NULL };
GParamSpec *pspec = NULL; GParamSpec *pspec = NULL;
/* we allow custom property names for classes, so if we /* we allow custom property names for classes, so if we
@@ -1755,7 +1749,9 @@ clutter_script_construct_parameters (ClutterScript *script,
continue; continue;
} }
if (!_clutter_script_parse_node (script, &value, param.name = g_strdup (pinfo->name);
if (!_clutter_script_parse_node (script, &param.value,
pinfo->name, pinfo->name,
pinfo->node, pinfo->node,
pinfo->pspec)) pinfo->pspec))
@@ -1764,8 +1760,7 @@ clutter_script_construct_parameters (ClutterScript *script,
continue; continue;
} }
g_ptr_array_add (*construct_param_names, g_strdup (pinfo->name)); g_array_append_val (*construct_params, param);
g_array_append_val (*construct_param_values, value);
property_info_free (pinfo); property_info_free (pinfo);
} }
@@ -2092,8 +2087,7 @@ _clutter_script_apply_properties (ClutterScript *script,
gboolean set_custom_property = FALSE; gboolean set_custom_property = FALSE;
GObject *object = oinfo->object; GObject *object = oinfo->object;
GList *properties; GList *properties;
g_autoptr (GPtrArray) param_names = NULL; GArray *params;
g_autoptr (GArray) param_values = NULL;
guint i; guint i;
if (!oinfo->has_unresolved) if (!oinfo->has_unresolved)
@@ -2117,31 +2111,34 @@ _clutter_script_apply_properties (ClutterScript *script,
object, object,
oinfo->id, oinfo->id,
properties, properties,
&param_names, &params);
&param_values);
/* consume all the properties we could translate in this pass */ /* consume all the properties we could translate in this pass */
for (i = 0; i < param_names->len; i++) for (i = 0; i < params->len; i++)
{ {
char *name = g_ptr_array_index (param_names, i); GParameter *param = &g_array_index (params, GParameter, i);
GValue *value = &g_array_index (param_values, GValue, i);
CLUTTER_NOTE (SCRIPT, CLUTTER_NOTE (SCRIPT,
"Setting %s property '%s' (type:%s) to object '%s' (id:%s)", "Setting %s property '%s' (type:%s) to object '%s' (id:%s)",
set_custom_property ? "custom" : "regular", set_custom_property ? "custom" : "regular",
name, param->name,
g_type_name (G_VALUE_TYPE (value)), g_type_name (G_VALUE_TYPE (&param->value)),
g_type_name (oinfo->gtype), g_type_name (oinfo->gtype),
oinfo->id); oinfo->id);
if (set_custom_property) if (set_custom_property)
iface->set_custom_property (scriptable, script, iface->set_custom_property (scriptable, script,
name, param->name,
value); &param->value);
else else
g_object_set_property (object, name, value); g_object_set_property (object, param->name, &param->value);
g_free ((gchar *) param->name);
g_value_unset (&param->value);
} }
g_array_free (params, TRUE);
_clutter_script_check_unresolved (script, oinfo); _clutter_script_check_unresolved (script, oinfo);
} }
@@ -2149,8 +2146,8 @@ void
_clutter_script_construct_object (ClutterScript *script, _clutter_script_construct_object (ClutterScript *script,
ObjectInfo *oinfo) ObjectInfo *oinfo)
{ {
g_autoptr (GPtrArray) param_names = NULL; GArray *params = NULL;
g_autoptr (GArray) param_values = NULL; guint i;
/* we have completely updated the object */ /* we have completely updated the object */
if (oinfo->object != NULL) if (oinfo->object != NULL)
@@ -2193,14 +2190,25 @@ _clutter_script_construct_object (ClutterScript *script,
oinfo->gtype, oinfo->gtype,
oinfo->id, oinfo->id,
properties, properties,
&param_names, &params);
&param_values);
default_stage = clutter_stage_manager_get_default_stage (manager); default_stage = clutter_stage_manager_get_default_stage (manager);
oinfo->object = G_OBJECT (default_stage); oinfo->object = G_OBJECT (default_stage);
for (i = 0; i < params->len; i++)
{
GParameter *param = &g_array_index (params, GParameter, i);
g_free ((gchar *) param->name);
g_value_unset (&param->value);
}
g_array_free (params, TRUE);
} }
else else
{ {
g_autoptr (GPtrArray) param_names = NULL;
GArray *param_values;
GList *properties = oinfo->properties; GList *properties = oinfo->properties;
/* every other object: first, we get the construction parameters */ /* every other object: first, we get the construction parameters */
@@ -2209,11 +2217,22 @@ _clutter_script_construct_object (ClutterScript *script,
oinfo->gtype, oinfo->gtype,
oinfo->id, oinfo->id,
properties, properties,
&param_names, &params);
&param_values);
/* Convert GParameter → (GStrv, GValue[]) */
param_names = g_ptr_array_sized_new (params->len);
param_values = g_array_sized_new (TRUE, FALSE, sizeof (GValue), params->len);
for (i = 0; i < params->len; i++)
{
GParameter *param = &g_array_index (params, GParameter, i);
g_ptr_array_add (param_names, (gchar *) param->name);
g_array_append_val (param_values, param->value);
}
g_ptr_array_add (param_names, NULL);
oinfo->object = g_object_new_with_properties (oinfo->gtype, oinfo->object = g_object_new_with_properties (oinfo->gtype,
param_names->len, params->len,
(const gchar **) param_names->pdata, (const gchar **) param_names->pdata,
(const GValue *) param_values->data); (const GValue *) param_values->data);
@@ -2222,6 +2241,17 @@ _clutter_script_construct_object (ClutterScript *script,
* else too or only by this ClutterScript object. * else too or only by this ClutterScript object.
*/ */
g_object_ref_sink (oinfo->object); g_object_ref_sink (oinfo->object);
for (i = 0; i < params->len; i++)
{
GParameter *param = &g_array_index (params, GParameter, i);
g_free ((gchar *) param->name);
g_value_unset (&param->value);
}
g_array_free (param_values, FALSE);
g_array_free (params, TRUE);
} }
g_assert (oinfo->object != NULL); g_assert (oinfo->object != NULL);

View File

@@ -263,6 +263,8 @@ enum
static GParamSpec *obj_props[PROP_LAST]; static GParamSpec *obj_props[PROP_LAST];
#define CLUTTER_SCRIPT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CLUTTER_TYPE_SCRIPT, ClutterScriptPrivate))
struct _ClutterScriptPrivate struct _ClutterScriptPrivate
{ {
GHashTable *objects; GHashTable *objects;
@@ -375,7 +377,7 @@ object_info_free (gpointer data)
static void static void
clutter_script_finalize (GObject *gobject) clutter_script_finalize (GObject *gobject)
{ {
ClutterScriptPrivate *priv = CLUTTER_SCRIPT (gobject)->priv; ClutterScriptPrivate *priv = CLUTTER_SCRIPT_GET_PRIVATE (gobject);
g_object_unref (priv->parser); g_object_unref (priv->parser);
g_hash_table_destroy (priv->objects); g_hash_table_destroy (priv->objects);

View File

@@ -179,12 +179,9 @@ enum
PROP_USE_ALPHA, PROP_USE_ALPHA,
PROP_KEY_FOCUS, PROP_KEY_FOCUS,
PROP_NO_CLEAR_HINT, PROP_NO_CLEAR_HINT,
PROP_ACCEPT_FOCUS, PROP_ACCEPT_FOCUS
PROP_LAST
}; };
static GParamSpec *obj_props[PROP_LAST] = { NULL, };
enum enum
{ {
ACTIVATE, ACTIVATE,
@@ -842,7 +839,7 @@ clutter_stage_emit_key_focus_event (ClutterStage *stage,
else else
g_signal_emit_by_name (priv->key_focused_actor, "key-focus-out"); g_signal_emit_by_name (priv->key_focused_actor, "key-focus-out");
g_object_notify_by_pspec (G_OBJECT (stage), obj_props[PROP_KEY_FOCUS]); g_object_notify (G_OBJECT (stage), "key-focus");
} }
static void static void
@@ -1880,6 +1877,7 @@ clutter_stage_class_init (ClutterStageClass *klass)
{ {
GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
GParamSpec *pspec;
gobject_class->constructed = clutter_stage_constructed; gobject_class->constructed = clutter_stage_constructed;
gobject_class->set_property = clutter_stage_set_property; gobject_class->set_property = clutter_stage_set_property;
@@ -1910,13 +1908,14 @@ clutter_stage_class_init (ClutterStageClass *klass)
* *
* Whether the mouse pointer should be visible * Whether the mouse pointer should be visible
*/ */
obj_props[PROP_CURSOR_VISIBLE] = pspec = g_param_spec_boolean ("cursor-visible",
g_param_spec_boolean ("cursor-visible",
P_("Cursor Visible"), P_("Cursor Visible"),
P_("Whether the mouse pointer is visible on the main stage"), P_("Whether the mouse pointer is visible on the main stage"),
TRUE, TRUE,
CLUTTER_PARAM_READWRITE); CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class,
PROP_CURSOR_VISIBLE,
pspec);
/** /**
* ClutterStage:color: * ClutterStage:color:
* *
@@ -1925,13 +1924,13 @@ clutter_stage_class_init (ClutterStageClass *klass)
* Deprecated: 1.10: Use the #ClutterActor:background-color property of * Deprecated: 1.10: Use the #ClutterActor:background-color property of
* #ClutterActor instead. * #ClutterActor instead.
*/ */
obj_props[PROP_COLOR] = pspec = clutter_param_spec_color ("color",
clutter_param_spec_color ("color",
P_("Color"), P_("Color"),
P_("The color of the stage"), P_("The color of the stage"),
&default_stage_color, &default_stage_color,
CLUTTER_PARAM_READWRITE | CLUTTER_PARAM_READWRITE |
G_PARAM_DEPRECATED); G_PARAM_DEPRECATED);
g_object_class_install_property (gobject_class, PROP_COLOR, pspec);
/** /**
* ClutterStage:perspective: * ClutterStage:perspective:
@@ -1941,12 +1940,14 @@ clutter_stage_class_init (ClutterStageClass *klass)
* *
* Since: 0.8 * Since: 0.8
*/ */
obj_props[PROP_PERSPECTIVE] = pspec = g_param_spec_boxed ("perspective",
g_param_spec_boxed ("perspective",
P_("Perspective"), P_("Perspective"),
P_("Perspective projection parameters"), P_("Perspective projection parameters"),
CLUTTER_TYPE_PERSPECTIVE, CLUTTER_TYPE_PERSPECTIVE,
CLUTTER_PARAM_READWRITE); CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class,
PROP_PERSPECTIVE,
pspec);
/** /**
* ClutterStage:title: * ClutterStage:title:
@@ -1955,12 +1956,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
* *
* Since: 0.4 * Since: 0.4
*/ */
obj_props[PROP_TITLE] = pspec = g_param_spec_string ("title",
g_param_spec_string ("title",
P_("Title"), P_("Title"),
P_("Stage Title"), P_("Stage Title"),
NULL, NULL,
CLUTTER_PARAM_READWRITE); CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_TITLE, pspec);
/** /**
* ClutterStage:use-fog: * ClutterStage:use-fog:
@@ -1973,12 +1974,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
* *
* Deprecated: 1.10: This property does not do anything. * Deprecated: 1.10: This property does not do anything.
*/ */
obj_props[PROP_USE_FOG] = pspec = g_param_spec_boolean ("use-fog",
g_param_spec_boolean ("use-fog",
P_("Use Fog"), P_("Use Fog"),
P_("Whether to enable depth cueing"), P_("Whether to enable depth cueing"),
FALSE, FALSE,
CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED); CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED);
g_object_class_install_property (gobject_class, PROP_USE_FOG, pspec);
/** /**
* ClutterStage:fog: * ClutterStage:fog:
@@ -1990,12 +1991,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
* *
* Deprecated: 1.10: This property does not do anything. * Deprecated: 1.10: This property does not do anything.
*/ */
obj_props[PROP_FOG] = pspec = g_param_spec_boxed ("fog",
g_param_spec_boxed ("fog",
P_("Fog"), P_("Fog"),
P_("Settings for the depth cueing"), P_("Settings for the depth cueing"),
CLUTTER_TYPE_FOG, CLUTTER_TYPE_FOG,
CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED); CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED);
g_object_class_install_property (gobject_class, PROP_FOG, pspec);
/** /**
* ClutterStage:use-alpha: * ClutterStage:use-alpha:
@@ -2007,12 +2008,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
* *
* Since: 1.2 * Since: 1.2
*/ */
obj_props[PROP_USE_ALPHA] = pspec = g_param_spec_boolean ("use-alpha",
g_param_spec_boolean ("use-alpha",
P_("Use Alpha"), P_("Use Alpha"),
P_("Whether to honour the alpha component of the stage color"), P_("Whether to honour the alpha component of the stage color"),
FALSE, FALSE,
CLUTTER_PARAM_READWRITE); CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_USE_ALPHA, pspec);
/** /**
* ClutterStage:key-focus: * ClutterStage:key-focus:
@@ -2024,12 +2025,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
* *
* Since: 1.2 * Since: 1.2
*/ */
obj_props[PROP_KEY_FOCUS] = pspec = g_param_spec_object ("key-focus",
g_param_spec_object ("key-focus",
P_("Key Focus"), P_("Key Focus"),
P_("The currently key focused actor"), P_("The currently key focused actor"),
CLUTTER_TYPE_ACTOR, CLUTTER_TYPE_ACTOR,
CLUTTER_PARAM_READWRITE); CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_KEY_FOCUS, pspec);
/** /**
* ClutterStage:no-clear-hint: * ClutterStage:no-clear-hint:
@@ -2041,12 +2042,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
* *
* Since: 1.4 * Since: 1.4
*/ */
obj_props[PROP_NO_CLEAR_HINT] = pspec = g_param_spec_boolean ("no-clear-hint",
g_param_spec_boolean ("no-clear-hint",
P_("No Clear Hint"), P_("No Clear Hint"),
P_("Whether the stage should clear its contents"), P_("Whether the stage should clear its contents"),
FALSE, FALSE,
CLUTTER_PARAM_READWRITE); CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_NO_CLEAR_HINT, pspec);
/** /**
* ClutterStage:accept-focus: * ClutterStage:accept-focus:
@@ -2055,14 +2056,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
* *
* Since: 1.6 * Since: 1.6
*/ */
obj_props[PROP_ACCEPT_FOCUS] = pspec = g_param_spec_boolean ("accept-focus",
g_param_spec_boolean ("accept-focus",
P_("Accept Focus"), P_("Accept Focus"),
P_("Whether the stage should accept focus on show"), P_("Whether the stage should accept focus on show"),
TRUE, TRUE,
CLUTTER_PARAM_READWRITE); CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_ACCEPT_FOCUS, pspec);
g_object_class_install_properties (gobject_class, PROP_LAST, obj_props);
/** /**
* ClutterStage::activate: * ClutterStage::activate:
@@ -2360,7 +2359,7 @@ clutter_stage_set_color (ClutterStage *stage,
{ {
clutter_actor_set_background_color (CLUTTER_ACTOR (stage), color); clutter_actor_set_background_color (CLUTTER_ACTOR (stage), color);
g_object_notify_by_pspec (G_OBJECT (stage), obj_props[PROP_COLOR]); g_object_notify (G_OBJECT (stage), "color");
} }
/** /**
@@ -2650,8 +2649,7 @@ clutter_stage_show_cursor (ClutterStage *stage)
iface->set_cursor_visible (impl, TRUE); iface->set_cursor_visible (impl, TRUE);
g_object_notify_by_pspec (G_OBJECT (stage), g_object_notify (G_OBJECT (stage), "cursor-visible");
obj_props[PROP_CURSOR_VISIBLE]);
} }
} }
} }
@@ -2684,8 +2682,7 @@ clutter_stage_hide_cursor (ClutterStage *stage)
iface->set_cursor_visible (impl, FALSE); iface->set_cursor_visible (impl, FALSE);
g_object_notify_by_pspec (G_OBJECT (stage), g_object_notify (G_OBJECT (stage), "cursor-visible");
obj_props[PROP_CURSOR_VISIBLE]);
} }
} }
} }
@@ -2897,7 +2894,7 @@ clutter_stage_set_title (ClutterStage *stage,
if (CLUTTER_STAGE_WINDOW_GET_IFACE(impl)->set_title != NULL) if (CLUTTER_STAGE_WINDOW_GET_IFACE(impl)->set_title != NULL)
CLUTTER_STAGE_WINDOW_GET_IFACE (impl)->set_title (impl, priv->title); CLUTTER_STAGE_WINDOW_GET_IFACE (impl)->set_title (impl, priv->title);
g_object_notify_by_pspec (G_OBJECT (stage), obj_props[PROP_TITLE]); g_object_notify (G_OBJECT (stage), "title");
} }
/** /**
@@ -2997,7 +2994,7 @@ clutter_stage_set_key_focus (ClutterStage *stage,
else else
g_signal_emit_by_name (stage, "key-focus-in"); g_signal_emit_by_name (stage, "key-focus-in");
g_object_notify_by_pspec (G_OBJECT (stage), obj_props[PROP_KEY_FOCUS]); g_object_notify (G_OBJECT (stage), "key-focus");
} }
/** /**
@@ -3675,7 +3672,7 @@ clutter_stage_set_use_alpha (ClutterStage *stage,
clutter_actor_queue_redraw (CLUTTER_ACTOR (stage)); clutter_actor_queue_redraw (CLUTTER_ACTOR (stage));
g_object_notify_by_pspec (G_OBJECT (stage), obj_props[PROP_USE_ALPHA]); g_object_notify (G_OBJECT (stage), "use-alpha");
} }
} }
@@ -3889,7 +3886,7 @@ clutter_stage_set_no_clear_hint (ClutterStage *stage,
priv->stage_hints = new_hints; priv->stage_hints = new_hints;
g_object_notify_by_pspec (G_OBJECT (stage), obj_props[PROP_NO_CLEAR_HINT]); g_object_notify (G_OBJECT (stage), "no-clear-hint");
} }
/** /**
@@ -4131,7 +4128,7 @@ clutter_stage_set_accept_focus (ClutterStage *stage,
if (priv->accept_focus != accept_focus) if (priv->accept_focus != accept_focus)
{ {
_clutter_stage_window_set_accept_focus (priv->impl, accept_focus); _clutter_stage_window_set_accept_focus (priv->impl, accept_focus);
g_object_notify_by_pspec (G_OBJECT (stage), obj_props[PROP_ACCEPT_FOCUS]); g_object_notify (G_OBJECT (stage), "accept-focus");
} }
} }

View File

@@ -171,7 +171,7 @@ clutter_text_buffer_normal_insert_text (ClutterTextBuffer *buffer,
/* Actual text insertion */ /* Actual text insertion */
at = g_utf8_offset_to_pointer (pv->normal_text, position) - pv->normal_text; at = g_utf8_offset_to_pointer (pv->normal_text, position) - pv->normal_text;
memmove (pv->normal_text + at + n_bytes, pv->normal_text + at, pv->normal_text_bytes - at); g_memmove (pv->normal_text + at + n_bytes, pv->normal_text + at, pv->normal_text_bytes - at);
memcpy (pv->normal_text + at, chars, n_bytes); memcpy (pv->normal_text + at, chars, n_bytes);
/* Book keeping */ /* Book keeping */
@@ -201,7 +201,7 @@ clutter_text_buffer_normal_delete_text (ClutterTextBuffer *buffer,
start = g_utf8_offset_to_pointer (pv->normal_text, position) - pv->normal_text; start = g_utf8_offset_to_pointer (pv->normal_text, position) - pv->normal_text;
end = g_utf8_offset_to_pointer (pv->normal_text, position + n_chars) - pv->normal_text; end = g_utf8_offset_to_pointer (pv->normal_text, position + n_chars) - pv->normal_text;
memmove (pv->normal_text + start, pv->normal_text + end, pv->normal_text_bytes + 1 - end); g_memmove (pv->normal_text + start, pv->normal_text + end, pv->normal_text_bytes + 1 - end);
pv->normal_text_chars -= n_chars; pv->normal_text_chars -= n_chars;
pv->normal_text_bytes -= (end - start); pv->normal_text_bytes -= (end - start);
@@ -228,8 +228,8 @@ clutter_text_buffer_real_inserted_text (ClutterTextBuffer *buffer,
const gchar *chars, const gchar *chars,
guint n_chars) guint n_chars)
{ {
g_object_notify_by_pspec (G_OBJECT (buffer), obj_props[PROP_TEXT]); g_object_notify (G_OBJECT (buffer), "text");
g_object_notify_by_pspec (G_OBJECT (buffer), obj_props[PROP_LENGTH]); g_object_notify (G_OBJECT (buffer), "length");
} }
static void static void
@@ -237,8 +237,8 @@ clutter_text_buffer_real_deleted_text (ClutterTextBuffer *buffer,
guint position, guint position,
guint n_chars) guint n_chars)
{ {
g_object_notify_by_pspec (G_OBJECT (buffer), obj_props[PROP_TEXT]); g_object_notify (G_OBJECT (buffer), "text");
g_object_notify_by_pspec (G_OBJECT (buffer), obj_props[PROP_LENGTH]); g_object_notify (G_OBJECT (buffer), "length");
} }
/* -------------------------------------------------------------------------------- /* --------------------------------------------------------------------------------
@@ -598,7 +598,7 @@ clutter_text_buffer_set_max_length (ClutterTextBuffer *buffer,
clutter_text_buffer_delete_text (buffer, max_length, -1); clutter_text_buffer_delete_text (buffer, max_length, -1);
buffer->priv->max_length = max_length; buffer->priv->max_length = max_length;
g_object_notify_by_pspec (G_OBJECT (buffer), obj_props[PROP_MAX_LENGTH]); g_object_notify (G_OBJECT (buffer), "max-length");
} }
/** /**

View File

@@ -4821,7 +4821,7 @@ buffer_notify_max_length (ClutterTextBuffer *buffer,
GParamSpec *spec, GParamSpec *spec,
ClutterText *self) ClutterText *self)
{ {
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_MAX_LENGTH]); g_object_notify (G_OBJECT (self), "max-length");
} }
static void static void
@@ -4920,9 +4920,9 @@ clutter_text_set_buffer (ClutterText *self,
obj = G_OBJECT (self); obj = G_OBJECT (self);
g_object_freeze_notify (obj); g_object_freeze_notify (obj);
g_object_notify_by_pspec (obj, obj_props[PROP_BUFFER]); g_object_notify (obj, "buffer");
g_object_notify_by_pspec (obj, obj_props[PROP_TEXT]); g_object_notify (obj, "text");
g_object_notify_by_pspec (obj, obj_props[PROP_MAX_LENGTH]); g_object_notify (obj, "max-length");
g_object_thaw_notify (obj); g_object_thaw_notify (obj);
} }

View File

@@ -13,7 +13,7 @@ G_BEGIN_DECLS
#define TEST_COGLBOX(obj) \ #define TEST_COGLBOX(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
TEST_TYPE_COGLBOX, TestCoglbox)) TEST_TYPE_COGLBOX, TestCoglboxClass))
#define TEST_COGLBOX_CLASS(klass) \ #define TEST_COGLBOX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \ (G_TYPE_CHECK_CLASS_CAST ((klass), \
@@ -77,7 +77,7 @@ struct _TestCoglboxPrivate
G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR); G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
#define TEST_COGLBOX_GET_PRIVATE(obj) \ #define TEST_COGLBOX_GET_PRIVATE(obj) \
(test_coglbox_get_instance_private (TEST_COGLBOX ((obj)))) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
/* Coglbox implementation /* Coglbox implementation
*--------------------------------------------------*/ *--------------------------------------------------*/

View File

@@ -13,7 +13,7 @@ G_BEGIN_DECLS
#define TEST_COGLBOX(obj) \ #define TEST_COGLBOX(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
TEST_TYPE_COGLBOX, TestCoglbox)) TEST_TYPE_COGLBOX, TestCoglboxClass))
#define TEST_COGLBOX_CLASS(klass) \ #define TEST_COGLBOX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \ (G_TYPE_CHECK_CLASS_CAST ((klass), \
@@ -76,7 +76,7 @@ struct _TestCoglboxPrivate
G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR); G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
#define TEST_COGLBOX_GET_PRIVATE(obj) \ #define TEST_COGLBOX_GET_PRIVATE(obj) \
(test_coglbox_get_instance_private (TEST_COGLBOX ((obj)))) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
/* Coglbox implementation /* Coglbox implementation
*--------------------------------------------------*/ *--------------------------------------------------*/

View File

@@ -13,7 +13,7 @@ G_BEGIN_DECLS
#define TEST_COGLBOX(obj) \ #define TEST_COGLBOX(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
TEST_TYPE_COGLBOX, TestCoglbox)) TEST_TYPE_COGLBOX, TestCoglboxClass))
#define TEST_COGLBOX_CLASS(klass) \ #define TEST_COGLBOX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \ (G_TYPE_CHECK_CLASS_CAST ((klass), \
@@ -78,7 +78,7 @@ struct _TestCoglboxPrivate
G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR); G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
#define TEST_COGLBOX_GET_PRIVATE(obj) \ #define TEST_COGLBOX_GET_PRIVATE(obj) \
((TestCoglboxPrivate *)test_coglbox_get_instance_private (TEST_COGLBOX ((obj)))) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
/* Coglbox implementation /* Coglbox implementation
*--------------------------------------------------*/ *--------------------------------------------------*/

View File

@@ -14,7 +14,7 @@ G_BEGIN_DECLS
#define TEST_COGLBOX(obj) \ #define TEST_COGLBOX(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
TEST_TYPE_COGLBOX, TestCoglbox)) TEST_TYPE_COGLBOX, TestCoglboxClass))
#define TEST_COGLBOX_CLASS(klass) \ #define TEST_COGLBOX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \ (G_TYPE_CHECK_CLASS_CAST ((klass), \
@@ -77,7 +77,7 @@ struct _TestCoglboxPrivate
G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR); G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
#define TEST_COGLBOX_GET_PRIVATE(obj) \ #define TEST_COGLBOX_GET_PRIVATE(obj) \
(test_coglbox_get_instance_private (TEST_COGLBOX ((obj)))) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
/* Coglbox implementation /* Coglbox implementation
*--------------------------------------------------*/ *--------------------------------------------------*/

View File

@@ -47,7 +47,6 @@ struct _CoglTexture2D
gboolean auto_mipmap; gboolean auto_mipmap;
gboolean mipmaps_dirty; gboolean mipmaps_dirty;
gboolean is_foreign; gboolean is_foreign;
gboolean is_get_data_supported;
/* TODO: factor out these OpenGL specific members into some form /* TODO: factor out these OpenGL specific members into some form
* of driver private state. */ * of driver private state. */

View File

@@ -106,7 +106,6 @@ _cogl_texture_2d_create_base (CoglContext *ctx,
tex_2d->mipmaps_dirty = TRUE; tex_2d->mipmaps_dirty = TRUE;
tex_2d->auto_mipmap = TRUE; tex_2d->auto_mipmap = TRUE;
tex_2d->is_get_data_supported = TRUE;
tex_2d->gl_target = GL_TEXTURE_2D; tex_2d->gl_target = GL_TEXTURE_2D;
@@ -241,7 +240,6 @@ cogl_egl_texture_2d_new_from_image (CoglContext *ctx,
int height, int height,
CoglPixelFormat format, CoglPixelFormat format,
EGLImageKHR image, EGLImageKHR image,
CoglEglImageFlags flags,
GError **error) GError **error)
{ {
CoglTextureLoader *loader; CoglTextureLoader *loader;
@@ -262,7 +260,6 @@ cogl_egl_texture_2d_new_from_image (CoglContext *ctx,
loader->src.egl_image.width = width; loader->src.egl_image.width = width;
loader->src.egl_image.height = height; loader->src.egl_image.height = height;
loader->src.egl_image.format = format; loader->src.egl_image.format = format;
loader->src.egl_image.flags = flags;
tex = _cogl_texture_2d_create_base (ctx, width, height, format, loader); tex = _cogl_texture_2d_create_base (ctx, width, height, format, loader);

View File

@@ -60,12 +60,6 @@ G_BEGIN_DECLS
typedef struct _CoglTexture2D CoglTexture2D; typedef struct _CoglTexture2D CoglTexture2D;
#define COGL_TEXTURE_2D(X) ((CoglTexture2D *)X) #define COGL_TEXTURE_2D(X) ((CoglTexture2D *)X)
typedef enum _CoglEglImageFlags
{
COGL_EGL_IMAGE_FLAG_NONE = 0,
COGL_EGL_IMAGE_FLAG_NO_GET_DATA = 1 << 0,
} CoglEglImageFlags;
/** /**
* cogl_texture_2d_get_gtype: * cogl_texture_2d_get_gtype:
* *
@@ -225,7 +219,6 @@ cogl_egl_texture_2d_new_from_image (CoglContext *ctx,
int height, int height,
CoglPixelFormat format, CoglPixelFormat format,
EGLImageKHR image, EGLImageKHR image,
CoglEglImageFlags flags,
GError **error); GError **error);
typedef gboolean (*CoglTexture2DEGLImageExternalAlloc) (CoglTexture2D *tex_2d, typedef gboolean (*CoglTexture2DEGLImageExternalAlloc) (CoglTexture2D *tex_2d,

View File

@@ -182,7 +182,6 @@ typedef struct _CoglTextureLoader
int width; int width;
int height; int height;
CoglPixelFormat format; CoglPixelFormat format;
CoglEglImageFlags flags;
} egl_image; } egl_image;
#endif #endif
#if defined (COGL_HAS_EGL_SUPPORT) #if defined (COGL_HAS_EGL_SUPPORT)

View File

@@ -320,8 +320,6 @@ allocate_from_egl_image (CoglTexture2D *tex_2d,
} }
tex_2d->internal_format = internal_format; tex_2d->internal_format = internal_format;
tex_2d->is_get_data_supported =
!(loader->src.egl_image.flags & COGL_EGL_IMAGE_FLAG_NO_GET_DATA);
_cogl_texture_set_allocated (tex, _cogl_texture_set_allocated (tex,
internal_format, internal_format,
@@ -510,7 +508,6 @@ allocate_custom_egl_image_external (CoglTexture2D *tex_2d,
tex_2d->internal_format = internal_format; tex_2d->internal_format = internal_format;
tex_2d->gl_target = GL_TEXTURE_EXTERNAL_OES; tex_2d->gl_target = GL_TEXTURE_EXTERNAL_OES;
tex_2d->is_get_data_supported = FALSE;
return TRUE; return TRUE;
} }
@@ -837,7 +834,10 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
gboolean gboolean
_cogl_texture_2d_gl_is_get_data_supported (CoglTexture2D *tex_2d) _cogl_texture_2d_gl_is_get_data_supported (CoglTexture2D *tex_2d)
{ {
return tex_2d->is_get_data_supported; if (tex_2d->gl_target == GL_TEXTURE_EXTERNAL_OES)
return FALSE;
else
return TRUE;
} }
void void

View File

@@ -801,7 +801,6 @@ _cogl_winsys_texture_pixmap_x11_create (CoglTexturePixmapX11 *tex_pixmap)
tex->height, tex->height,
texture_format, texture_format,
egl_tex_pixmap->image, egl_tex_pixmap->image,
COGL_EGL_IMAGE_FLAG_NONE,
NULL)); NULL));
tex_pixmap->winsys = egl_tex_pixmap; tex_pixmap->winsys = egl_tex_pixmap;

View File

@@ -6,9 +6,7 @@ cdata.set('HAVE_GLES2', have_gles2.to_int())
cogl_installed_tests_libexecdir = join_paths( cogl_installed_tests_libexecdir = join_paths(
mutter_installed_tests_libexecdir, 'cogl', 'conform') mutter_installed_tests_libexecdir, 'cogl', 'conform')
if have_installed_tests install_data('run-tests.sh', install_dir: cogl_installed_tests_libexecdir)
install_data('run-tests.sh', install_dir: cogl_installed_tests_libexecdir)
endif
cogl_config_env = configure_file( cogl_config_env = configure_file(
input: 'config.env.in', input: 'config.env.in',

View File

@@ -124,8 +124,6 @@
real-time scheduling. The executable real-time scheduling. The executable
or user must have CAP_SYS_NICE. or user must have CAP_SYS_NICE.
Requires a restart. Requires a restart.
• “autostart-xwayland” — initializes Xwayland lazily if there are
X11 clients. Requires restart.
</description> </description>
</key> </key>

116
data/uncrustify.cfg Normal file
View File

@@ -0,0 +1,116 @@
# Enorces the code style of Mutter (based on GNU)
code_width = 80
# indent using tabs
output_tab_size = 2
indent_columns = output_tab_size
indent_with_tabs = 0
indent_brace = 2
indent_braces = false
indent_braces_no_func = True
indent_func_call_param = false
indent_func_def_param = false
indent_func_proto_param = false
indent_switch_case = 0
indent_case_brace = 2
indent_paren_close = 1
# newlines
newlines = lf
nl_after_semicolon = true
nl_start_of_file = remove
nl_end_of_file = force
nl_end_of_file_min = 1
# spaces
sp_return_paren = add # "return (1);" vs "return(1);"
sp_sizeof_paren = add # "sizeof (int)" vs "sizeof(int)"
sp_assign = add
sp_arith = add
sp_bool = add
sp_compare = add
sp_after_comma = add
sp_case_label = add
sp_else_brace = add
sp_brace_else = add
sp_func_call_paren = add # "foo (" vs "foo("
sp_func_proto_paren = add # "int foo ();" vs "int foo();"
sp_before_ptr_star = add
sp_after_ptr_star_qualifier = add # "const char * const" vs. "const char *const"
sp_after_ptr_star = remove
sp_between_ptr_star = remove # "**var" vs "* *var"
sp_inside_paren = remove # "( 1 )" vs "(1)"
sp_inside_fparen = remove # "( 1 )" vs "(1)" - functions
sp_inside_sparen = remove # "( 1 )" vs "(1)" - if/for/etc
sp_after_cast = add # "(int) a" vs "(int)a"
sp_func_call_user_paren = remove # For gettext, "_()" vs. "_ ()"
set func_call_user _ N_ C_ # Needed for sp_after_cast
sp_before_semi = remove
sp_paren_paren = remove # Space between (( and ))
eat_blanks_before_close_brace = true
eat_blanks_after_open_brace = true
# Style for curly braces
nl_assign_brace = add
nl_enum_brace = add
nl_union_brace = add
nl_struct_brace = add
nl_class_brace = add
nl_do_brace = add
nl_if_brace = add
nl_for_brace = add
nl_else_brace = add
nl_elseif_brace = add
nl_while_brace = add
nl_switch_brace = add
nl_fcall_brace = add
nl_fdef_brace = add
nl_brace_else = add
nl_brace_while = add
nl_case_colon_brace = add
nl_after_brace_open = true
# Function calls and parameters
nl_func_paren = remove
nl_func_def_paren = remove
nl_func_decl_start = remove
nl_func_def_start = remove
nl_func_decl_args = ignore
nl_func_def_args = ignore
nl_func_decl_args_multi_line = true
nl_func_def_args_multi_line = true
nl_func_decl_end = remove
nl_func_def_end = remove
# Code modifying options (non-whitespace)
mod_full_brace_function = force
mod_remove_extra_semicolon = true
# Align
align_func_params = true
align_single_line_func = true
align_var_def_star_style = 2
# one liners
nl_func_leave_one_liners = true
nl_enum_leave_one_liners = true
nl_assign_leave_one_liners = true
# Comments
cmt_cpp_to_c = true # "/* */" vs. "//"
cmt_convert_tab_to_spaces = true
#cmt_reflow_mode = 2 # Full reflow (seems doesn't work quite well, it doesn't reorder the comments)
cmt_width = 80 # Line width
cmt_star_cont = true # Whether to put a star on subsequent comment lines
cmt_sp_after_star_cont = 1 # The number of spaces to insert after the star on subsequent comment lines
cmt_c_nl_start = false # false/true
cmt_c_nl_end = true # false/true
# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of
# the comment are the same length. Default=True
cmt_multi_check_last = false
# Encoding
utf8_bom = remove
utf8_force = true

View File

@@ -1,17 +1,12 @@
project('mutter', 'c', project('mutter', 'c',
version: '3.33.4', version: '3.33.3',
meson_version: '>= 0.50.0', meson_version: '>= 0.50.0',
license: 'GPLv2+' license: 'GPLv2+'
) )
mutter_plugin_api_version = '3' mutter_plugin_api_version = '3'
split_version = meson.project_version().split('.') libmutter_api_version = '4'
# Automatically increase API version each development cycle,
# starting with 0 in 3.23.x
api_version = (split_version[1].to_int() - 23) / 2
libmutter_api_version = '@0@'.format(api_version)
# generic version requirements # generic version requirements
fribidi_req = '>= 1.0.0' fribidi_req = '>= 1.0.0'

1508
po/eu.po

File diff suppressed because it is too large Load Diff

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: mutter master\n" "Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-07-18 21:05+0000\n" "POT-Creation-Date: 2019-06-28 19:41+0000\n"
"PO-Revision-Date: 2019-07-28 10:06+0200\n" "PO-Revision-Date: 2019-07-01 21:01+0200\n"
"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n" "Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
"Language-Team: Friulian <fur@li.org>\n" "Language-Team: Friulian <fur@li.org>\n"
"Language: fur\n" "Language: fur\n"
@@ -492,6 +492,7 @@ msgstr ""
"cun Xwayland" "cun Xwayland"
#: data/org.gnome.mutter.wayland.gschema.xml.in:65 #: data/org.gnome.mutter.wayland.gschema.xml.in:65
#, fuzzy
msgid "" msgid ""
"Allow all keyboard events to be routed to X11 “override redirect” windows " "Allow all keyboard events to be routed to X11 “override redirect” windows "
"with a grab when running in Xwayland. This option is to support X11 clients " "with a grab when running in Xwayland. This option is to support X11 clients "
@@ -503,14 +504,13 @@ msgid ""
"specific X11 ClientMessage to the root window or be among the applications " "specific X11 ClientMessage to the root window or be among the applications "
"white-listed in key “xwayland-grab-access-rules”." "white-listed in key “xwayland-grab-access-rules”."
msgstr "" msgstr ""
"Cuant che a zire sot Xwayland, permet a ducj i events di tastiere di jessi " "Permet a ducj i events di tastiere di jessi indreçâts sui barcons “override "
"indreçâts sui barcons X11 “override redirect” cjapant il control de " "redirect” di X11 cuntun cjapâ il control de tastiere emetût di aplicazions "
"tastiere. Cheste opzion e ven doprade di râr e no à efiets sui barcons " "X11 che a zirin in Xwayland, di jessi tignûts in considerazion. Par une "
"normâi di X11 che a puedin ricevi la concentrazion dai segnai de tastiere " "cjapade di control di X11, par che e sedi tignude in considerazion sot "
"sot circostancis normâls. Par une cjapade di control di X11, par che e sedi " "Wayland, il client al scugne ancje inviâ un specific messaç (X11 "
"tignude in considerazion sot Wayland, il client al scugne ancje o inviâ un " "ClientMessage) al barcon lidrîs o jessi tra lis aplicazions metudis te liste "
"specific messaç (X11 ClientMessage) al barcon lidrîs o jessi tra lis " "blancje inte clâf “xwayland-grab-access-rules”."
"aplicazions metudis te liste blancje inte clâf “xwayland-grab-access-rules”."
#: data/org.gnome.mutter.wayland.gschema.xml.in:84 #: data/org.gnome.mutter.wayland.gschema.xml.in:84
msgid "Xwayland applications allowed to issue keyboard grabs" msgid "Xwayland applications allowed to issue keyboard grabs"
@@ -698,7 +698,7 @@ msgstr "Stampe version"
msgid "Mutter plugin to use" msgid "Mutter plugin to use"
msgstr "Plugin Mutter di doprâ" msgstr "Plugin Mutter di doprâ"
#: src/core/prefs.c:1849 #: src/core/prefs.c:1834
#, c-format #, c-format
msgid "Workspace %d" msgid "Workspace %d"
msgstr "Spazi di lavôr %d" msgstr "Spazi di lavôr %d"
@@ -712,7 +712,7 @@ msgstr "Mutter al è stât compilât cence supuart pe modalitât fetose\n"
msgid "Mode Switch: Mode %d" msgid "Mode Switch: Mode %d"
msgstr "Cambie mût: mût %d" msgstr "Cambie mût: mût %d"
#: src/x11/meta-x11-display.c:682 #: src/x11/meta-x11-display.c:681
#, c-format #, c-format
msgid "" msgid ""
"Display “%s” already has a window manager; try using the --replace option to " "Display “%s” already has a window manager; try using the --replace option to "
@@ -721,16 +721,16 @@ msgstr ""
"Il display “%s” al à za un window manager; prove dopre la opzion --replace " "Il display “%s” al à za un window manager; prove dopre la opzion --replace "
"par rimplaçâ chel atuâl." "par rimplaçâ chel atuâl."
#: src/x11/meta-x11-display.c:1024 #: src/x11/meta-x11-display.c:1023
msgid "Failed to initialize GDK\n" msgid "Failed to initialize GDK\n"
msgstr "No si è rivâts a inizializâ GDK\n" msgstr "No si è rivâts a inizializâ GDK\n"
#: src/x11/meta-x11-display.c:1048 #: src/x11/meta-x11-display.c:1047
#, c-format #, c-format
msgid "Failed to open X Window System display “%s”\n" msgid "Failed to open X Window System display “%s”\n"
msgstr "Impussibil vierzi il display “%s” di X Window System\n" msgstr "Impussibil vierzi il display “%s” di X Window System\n"
#: src/x11/meta-x11-display.c:1132 #: src/x11/meta-x11-display.c:1131
#, c-format #, c-format
msgid "Screen %d on display “%s” is invalid\n" msgid "Screen %d on display “%s” is invalid\n"
msgstr "Schermi %d su display “%s” no valit\n" msgstr "Schermi %d su display “%s” no valit\n"

View File

@@ -21,16 +21,16 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: mutter\n" "Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-07-18 13:55+0000\n" "POT-Creation-Date: 2019-02-04 17:52+0000\n"
"PO-Revision-Date: 2019-07-22 01:40-0300\n" "PO-Revision-Date: 2019-02-20 22:11-0300\n"
"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n" "Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
"Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n" "Language-Team: Portuguese - Brazil <gnome-pt_br-list@gnome.org>\n"
"Language: pt_BR\n" "Language: pt_BR\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1)\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n"
"X-Generator: Gtranslator 3.32.0\n" "X-Generator: Gtranslator 3.31.90\n"
"X-Project-Style: gnome\n" "X-Project-Style: gnome\n"
#: data/50-mutter-navigation.xml:6 #: data/50-mutter-navigation.xml:6
@@ -406,16 +406,6 @@ msgid "Enable experimental features"
msgstr "Habilitar recursos experimentais" msgstr "Habilitar recursos experimentais"
#: data/org.gnome.mutter.gschema.xml.in:108 #: data/org.gnome.mutter.gschema.xml.in:108
#| msgid ""
#| "To enable experimental features, add the feature keyword to the list. "
#| "Whether the feature requires restarting the compositor depends on the "
#| "given feature. Any experimental feature is not required to still be "
#| "available, or configurable. Dont expect adding anything in this setting "
#| "to be future proof. Currently possible keywords: • “scale-monitor-"
#| "framebuffer” — makes mutter default to layout logical monitors in a "
#| "logical pixel coordinate space, while scaling monitor framebuffers "
#| "instead of window content, to manage HiDPI monitors. Does not require a "
#| "restart."
msgid "" msgid ""
"To enable experimental features, add the feature keyword to the list. " "To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given " "Whether the feature requires restarting the compositor depends on the given "
@@ -424,9 +414,7 @@ msgid ""
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes " "proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate " "mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to " "space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart. • “rt-scheduler” — makes " "manage HiDPI monitors. Does not require a restart."
"mutter request a low priority real-time scheduling. The executable or user "
"must have CAP_SYS_NICE. Requires a restart."
msgstr "" msgstr ""
"Para habilitar recursos experimentais, adicione a palavra-chave do recurso à " "Para habilitar recursos experimentais, adicione a palavra-chave do recurso à "
"lista. Se o recurso exige ou não reiniciar o compositor, depende do recurso " "lista. Se o recurso exige ou não reiniciar o compositor, depende do recurso "
@@ -436,31 +424,21 @@ msgstr ""
"framebuffer” — torna o mutter padrão para a disposição de monitores lógicos " "framebuffer” — torna o mutter padrão para a disposição de monitores lógicos "
"em um espaço lógico coordenado por pixels, ao dimensionar buffers de quadros " "em um espaço lógico coordenado por pixels, ao dimensionar buffers de quadros "
"de monitor em vez de conteúdo de janela, para gerenciar monitores HiDPI. Não " "de monitor em vez de conteúdo de janela, para gerenciar monitores HiDPI. Não "
"exige uma reinicialização. • “rt-scheduler” — faz o mutter solicitar um " "exige uma reinicialização."
"agendamento de tempo real de baixa prioridade. O executável ou usuário deve "
"ter CAP_SYS_NICE. Exige uma reinicialização."
#: data/org.gnome.mutter.gschema.xml.in:132 #: data/org.gnome.mutter.gschema.xml.in:141
msgid "Modifier to use to locate the pointer"
msgstr "Modificador para usar ao localizar o ponteiro"
#: data/org.gnome.mutter.gschema.xml.in:133
msgid "This key will initiate the “locate pointer” action."
msgstr "Essa chave vai iniciar a ação de “localizar ponteiro”."
#: data/org.gnome.mutter.gschema.xml.in:153
msgid "Select window from tab popup" msgid "Select window from tab popup"
msgstr "Selecione a janela a partir da aba instantânea" msgstr "Selecione a janela a partir da aba instantânea"
#: data/org.gnome.mutter.gschema.xml.in:158 #: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup" msgid "Cancel tab popup"
msgstr "Cancelar aba instantânea" msgstr "Cancelar aba instantânea"
#: data/org.gnome.mutter.gschema.xml.in:163 #: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations" msgid "Switch monitor configurations"
msgstr "Trocar configurações de monitor" msgstr "Trocar configurações de monitor"
#: data/org.gnome.mutter.gschema.xml.in:168 #: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration" msgid "Rotates the built-in monitor configuration"
msgstr "Gira a configuração de monitor embutido" msgstr "Gira a configuração de monitor embutido"
@@ -517,44 +495,28 @@ msgid "Re-enable shortcuts"
msgstr "Reabilita atalhos" msgstr "Reabilita atalhos"
#: data/org.gnome.mutter.wayland.gschema.xml.in:64 #: data/org.gnome.mutter.wayland.gschema.xml.in:64
#| msgid "Allow grabs with Xwayland" msgid "Allow grabs with Xwayland"
msgid "Allow X11 grabs to lock keyboard focus with Xwayland" msgstr "Permitir capturas com Xwayland"
msgstr "Permitir as capturas do X11 travar o foco do teclado com Xwayland"
#: data/org.gnome.mutter.wayland.gschema.xml.in:65 #: data/org.gnome.mutter.wayland.gschema.xml.in:65
#| msgid ""
#| "Allow keyboard grabs issued by X11 applications running in Xwayland to be "
#| "taken into account. For a X11 grab to be taken into account under "
#| "Wayland, the client must also either send a specific X11 ClientMessage to "
#| "the root window or be among the applications white-listed in key "
#| "“xwayland-grab-access-rules”."
msgid "" msgid ""
"Allow all keyboard events to be routed to X11 “override redirect” windows " "Allow keyboard grabs issued by X11 applications running in Xwayland to be "
"with a grab when running in Xwayland. This option is to support X11 clients " "taken into account. For a X11 grab to be taken into account under Wayland, "
"which map an “override redirect” window (which do not receive keyboard " "the client must also either send a specific X11 ClientMessage to the root "
"focus) and issue a keyboard grab to force all keyboard events to that " "window or be among the applications white-listed in key “xwayland-grab-"
"window. This option is seldom used and has no effect on regular X11 windows " "access-rules”."
"which can receive keyboard focus under normal circumstances. For a X11 grab "
"to be taken into account under Wayland, the client must also either send a "
"specific X11 ClientMessage to the root window or be among the applications "
"white-listed in key “xwayland-grab-access-rules”."
msgstr "" msgstr ""
"Permita que todos os eventos do teclado sejam roteados para as janelas " "Permite capturas de teclado emitidas por aplicativos X11 em execução no "
"“override redirect” do X11 com uma captura ao executar no Xwayland. Esta " "Xwayland para serem levadas em consideração. Para que uma captura de X11 "
"opção é para ter suporte a clientes X11 que mapeiam uma janela “override " "seja levada em consideração no Wayland, o cliente também deve enviar um X11 "
"redirect” (que não recebe o foco do teclado) e emitem uma captura de teclado " "ClientMessage específica para a janela raiz ou estar entre os aplicativos "
"para forçar todos os eventos do teclado para aquela janela. Esta opção é " "listados em branco na chave “xwayland-grab-access-rules”."
"raramente usada e não tem efeito nas janelas comuns do X11, que podem "
"receber o foco do teclado em circunstâncias normais. Para que uma captura de "
"X11 seja levada em conta no Wayland, o cliente também deve enviar uma "
"ClientMessage específica do X11 para a janela raiz ou estar entre os "
"aplicativos na lista branca na chave “xwayland-grab-access-rules”."
#: data/org.gnome.mutter.wayland.gschema.xml.in:84 #: data/org.gnome.mutter.wayland.gschema.xml.in:77
msgid "Xwayland applications allowed to issue keyboard grabs" msgid "Xwayland applications allowed to issue keyboard grabs"
msgstr "Aplicativos Xwayland com permissão para emitir capturas de teclado" msgstr "Aplicativos Xwayland com permissão para emitir capturas de teclado"
#: data/org.gnome.mutter.wayland.gschema.xml.in:85 #: data/org.gnome.mutter.wayland.gschema.xml.in:78
msgid "" msgid ""
"List the resource names or resource class of X11 windows either allowed or " "List the resource names or resource class of X11 windows either allowed or "
"not allowed to issue X11 keyboard grabs under Xwayland. The resource name or " "not allowed to issue X11 keyboard grabs under Xwayland. The resource name or "
@@ -581,7 +543,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between #. TRANSLATORS: This string refers to a button that switches between
#. * different modes. #. * different modes.
#. #.
#: src/backends/meta-input-settings.c:2531 #: src/backends/meta-input-settings.c:2423
#, c-format #, c-format
msgid "Mode Switch (Group %d)" msgid "Mode Switch (Group %d)"
msgstr "Alternador de modo (Grupo %d)" msgstr "Alternador de modo (Grupo %d)"
@@ -589,56 +551,52 @@ msgstr "Alternador de modo (Grupo %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets' #. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs. #. * mapping through the available outputs.
#. #.
#: src/backends/meta-input-settings.c:2554 #: src/backends/meta-input-settings.c:2446
msgid "Switch monitor" msgid "Switch monitor"
msgstr "Trocar monitor" msgstr "Trocar monitor"
#: src/backends/meta-input-settings.c:2556 #: src/backends/meta-input-settings.c:2448
msgid "Show on-screen help" msgid "Show on-screen help"
msgstr "Mostrar ajuda na tela" msgstr "Mostrar ajuda na tela"
#: src/backends/meta-monitor.c:223 #: src/backends/meta-monitor-manager.c:954
msgid "Built-in display" msgid "Built-in display"
msgstr "Tela embutida" msgstr "Tela embutida"
#: src/backends/meta-monitor.c:252 #: src/backends/meta-monitor-manager.c:986
msgid "Unknown" msgid "Unknown"
msgstr "Desconhecido" msgstr "Desconhecido"
#: src/backends/meta-monitor.c:254 #: src/backends/meta-monitor-manager.c:988
msgid "Unknown Display" msgid "Unknown Display"
msgstr "Monitor desconhecido" msgstr "Monitor desconhecido"
#: src/backends/meta-monitor.c:262 #: src/backends/meta-monitor-manager.c:996
#, c-format #, c-format
#| msgid "%s %s"
msgctxt "" msgctxt ""
"This is a monitor vendor name, followed by a size in inches, like 'Dell 15\"'" "This is a monitor vendor name, followed by a size in inches, like 'Dell 15\"'"
msgid "%s %s" msgid "%s %s"
msgstr "%s %s" msgstr "%s %s"
#: src/backends/meta-monitor.c:270 #: src/backends/meta-monitor-manager.c:1004
#, c-format #, c-format
#| msgid "%s %s"
msgctxt "" msgctxt ""
"This is a monitor vendor name followed by product/model name where size in " "This is a monitor vendor name followed by product/model name where size in "
"inches could not be calculated, e.g. Dell U2414H" "inches could not be calculated, e.g. Dell U2414H"
msgid "%s %s" msgid "%s %s"
msgstr "%s %s" msgstr "%s %s"
#. Translators: this string will appear in Sysprof
#: src/backends/meta-profiler.c:82
#| msgid "Compositing Manager"
msgid "Compositor"
msgstr "Compositor"
#. This probably means that a non-WM compositor like xcompmgr is running; #. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit #. * we have no way to get it to exit
#: src/compositor/compositor.c:510 #: src/compositor/compositor.c:482
#, c-format #, c-format
msgid "" msgid ""
"Another compositing manager is already running on screen %i on display “%s”." "Another compositing manager is already running on screen %i on display “%s”."
msgstr "Outro gerenciador de composição de janelas está em execução na tela %i na área “%s”." msgstr "Outro compositor de janelas está em execução na tela %i na área “%s”."
#: src/core/bell.c:192 #: src/core/bell.c:252
msgid "Bell event" msgid "Bell event"
msgstr "Evento de som" msgstr "Evento de som"
@@ -687,16 +645,16 @@ msgid "Run with X11 backend"
msgstr "Executa com backend X11" msgstr "Executa com backend X11"
#. Translators: %s is a window title #. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:151 #: src/core/meta-close-dialog-default.c:150
#, c-format #, c-format
msgid "“%s” is not responding." msgid "“%s” is not responding."
msgstr "“%s” não está respondendo." msgstr "“%s” não está respondendo."
#: src/core/meta-close-dialog-default.c:153 #: src/core/meta-close-dialog-default.c:152
msgid "Application is not responding." msgid "Application is not responding."
msgstr "O aplicativo não está respondendo." msgstr "O aplicativo não está respondendo."
#: src/core/meta-close-dialog-default.c:158 #: src/core/meta-close-dialog-default.c:157
msgid "" msgid ""
"You may choose to wait a short while for it to continue or force the " "You may choose to wait a short while for it to continue or force the "
"application to quit entirely." "application to quit entirely."
@@ -704,11 +662,11 @@ msgstr ""
"Você pode escolher aguardar um pouco e continuar ou forçar o aplicativo a " "Você pode escolher aguardar um pouco e continuar ou forçar o aplicativo a "
"sair completamente." "sair completamente."
#: src/core/meta-close-dialog-default.c:165 #: src/core/meta-close-dialog-default.c:164
msgid "_Force Quit" msgid "_Force Quit"
msgstr "_Forçar sair" msgstr "_Forçar sair"
#: src/core/meta-close-dialog-default.c:165 #: src/core/meta-close-dialog-default.c:164
msgid "_Wait" msgid "_Wait"
msgstr "_Esperar" msgstr "_Esperar"
@@ -736,7 +694,7 @@ msgstr "Versão impressa"
msgid "Mutter plugin to use" msgid "Mutter plugin to use"
msgstr "Plug-in do Mutter para usar" msgstr "Plug-in do Mutter para usar"
#: src/core/prefs.c:1849 #: src/core/prefs.c:1786
#, c-format #, c-format
msgid "Workspace %d" msgid "Workspace %d"
msgstr "Espaço de trabalho %d" msgstr "Espaço de trabalho %d"
@@ -750,7 +708,7 @@ msgstr "O Mutter foi compilado sem suporte para modo detalhado\n"
msgid "Mode Switch: Mode %d" msgid "Mode Switch: Mode %d"
msgstr "Alternador de modo: Modo %d" msgstr "Alternador de modo: Modo %d"
#: src/x11/meta-x11-display.c:682 #: src/x11/meta-x11-display.c:666
#, c-format #, c-format
msgid "" msgid ""
"Display “%s” already has a window manager; try using the --replace option to " "Display “%s” already has a window manager; try using the --replace option to "
@@ -759,25 +717,20 @@ msgstr ""
"A exibição “%s” já possui um gerenciador de janelas; tente usar a opção --" "A exibição “%s” já possui um gerenciador de janelas; tente usar a opção --"
"replace para substituir o gerenciador de janelas atual." "replace para substituir o gerenciador de janelas atual."
#: src/x11/meta-x11-display.c:1024 #: src/x11/meta-x11-display.c:1008
msgid "Failed to initialize GDK\n" msgid "Failed to initialize GDK\n"
msgstr "Falha ao inicializar GDK\n" msgstr "Falha ao inicializar GDK\n"
#: src/x11/meta-x11-display.c:1048 #: src/x11/meta-x11-display.c:1032
#, c-format #, c-format
msgid "Failed to open X Window System display “%s”\n" msgid "Failed to open X Window System display “%s”\n"
msgstr "Falha ao abrir a exibição “%s” do sistema de janelas X\n" msgstr "Falha ao abrir a exibição “%s” do sistema de janelas X\n"
#: src/x11/meta-x11-display.c:1132 #: src/x11/meta-x11-display.c:1115
#, c-format #, c-format
msgid "Screen %d on display “%s” is invalid\n" msgid "Screen %d on display “%s” is invalid\n"
msgstr "A tela %d na exibição “%s” é inválida\n" msgstr "A tela %d na exibição “%s” é inválida\n"
#: src/x11/meta-x11-selection-input-stream.c:445
#, c-format
msgid "Format %s not supported"
msgstr "Sem suporte ao formato %s"
#: src/x11/session.c:1821 #: src/x11/session.c:1821
msgid "" msgid ""
"These windows do not support “save current setup” and will have to be " "These windows do not support “save current setup” and will have to be "
@@ -786,7 +739,7 @@ msgstr ""
"Estas janelas não oferecem suporte para a opção “salvar configuração atual” " "Estas janelas não oferecem suporte para a opção “salvar configuração atual” "
"e precisarão ser reiniciadas manualmente quando você reiniciar a sessão." "e precisarão ser reiniciadas manualmente quando você reiniciar a sessão."
#: src/x11/window-props.c:569 #: src/x11/window-props.c:568
#, c-format #, c-format
msgid "%s (on %s)" msgid "%s (on %s)"
msgstr "%s (em %s)" msgstr "%s (em %s)"
@@ -2119,6 +2072,9 @@ msgstr "%s (em %s)"
#~ msgid "Commands to run in response to keybindings" #~ msgid "Commands to run in response to keybindings"
#~ msgstr "Comandos executados em resposta a teclas de atalho" #~ msgstr "Comandos executados em resposta a teclas de atalho"
#~ msgid "Compositing Manager"
#~ msgstr "Gerenciador de composição"
#~ msgid "Control how new windows get focus" #~ msgid "Control how new windows get focus"
#~ msgstr "Controla como novas janelas obtêm foco" #~ msgstr "Controla como novas janelas obtêm foco"

View File

@@ -23,6 +23,9 @@
G_BEGIN_DECLS G_BEGIN_DECLS
/* This file was copied from gnome-session, so don't apply our code style */
/* *INDENT-OFF* */
typedef enum { typedef enum {
GSM_INHIBITOR_FLAG_LOGOUT = 1 << 0, GSM_INHIBITOR_FLAG_LOGOUT = 1 << 0,
GSM_INHIBITOR_FLAG_SWITCH_USER = 1 << 1, GSM_INHIBITOR_FLAG_SWITCH_USER = 1 << 1,
@@ -31,6 +34,8 @@ typedef enum {
GSM_INHIBITOR_FLAG_AUTOMOUNT = 1 << 4 GSM_INHIBITOR_FLAG_AUTOMOUNT = 1 << 4
} GsmInhibitorFlag; } GsmInhibitorFlag;
/* *INDENT-ON* */
G_END_DECLS G_END_DECLS
#endif /* __GSM_INHIBITOR_FLAG_H__ */ #endif /* __GSM_INHIBITOR_FLAG_H__ */

View File

@@ -302,7 +302,7 @@ meta_barrier_destroy (MetaBarrier *barrier)
static void static void
meta_barrier_init (MetaBarrier *barrier) meta_barrier_init (MetaBarrier *barrier)
{ {
barrier->priv = meta_barrier_get_instance_private (barrier); barrier->priv = G_TYPE_INSTANCE_GET_PRIVATE (barrier, META_TYPE_BARRIER, MetaBarrierPrivate);
} }
void void

View File

@@ -39,7 +39,6 @@
#include "backends/x11/cm/meta-cursor-sprite-xfixes.h" #include "backends/x11/cm/meta-cursor-sprite-xfixes.h"
#include "cogl/cogl.h" #include "cogl/cogl.h"
#include "clutter/clutter.h" #include "clutter/clutter.h"
#include "meta-marshal.h"
#include "meta/main.h" #include "meta/main.h"
#include "meta/meta-x11-errors.h" #include "meta/meta-x11-errors.h"
#include "meta/util.h" #include "meta/util.h"
@@ -167,31 +166,20 @@ meta_cursor_tracker_class_init (MetaCursorTrackerClass *klass)
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 0); G_TYPE_NONE, 0);
/**
* MetaCursorTracker::cursor-moved:
* @cursor: The #MetaCursorTracker
* @x: The new X coordinate of the cursor
* @y: The new Y coordinate of the cursor
*
* Notifies when the cursor has moved to a new location.
*/
signals[CURSOR_MOVED] = g_signal_new ("cursor-moved", signals[CURSOR_MOVED] = g_signal_new ("cursor-moved",
G_TYPE_FROM_CLASS (klass), G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
0, 0,
NULL, NULL, NULL, NULL, NULL,
meta_marshal_VOID__FLOAT_FLOAT,
G_TYPE_NONE, 2, G_TYPE_NONE, 2,
G_TYPE_FLOAT, G_TYPE_FLOAT,
G_TYPE_FLOAT); G_TYPE_FLOAT);
g_signal_set_va_marshaller (signals[CURSOR_MOVED],
G_TYPE_FROM_CLASS (klass),
meta_marshal_VOID__FLOAT_FLOATv);
signals[VISIBILITY_CHANGED] = g_signal_new ("visibility-changed", signals[VISIBILITY_CHANGED] = g_signal_new ("visibility-changed",
G_TYPE_FROM_CLASS (klass), G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL, 0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0); G_TYPE_NONE, 0);
} }

View File

@@ -34,7 +34,6 @@ typedef enum _MetaExperimentalFeature
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0), META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1), META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1),
META_EXPERIMENTAL_FEATURE_RT_SCHEDULER = (1 << 2), META_EXPERIMENTAL_FEATURE_RT_SCHEDULER = (1 << 2),
META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND = (1 << 3),
} MetaExperimentalFeature; } MetaExperimentalFeature;
#define META_TYPE_SETTINGS (meta_settings_get_type ()) #define META_TYPE_SETTINGS (meta_settings_get_type ())

View File

@@ -266,8 +266,6 @@ experimental_features_handler (GVariant *features_variant,
features |= META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS; features |= META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS;
else if (g_str_equal (feature, "rt-scheduler")) else if (g_str_equal (feature, "rt-scheduler"))
features |= META_EXPERIMENTAL_FEATURE_RT_SCHEDULER; features |= META_EXPERIMENTAL_FEATURE_RT_SCHEDULER;
else if (g_str_equal (feature, "autostart-xwayland"))
features |= META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND;
else else
g_info ("Unknown experimental feature '%s'\n", feature); g_info ("Unknown experimental feature '%s'\n", feature);
} }

View File

@@ -1870,7 +1870,6 @@ copy_shared_framebuffer_primary_gpu (CoglOnscreen *onscre
uint32_t offsets[1]; uint32_t offsets[1];
uint64_t modifiers[1]; uint64_t modifiers[1];
CoglPixelFormat cogl_format; CoglPixelFormat cogl_format;
CoglEglImageFlags flags;
CoglTexture2D *cogl_tex; CoglTexture2D *cogl_tex;
CoglOffscreen *cogl_fbo; CoglOffscreen *cogl_fbo;
int ret; int ret;
@@ -1920,13 +1919,11 @@ copy_shared_framebuffer_primary_gpu (CoglOnscreen *onscre
return FALSE; return FALSE;
} }
flags = COGL_EGL_IMAGE_FLAG_NO_GET_DATA;
cogl_tex = cogl_egl_texture_2d_new_from_image (cogl_context, cogl_tex = cogl_egl_texture_2d_new_from_image (cogl_context,
dumb_fb->width, dumb_fb->width,
dumb_fb->height, dumb_fb->height,
cogl_format, cogl_format,
egl_image, egl_image,
flags,
&error); &error);
meta_egl_destroy_image (egl, egl_display, egl_image, NULL); meta_egl_destroy_image (egl, egl_display, egl_image, NULL);

View File

@@ -74,6 +74,4 @@ MetaInhibitShortcutsDialog * meta_compositor_create_inhibit_shortcuts_dialog (Me
void meta_compositor_locate_pointer (MetaCompositor *compositor); void meta_compositor_locate_pointer (MetaCompositor *compositor);
void meta_compositor_redirect_x11_windows (MetaCompositor *compositor);
#endif /* META_COMPOSITOR_PRIVATE_H */ #endif /* META_COMPOSITOR_PRIVATE_H */

View File

@@ -516,15 +516,6 @@ redirect_windows (MetaX11Display *x11_display)
} }
} }
void
meta_compositor_redirect_x11_windows (MetaCompositor *compositor)
{
MetaDisplay *display = compositor->display;
if (display->x11_display)
redirect_windows (display->x11_display);
}
void void
meta_compositor_manage (MetaCompositor *compositor) meta_compositor_manage (MetaCompositor *compositor)
{ {
@@ -604,7 +595,8 @@ meta_compositor_manage (MetaCompositor *compositor)
compositor->have_x11_sync_object = meta_sync_ring_init (xdisplay); compositor->have_x11_sync_object = meta_sync_ring_init (xdisplay);
} }
meta_compositor_redirect_x11_windows (compositor); if (display->x11_display)
redirect_windows (display->x11_display);
compositor->plugin_mgr = meta_plugin_manager_new (compositor); compositor->plugin_mgr = meta_plugin_manager_new (compositor);
} }

View File

@@ -179,7 +179,6 @@ struct _MetaBackgroundActor
gboolean force_bilinear; gboolean force_bilinear;
cairo_region_t *clip_region; cairo_region_t *clip_region;
cairo_region_t *unobscured_region;
}; };
static void cullable_iface_init (MetaCullableInterface *iface); static void cullable_iface_init (MetaCullableInterface *iface);
@@ -196,22 +195,12 @@ set_clip_region (MetaBackgroundActor *self,
self->clip_region = cairo_region_copy (clip_region); self->clip_region = cairo_region_copy (clip_region);
} }
static void
set_unobscured_region (MetaBackgroundActor *self,
cairo_region_t *unobscured_region)
{
g_clear_pointer (&self->unobscured_region, cairo_region_destroy);
if (unobscured_region)
self->unobscured_region = cairo_region_copy (unobscured_region);
}
static void static void
meta_background_actor_dispose (GObject *object) meta_background_actor_dispose (GObject *object)
{ {
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (object); MetaBackgroundActor *self = META_BACKGROUND_ACTOR (object);
set_clip_region (self, NULL); set_clip_region (self, NULL);
set_unobscured_region (self, NULL);
meta_background_actor_set_background (self, NULL); meta_background_actor_set_background (self, NULL);
if (self->pipeline) if (self->pipeline)
{ {
@@ -513,8 +502,7 @@ meta_background_actor_paint (ClutterActor *actor)
ClutterActorBox actor_box; ClutterActorBox actor_box;
cairo_rectangle_int_t actor_pixel_rect; cairo_rectangle_int_t actor_pixel_rect;
CoglFramebuffer *fb; CoglFramebuffer *fb;
cairo_region_t *region; int i;
int i, n_rects;
if ((self->clip_region && cairo_region_is_empty (self->clip_region))) if ((self->clip_region && cairo_region_is_empty (self->clip_region)))
return; return;
@@ -536,43 +524,27 @@ meta_background_actor_paint (ClutterActor *actor)
/* Now figure out what to actually paint. /* Now figure out what to actually paint.
*/ */
if (self->clip_region) if (self->clip_region != NULL)
{ {
region = cairo_region_copy (self->clip_region); int n_rects = cairo_region_num_rectangles (self->clip_region);
cairo_region_intersect_rectangle (region, &actor_pixel_rect);
}
else
{
region = cairo_region_create_rectangle (&actor_pixel_rect);
}
if (self->unobscured_region)
cairo_region_intersect (region, self->unobscured_region);
if (cairo_region_is_empty (region))
{
cairo_region_destroy (region);
return;
}
n_rects = cairo_region_num_rectangles (region);
if (n_rects <= MAX_RECTS) if (n_rects <= MAX_RECTS)
{ {
for (i = 0; i < n_rects; i++) for (i = 0; i < n_rects; i++)
{ {
cairo_rectangle_int_t rect; cairo_rectangle_int_t rect;
cairo_region_get_rectangle (region, i, &rect); cairo_region_get_rectangle (self->clip_region, i, &rect);
paint_clipped_rectangle (fb, self->pipeline, &rect,
&self->texture_area); if (!gdk_rectangle_intersect (&actor_pixel_rect, &rect, &rect))
continue;
paint_clipped_rectangle (fb, self->pipeline, &rect, &self->texture_area);
}
return;
} }
} }
else
{ paint_clipped_rectangle (fb, self->pipeline, &actor_pixel_rect, &self->texture_area);
cairo_rectangle_int_t rect;
cairo_region_get_extents (region, &rect);
paint_clipped_rectangle (fb, self->pipeline, &rect,
&self->texture_area);
}
} }
static void static void
@@ -826,8 +798,6 @@ meta_background_actor_cull_out (MetaCullable *cullable,
cairo_region_t *clip_region) cairo_region_t *clip_region)
{ {
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (cullable); MetaBackgroundActor *self = META_BACKGROUND_ACTOR (cullable);
set_unobscured_region (self, unobscured_region);
set_clip_region (self, clip_region); set_clip_region (self, clip_region);
} }
@@ -835,8 +805,6 @@ static void
meta_background_actor_reset_culling (MetaCullable *cullable) meta_background_actor_reset_culling (MetaCullable *cullable)
{ {
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (cullable); MetaBackgroundActor *self = META_BACKGROUND_ACTOR (cullable);
set_unobscured_region (self, NULL);
set_clip_region (self, NULL); set_clip_region (self, NULL);
} }

View File

@@ -252,11 +252,12 @@ static void
set_file (MetaBackground *self, set_file (MetaBackground *self,
GFile **filep, GFile **filep,
MetaBackgroundImage **imagep, MetaBackgroundImage **imagep,
GFile *file, GFile *file)
gboolean force_reload)
{ {
if (force_reload || !file_equal0 (*filep, file)) if (!file_equal0 (*filep, file))
{ {
g_clear_object (filep);
if (*imagep) if (*imagep)
{ {
g_signal_handlers_disconnect_by_func (*imagep, g_signal_handlers_disconnect_by_func (*imagep,
@@ -266,12 +267,11 @@ set_file (MetaBackground *self,
*imagep = NULL; *imagep = NULL;
} }
g_set_object (filep, file);
if (file) if (file)
{ {
MetaBackgroundImageCache *cache = meta_background_image_cache_get_default (); MetaBackgroundImageCache *cache = meta_background_image_cache_get_default ();
*filep = g_object_ref (file);
*imagep = meta_background_image_cache_load (cache, file); *imagep = meta_background_image_cache_load (cache, file);
g_signal_connect (*imagep, "loaded", g_signal_connect (*imagep, "loaded",
G_CALLBACK (on_background_loaded), self); G_CALLBACK (on_background_loaded), self);
@@ -279,32 +279,6 @@ set_file (MetaBackground *self,
} }
} }
static void
on_gl_video_memory_purged (MetaBackground *self)
{
MetaBackgroundImageCache *cache = meta_background_image_cache_get_default ();
/* The GPU memory that just got invalidated is the texture inside
* self->background_image1,2 and/or its mipmaps. However, to save memory the
* original pixbuf isn't kept in RAM so we can't do a simple re-upload. The
* only copy of the image was the one in texture memory that got invalidated.
* So we need to do a full reload from disk.
*/
if (self->file1)
{
meta_background_image_cache_purge (cache, self->file1);
set_file (self, &self->file1, &self->background_image1, self->file1, TRUE);
}
if (self->file2)
{
meta_background_image_cache_purge (cache, self->file2);
set_file (self, &self->file2, &self->background_image2, self->file2, TRUE);
}
mark_changed (self);
}
static void static void
meta_background_dispose (GObject *object) meta_background_dispose (GObject *object)
{ {
@@ -313,8 +287,8 @@ meta_background_dispose (GObject *object)
free_color_texture (self); free_color_texture (self);
free_wallpaper_texture (self); free_wallpaper_texture (self);
set_file (self, &self->file1, &self->background_image1, NULL, FALSE); set_file (self, &self->file1, &self->background_image1, NULL);
set_file (self, &self->file2, &self->background_image2, NULL, FALSE); set_file (self, &self->file2, &self->background_image2, NULL);
set_display (self, NULL); set_display (self, NULL);
@@ -338,7 +312,7 @@ meta_background_constructed (GObject *object)
G_OBJECT_CLASS (meta_background_parent_class)->constructed (object); G_OBJECT_CLASS (meta_background_parent_class)->constructed (object);
g_signal_connect_object (self->display, "gl-video-memory-purged", g_signal_connect_object (self->display, "gl-video-memory-purged",
G_CALLBACK (on_gl_video_memory_purged), object, G_CONNECT_SWAPPED); G_CALLBACK (mark_changed), object, G_CONNECT_SWAPPED);
g_signal_connect_object (monitor_manager, "monitors-changed", g_signal_connect_object (monitor_manager, "monitors-changed",
G_CALLBACK (on_monitors_changed), self, G_CALLBACK (on_monitors_changed), self,
@@ -963,8 +937,8 @@ meta_background_set_blend (MetaBackground *self,
g_return_if_fail (META_IS_BACKGROUND (self)); g_return_if_fail (META_IS_BACKGROUND (self));
g_return_if_fail (blend_factor >= 0.0 && blend_factor <= 1.0); g_return_if_fail (blend_factor >= 0.0 && blend_factor <= 1.0);
set_file (self, &self->file1, &self->background_image1, file1, FALSE); set_file (self, &self->file1, &self->background_image1, file1);
set_file (self, &self->file2, &self->background_image2, file2, FALSE); set_file (self, &self->file2, &self->background_image2, file2);
self->blend_factor = blend_factor; self->blend_factor = blend_factor;
self->style = style; self->style = style;

View File

@@ -41,6 +41,9 @@ struct _MetaModulePrivate
GType plugin_type; GType plugin_type;
}; };
#define META_MODULE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_MODULE, MetaModulePrivate))
G_DEFINE_TYPE_WITH_PRIVATE (MetaModule, meta_module, G_TYPE_TYPE_MODULE); G_DEFINE_TYPE_WITH_PRIVATE (MetaModule, meta_module, G_TYPE_TYPE_MODULE);
static gboolean static gboolean
@@ -189,7 +192,7 @@ meta_module_class_init (MetaModuleClass *klass)
static void static void
meta_module_init (MetaModule *self) meta_module_init (MetaModule *self)
{ {
self->priv = meta_module_get_instance_private (self); self->priv = META_MODULE_GET_PRIVATE (self);
} }
GType GType

View File

@@ -218,9 +218,6 @@ meta_shadow_paint (MetaShadow *shadow,
int n_x, n_y; int n_x, n_y;
gboolean source_updated = FALSE; gboolean source_updated = FALSE;
if (clip && cairo_region_is_empty (clip))
return;
if (shadow->scale_width) if (shadow->scale_width)
{ {
n_x = 3; n_x = 3;

View File

@@ -86,6 +86,5 @@ void meta_window_actor_assign_surface_actor (MetaWindowActor *self,
MetaSurfaceActor *surface_actor); MetaSurfaceActor *surface_actor);
MetaWindowActor *meta_window_actor_from_window (MetaWindow *window); MetaWindowActor *meta_window_actor_from_window (MetaWindow *window);
MetaWindowActor *meta_window_actor_from_actor (ClutterActor *actor);
#endif /* META_WINDOW_ACTOR_PRIVATE_H */ #endif /* META_WINDOW_ACTOR_PRIVATE_H */

View File

@@ -288,13 +288,13 @@ is_argb32 (MetaWindowActor *self)
} }
static gboolean static gboolean
is_opaque (MetaWindowActor *self) is_non_opaque (MetaWindowActor *self)
{ {
MetaWindowActorPrivate *priv = MetaWindowActorPrivate *priv =
meta_window_actor_get_instance_private (self); meta_window_actor_get_instance_private (self);
MetaWindow *window = priv->window; MetaWindow *window = priv->window;
return !is_argb32 (self) && (window->opacity == 0xFF); return is_argb32 (self) || (window->opacity != 0xFF);
} }
static gboolean static gboolean
@@ -647,10 +647,7 @@ clip_shadow_under_window (MetaWindowActor *self)
MetaWindowActorPrivate *priv = MetaWindowActorPrivate *priv =
meta_window_actor_get_instance_private (self); meta_window_actor_get_instance_private (self);
if (priv->window->frame) return is_non_opaque (self) && priv->window->frame;
return TRUE;
return is_opaque (self);
} }
static void static void
@@ -686,7 +683,6 @@ meta_window_actor_paint (ClutterActor *actor)
meta_window_actor_get_shadow_bounds (self, appears_focused, &bounds); meta_window_actor_get_shadow_bounds (self, appears_focused, &bounds);
clip = cairo_region_create_rectangle (&bounds); clip = cairo_region_create_rectangle (&bounds);
if (frame_bounds)
cairo_region_subtract (clip, frame_bounds); cairo_region_subtract (clip, frame_bounds);
} }
@@ -791,7 +787,7 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
* Do not add shadows to non-opaque (ARGB32) windows, as we can't easily * Do not add shadows to non-opaque (ARGB32) windows, as we can't easily
* generate shadows for them. * generate shadows for them.
*/ */
if (!is_opaque (self)) if (is_non_opaque (self))
return FALSE; return FALSE;
/* /*
@@ -1355,7 +1351,6 @@ meta_window_actor_set_clip_region_beneath (MetaWindowActor *self,
if (clip_shadow_under_window (self)) if (clip_shadow_under_window (self))
{ {
cairo_region_t *frame_bounds = meta_window_get_frame_bounds (priv->window); cairo_region_t *frame_bounds = meta_window_get_frame_bounds (priv->window);
if (frame_bounds)
cairo_region_subtract (priv->shadow_clip, frame_bounds); cairo_region_subtract (priv->shadow_clip, frame_bounds);
} }
} }
@@ -1370,28 +1365,9 @@ meta_window_actor_cull_out (MetaCullable *cullable,
cairo_region_t *clip_region) cairo_region_t *clip_region)
{ {
MetaWindowActor *self = META_WINDOW_ACTOR (cullable); MetaWindowActor *self = META_WINDOW_ACTOR (cullable);
MetaWindowActorPrivate *priv =
meta_window_actor_get_instance_private (self);
meta_cullable_cull_out_children (cullable, unobscured_region, clip_region); meta_cullable_cull_out_children (cullable, unobscured_region, clip_region);
meta_window_actor_set_clip_region_beneath (self, clip_region); meta_window_actor_set_clip_region_beneath (self, clip_region);
if (unobscured_region && is_opaque (self))
{
cairo_region_t *region = meta_window_get_frame_bounds (priv->window);
if (region)
{
cairo_region_subtract (unobscured_region, region);
}
else
{
cairo_rectangle_int_t rect;
meta_window_get_frame_rect (priv->window, &rect);
rect.x = rect.y = 0;
cairo_region_subtract_rectangle (unobscured_region, &rect);
}
}
} }
static void static void
@@ -2059,21 +2035,3 @@ screen_cast_window_iface_init (MetaScreenCastWindowInterface *iface)
iface->capture_into = meta_window_actor_capture_into; iface->capture_into = meta_window_actor_capture_into;
iface->has_damage = meta_window_actor_has_damage; iface->has_damage = meta_window_actor_has_damage;
} }
MetaWindowActor *
meta_window_actor_from_actor (ClutterActor *actor)
{
if (!META_IS_SURFACE_ACTOR (actor))
return NULL;
do
{
actor = clutter_actor_get_parent (actor);
if (META_IS_WINDOW_ACTOR (actor))
return META_WINDOW_ACTOR (actor);
}
while (actor != NULL);
return NULL;
}

View File

@@ -50,6 +50,9 @@
#define META_IS_DEFAULT_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEFAULT_PLUGIN)) #define META_IS_DEFAULT_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEFAULT_PLUGIN))
#define META_DEFAULT_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEFAULT_PLUGIN, MetaDefaultPluginClass)) #define META_DEFAULT_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEFAULT_PLUGIN, MetaDefaultPluginClass))
#define META_DEFAULT_PLUGIN_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_DEFAULT_PLUGIN, MetaDefaultPluginPrivate))
typedef struct _MetaDefaultPlugin MetaDefaultPlugin; typedef struct _MetaDefaultPlugin MetaDefaultPlugin;
typedef struct _MetaDefaultPluginClass MetaDefaultPluginClass; typedef struct _MetaDefaultPluginClass MetaDefaultPluginClass;
typedef struct _MetaDefaultPluginPrivate MetaDefaultPluginPrivate; typedef struct _MetaDefaultPluginPrivate MetaDefaultPluginPrivate;
@@ -215,7 +218,7 @@ meta_default_plugin_init (MetaDefaultPlugin *self)
{ {
MetaDefaultPluginPrivate *priv; MetaDefaultPluginPrivate *priv;
self->priv = priv = meta_default_plugin_get_instance_private (self); self->priv = priv = META_DEFAULT_PLUGIN_GET_PRIVATE (self);
priv->info.name = "Default Effects"; priv->info.name = "Default Effects";
priv->info.version = "0.1"; priv->info.version = "0.1";

View File

@@ -264,7 +264,7 @@ struct _MetaDisplayClass
gboolean meta_display_open (void); gboolean meta_display_open (void);
void meta_display_manage_all_xwindows (MetaDisplay *display); void meta_display_manage_all_windows (MetaDisplay *display);
void meta_display_unmanage_windows (MetaDisplay *display, void meta_display_unmanage_windows (MetaDisplay *display,
guint32 timestamp); guint32 timestamp);

View File

@@ -49,7 +49,6 @@
#include "backends/x11/meta-backend-x11.h" #include "backends/x11/meta-backend-x11.h"
#include "backends/x11/cm/meta-backend-x11-cm.h" #include "backends/x11/cm/meta-backend-x11-cm.h"
#include "clutter/x11/clutter-x11.h" #include "clutter/x11/clutter-x11.h"
#include "compositor/compositor-private.h"
#include "core/bell.h" #include "core/bell.h"
#include "core/boxes-private.h" #include "core/boxes-private.h"
#include "core/display-private.h" #include "core/display-private.h"
@@ -150,7 +149,6 @@ enum
SHOWING_DESKTOP_CHANGED, SHOWING_DESKTOP_CHANGED,
RESTACKED, RESTACKED,
WORKAREAS_CHANGED, WORKAREAS_CHANGED,
INIT_XSERVER,
LAST_SIGNAL LAST_SIGNAL
}; };
@@ -481,13 +479,6 @@ meta_display_class_init (MetaDisplayClass *klass)
0, NULL, NULL, NULL, 0, NULL, NULL, NULL,
G_TYPE_NONE, 0); G_TYPE_NONE, 0);
display_signals[INIT_XSERVER] =
g_signal_new ("init-xserver",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_INT);
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_FOCUS_WINDOW, PROP_FOCUS_WINDOW,
g_param_spec_object ("focus-window", g_param_spec_object ("focus-window",
@@ -652,15 +643,10 @@ meta_display_init_x11 (MetaDisplay *display,
display->x11_display = x11_display; display->x11_display = x11_display;
g_signal_emit (display, display_signals[X11_DISPLAY_OPENED], 0); g_signal_emit (display, display_signals[X11_DISPLAY_OPENED], 0);
if (meta_get_x11_display_policy () == META_DISPLAY_POLICY_ON_DEMAND)
{
meta_x11_display_create_guard_window (x11_display); meta_x11_display_create_guard_window (x11_display);
if (!display->display_opening)
meta_display_manage_all_xwindows (display);
meta_compositor_redirect_x11_windows (display->compositor); if (!display->display_opening)
} meta_display_manage_all_windows (display);
return TRUE; return TRUE;
} }
@@ -772,7 +758,7 @@ meta_display_open (void)
display->selection = meta_selection_new (display); display->selection = meta_selection_new (display);
meta_clipboard_manager_init (display); meta_clipboard_manager_init (display);
if (meta_get_x11_display_policy () == META_DISPLAY_POLICY_MANDATORY) if (meta_should_autostart_x11_display ())
{ {
if (!meta_display_init_x11 (display, &error)) if (!meta_display_init_x11 (display, &error))
g_error ("Failed to start Xwayland: %s", error->message); g_error ("Failed to start Xwayland: %s", error->message);
@@ -811,7 +797,7 @@ meta_display_open (void)
* we start out with no windows. * we start out with no windows.
*/ */
if (!meta_is_wayland_compositor ()) if (!meta_is_wayland_compositor ())
meta_display_manage_all_xwindows (display); meta_display_manage_all_windows (display);
if (old_active_xwindow != None) if (old_active_xwindow != None)
{ {
@@ -2462,7 +2448,7 @@ meta_resize_gravity_from_grab_op (MetaGrabOp op)
} }
void void
meta_display_manage_all_xwindows (MetaDisplay *display) meta_display_manage_all_windows (MetaDisplay *display)
{ {
guint64 *_children; guint64 *_children;
guint64 *children; guint64 *children;
@@ -2476,8 +2462,7 @@ meta_display_manage_all_xwindows (MetaDisplay *display)
for (i = 0; i < n_children; ++i) for (i = 0; i < n_children; ++i)
{ {
if (!META_STACK_ID_IS_X11 (children[i])) g_assert (META_STACK_ID_IS_X11 (children[i]));
continue;
meta_window_x11_new (display, children[i], TRUE, meta_window_x11_new (display, children[i], TRUE,
META_COMP_EFFECT_NONE); META_COMP_EFFECT_NONE);
} }

View File

@@ -27,7 +27,7 @@
#include "backends/meta-cursor-tracker-private.h" #include "backends/meta-cursor-tracker-private.h"
#include "backends/meta-idle-monitor-private.h" #include "backends/meta-idle-monitor-private.h"
#include "backends/x11/meta-backend-x11.h" #include "backends/x11/meta-backend-x11.h"
#include "compositor/meta-window-actor-private.h" #include "compositor/meta-surface-actor.h"
#include "core/display-private.h" #include "core/display-private.h"
#include "core/window-private.h" #include "core/window-private.h"
#include "meta/meta-backend.h" #include "meta/meta-backend.h"
@@ -68,16 +68,14 @@ get_window_for_event (MetaDisplay *display,
case META_EVENT_ROUTE_NORMAL: case META_EVENT_ROUTE_NORMAL:
{ {
ClutterActor *source; ClutterActor *source;
MetaWindowActor *window_actor;
/* Always use the key focused window for key events. */ /* Always use the key focused window for key events. */
if (IS_KEY_EVENT (event)) if (IS_KEY_EVENT (event))
return stage_has_key_focus () ? display->focus_window : NULL; return stage_has_key_focus () ? display->focus_window : NULL;
source = clutter_event_get_source (event); source = clutter_event_get_source (event);
window_actor = meta_window_actor_from_actor (source); if (META_IS_SURFACE_ACTOR (source))
if (window_actor) return meta_surface_actor_get_window (META_SURFACE_ACTOR (source));
return meta_window_actor_get_meta_window (window_actor);
else else
return NULL; return NULL;
} }

View File

@@ -190,14 +190,9 @@ meta_window_destroy_frame (MetaWindow *window)
"Incrementing unmaps_pending on %s for reparent back to root\n", window->desc); "Incrementing unmaps_pending on %s for reparent back to root\n", window->desc);
window->unmaps_pending += 1; window->unmaps_pending += 1;
} }
if (!x11_display->closing)
{
meta_stack_tracker_record_add (window->display->stack_tracker, meta_stack_tracker_record_add (window->display->stack_tracker,
window->xwindow, window->xwindow,
XNextRequest (x11_display->xdisplay)); XNextRequest (x11_display->xdisplay));
}
XReparentWindow (x11_display->xdisplay, XReparentWindow (x11_display->xdisplay,
window->xwindow, window->xwindow,
x11_display->xroot, x11_display->xroot,

View File

@@ -154,7 +154,6 @@ GList *meta_prefs_get_keybindings (void);
void meta_prefs_get_overlay_binding (MetaKeyCombo *combo); void meta_prefs_get_overlay_binding (MetaKeyCombo *combo);
void meta_prefs_get_locate_pointer_binding (MetaKeyCombo *combo); void meta_prefs_get_locate_pointer_binding (MetaKeyCombo *combo);
const char *meta_prefs_get_iso_next_group_option (void); const char *meta_prefs_get_iso_next_group_option (void);
gboolean meta_prefs_is_locate_pointer_enabled (void);
void meta_x11_display_grab_keys (MetaX11Display *x11_display); void meta_x11_display_grab_keys (MetaX11Display *x11_display);
void meta_x11_display_ungrab_keys (MetaX11Display *x11_display); void meta_x11_display_ungrab_keys (MetaX11Display *x11_display);

View File

@@ -182,8 +182,8 @@ static gboolean process_keyboard_resize_grab (MetaDisplay *display,
MetaWindow *window, MetaWindow *window,
ClutterKeyEvent *event); ClutterKeyEvent *event);
static void maybe_update_locate_pointer_keygrab (MetaDisplay *display, static void grab_key_bindings (MetaDisplay *display);
gboolean grab); static void ungrab_key_bindings (MetaDisplay *display);
static GHashTable *key_handlers; static GHashTable *key_handlers;
static GHashTable *external_grabs; static GHashTable *external_grabs;
@@ -1345,10 +1345,6 @@ prefs_changed_callback (MetaPreference pref,
switch (pref) switch (pref)
{ {
case META_PREF_LOCATE_POINTER:
maybe_update_locate_pointer_keygrab (display,
meta_prefs_is_locate_pointer_enabled());
break;
case META_PREF_KEYBINDINGS: case META_PREF_KEYBINDINGS:
ungrab_key_bindings (display); ungrab_key_bindings (display);
rebuild_key_binding_table (keys); rebuild_key_binding_table (keys);
@@ -1470,12 +1466,6 @@ change_keygrab_foreach (gpointer key,
if (data->only_per_window != binding_is_per_window) if (data->only_per_window != binding_is_per_window)
return; return;
/* Ignore the key bindings marked as META_KEY_BINDING_NO_AUTO_GRAB,
* those are handled separately
*/
if (binding->flags & META_KEY_BINDING_NO_AUTO_GRAB)
return;
if (binding->resolved_combo.len == 0) if (binding->resolved_combo.len == 0)
return; return;
@@ -1498,21 +1488,6 @@ change_binding_keygrabs (MetaKeyBindingManager *keys,
g_hash_table_foreach (keys->key_bindings, change_keygrab_foreach, &data); g_hash_table_foreach (keys->key_bindings, change_keygrab_foreach, &data);
} }
static void
maybe_update_locate_pointer_keygrab (MetaDisplay *display,
gboolean grab)
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
if (!display->x11_display)
return;
if (keys->locate_pointer_resolved_key_combo.len != 0)
meta_change_keygrab (keys, display->x11_display->xroot,
(!!grab & !!meta_prefs_is_locate_pointer_enabled()),
&keys->locate_pointer_resolved_key_combo);
}
static void static void
meta_x11_display_change_keygrabs (MetaX11Display *x11_display, meta_x11_display_change_keygrabs (MetaX11Display *x11_display,
gboolean grab) gboolean grab)
@@ -1524,7 +1499,9 @@ meta_x11_display_change_keygrabs (MetaX11Display *x11_display,
meta_change_keygrab (keys, x11_display->xroot, meta_change_keygrab (keys, x11_display->xroot,
grab, &keys->overlay_resolved_key_combo); grab, &keys->overlay_resolved_key_combo);
maybe_update_locate_pointer_keygrab (x11_display->display, grab); if (keys->locate_pointer_resolved_key_combo.len != 0)
meta_change_keygrab (keys, x11_display->xroot,
grab, &keys->locate_pointer_resolved_key_combo);
for (i = 0; i < keys->n_iso_next_group_combos; i++) for (i = 0; i < keys->n_iso_next_group_combos; i++)
meta_change_keygrab (keys, x11_display->xroot, meta_change_keygrab (keys, x11_display->xroot,
@@ -1570,8 +1547,6 @@ meta_window_grab_keys (MetaWindow *window)
MetaDisplay *display = window->display; MetaDisplay *display = window->display;
MetaKeyBindingManager *keys = &display->key_binding_manager; MetaKeyBindingManager *keys = &display->key_binding_manager;
if (!meta_is_wayland_compositor ())
return;
if (window->all_keys_grabbed) if (window->all_keys_grabbed)
return; return;
@@ -1606,7 +1581,7 @@ meta_window_grab_keys (MetaWindow *window)
void void
meta_window_ungrab_keys (MetaWindow *window) meta_window_ungrab_keys (MetaWindow *window)
{ {
if (!meta_is_wayland_compositor () && window->keys_grabbed) if (window->keys_grabbed)
{ {
MetaDisplay *display = window->display; MetaDisplay *display = window->display;
MetaKeyBindingManager *keys = &display->key_binding_manager; MetaKeyBindingManager *keys = &display->key_binding_manager;
@@ -1665,11 +1640,7 @@ meta_display_grab_accelerator (MetaDisplay *display,
return META_KEYBINDING_ACTION_NONE; return META_KEYBINDING_ACTION_NONE;
} }
if (!meta_is_wayland_compositor ()) meta_change_keygrab (keys, display->x11_display->xroot, TRUE, &resolved_combo);
{
meta_change_keygrab (keys, display->x11_display->xroot,
TRUE, &resolved_combo);
}
grab = g_new0 (MetaKeyGrab, 1); grab = g_new0 (MetaKeyGrab, 1);
grab->action = next_dynamic_keybinding_action (); grab->action = next_dynamic_keybinding_action ();
@@ -1715,11 +1686,8 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
{ {
int i; int i;
if (!meta_is_wayland_compositor ())
{
meta_change_keygrab (keys, display->x11_display->xroot, meta_change_keygrab (keys, display->x11_display->xroot,
FALSE, &binding->resolved_combo); FALSE, &binding->resolved_combo);
}
for (i = 0; i < binding->resolved_combo.len; i++) for (i = 0; i < binding->resolved_combo.len; i++)
{ {
@@ -1797,7 +1765,7 @@ meta_window_grab_all_keys (MetaWindow *window,
guint32 timestamp) guint32 timestamp)
{ {
Window grabwindow; Window grabwindow;
gboolean retval = TRUE; gboolean retval;
if (window->all_keys_grabbed) if (window->all_keys_grabbed)
return FALSE; return FALSE;
@@ -1813,8 +1781,6 @@ meta_window_grab_all_keys (MetaWindow *window,
window->desc); window->desc);
meta_window_focus (window, timestamp); meta_window_focus (window, timestamp);
if (!meta_is_wayland_compositor ())
{
grabwindow = meta_window_x11_get_toplevel_xwindow (window); grabwindow = meta_window_x11_get_toplevel_xwindow (window);
meta_topic (META_DEBUG_KEYBINDINGS, meta_topic (META_DEBUG_KEYBINDINGS,
@@ -1826,16 +1792,14 @@ meta_window_grab_all_keys (MetaWindow *window,
window->all_keys_grabbed = TRUE; window->all_keys_grabbed = TRUE;
window->grab_on_frame = window->frame != NULL; window->grab_on_frame = window->frame != NULL;
} }
}
return retval; return retval;
} }
void void
meta_window_ungrab_all_keys (MetaWindow *window, meta_window_ungrab_all_keys (MetaWindow *window, guint32 timestamp)
guint32 timestamp)
{ {
if (!meta_is_wayland_compositor () && window->all_keys_grabbed) if (window->all_keys_grabbed)
{ {
ungrab_keyboard (timestamp); ungrab_keyboard (timestamp);
@@ -4489,13 +4453,13 @@ meta_display_init_keys (MetaDisplay *display)
handler = g_new0 (MetaKeyHandler, 1); handler = g_new0 (MetaKeyHandler, 1);
handler->name = g_strdup ("overlay-key"); handler->name = g_strdup ("overlay-key");
handler->flags = META_KEY_BINDING_BUILTIN | META_KEY_BINDING_NO_AUTO_GRAB; handler->flags = META_KEY_BINDING_BUILTIN;
g_hash_table_insert (key_handlers, g_strdup (handler->name), handler); g_hash_table_insert (key_handlers, g_strdup (handler->name), handler);
handler = g_new0 (MetaKeyHandler, 1); handler = g_new0 (MetaKeyHandler, 1);
handler->name = g_strdup ("locate-pointer-key"); handler->name = g_strdup ("locate-pointer-key");
handler->flags = META_KEY_BINDING_BUILTIN | META_KEY_BINDING_NO_AUTO_GRAB; handler->flags = META_KEY_BINDING_BUILTIN;
g_hash_table_insert (key_handlers, g_strdup (handler->name), handler); g_hash_table_insert (key_handlers, g_strdup (handler->name), handler);

View File

@@ -30,17 +30,10 @@ typedef enum _MetaCompositorType
META_COMPOSITOR_TYPE_X11, META_COMPOSITOR_TYPE_X11,
} MetaCompositorType; } MetaCompositorType;
typedef enum _MetaDisplayPolicy
{
META_DISPLAY_POLICY_MANDATORY,
META_DISPLAY_POLICY_ON_DEMAND,
META_DISPLAY_POLICY_DISABLED,
} MetaDisplayPolicy;
META_EXPORT_TEST META_EXPORT_TEST
void meta_override_compositor_configuration (MetaCompositorType compositor_type, void meta_override_compositor_configuration (MetaCompositorType compositor_type,
GType backend_gtype); GType backend_gtype);
MetaDisplayPolicy meta_get_x11_display_policy (void); gboolean meta_should_autostart_x11_display (void);
#endif /* META_MAIN_PRIVATE_H */ #endif /* META_MAIN_PRIVATE_H */

View File

@@ -717,27 +717,15 @@ prefs_changed_callback (MetaPreference pref,
} }
} }
MetaDisplayPolicy gboolean
meta_get_x11_display_policy (void) meta_should_autostart_x11_display (void)
{ {
MetaBackend *backend = meta_get_backend (); MetaBackend *backend = meta_get_backend ();
gboolean wants_x11 = TRUE;
if (META_IS_BACKEND_X11_CM (backend))
return META_DISPLAY_POLICY_MANDATORY;
#ifdef HAVE_WAYLAND #ifdef HAVE_WAYLAND
if (meta_is_wayland_compositor ()) wants_x11 = !opt_no_x11;
{
MetaSettings *settings = meta_backend_get_settings (backend);
if (opt_no_x11)
return META_DISPLAY_POLICY_DISABLED;
if (meta_settings_is_experimental_feature_enabled (settings,
META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND))
return META_DISPLAY_POLICY_ON_DEMAND;
}
#endif #endif
return META_DISPLAY_POLICY_MANDATORY; return META_IS_BACKEND_X11_CM (backend) || wants_x11;
} }

View File

@@ -114,7 +114,7 @@ meta_launch_context_constructed (GObject *object)
G_OBJECT_CLASS (meta_launch_context_parent_class)->constructed (object); G_OBJECT_CLASS (meta_launch_context_parent_class)->constructed (object);
x11_display = meta_x11_get_display_name (); x11_display = getenv ("DISPLAY");
wayland_display = getenv ("WAYLAND_DISPLAY"); wayland_display = getenv ("WAYLAND_DISPLAY");
if (x11_display) if (x11_display)

View File

@@ -150,7 +150,8 @@ meta_workspace_manager_class_init (MetaWorkspaceManagerClass *klass)
G_TYPE_INT, G_TYPE_INT,
META_TYPE_MOTION_DIRECTION); META_TYPE_MOTION_DIRECTION);
/* Emitted when calling meta_workspace_manager_reorder_workspace. /**
* Emitted when calling meta_workspace_manager_reorder_workspace.
* *
* This signal is emitted when a workspace has been reordered to * This signal is emitted when a workspace has been reordered to
* a different index. Note that other workspaces can change * a different index. Note that other workspaces can change

View File

@@ -60,7 +60,6 @@
#define KEY_OVERLAY_KEY "overlay-key" #define KEY_OVERLAY_KEY "overlay-key"
#define KEY_WORKSPACES_ONLY_ON_PRIMARY "workspaces-only-on-primary" #define KEY_WORKSPACES_ONLY_ON_PRIMARY "workspaces-only-on-primary"
#define KEY_LOCATE_POINTER "locate-pointer"
/* These are the different schemas we are keeping /* These are the different schemas we are keeping
* a GSettings instance for */ * a GSettings instance for */
@@ -101,7 +100,6 @@ static gboolean bell_is_visible = FALSE;
static gboolean bell_is_audible = TRUE; static gboolean bell_is_audible = TRUE;
static gboolean gnome_accessibility = FALSE; static gboolean gnome_accessibility = FALSE;
static gboolean gnome_animations = TRUE; static gboolean gnome_animations = TRUE;
static gboolean locate_pointer_is_enabled = FALSE;
static char *cursor_theme = NULL; static char *cursor_theme = NULL;
/* cursor_size will, when running as an X11 compositing window manager, be the /* cursor_size will, when running as an X11 compositing window manager, be the
* actual cursor size, multiplied with the global window scaling factor. On * actual cursor size, multiplied with the global window scaling factor. On
@@ -149,7 +147,6 @@ static gboolean mouse_button_mods_handler (GVariant*, gpointer*, gpointer);
static gboolean button_layout_handler (GVariant*, gpointer*, gpointer); static gboolean button_layout_handler (GVariant*, gpointer*, gpointer);
static gboolean overlay_key_handler (GVariant*, gpointer*, gpointer); static gboolean overlay_key_handler (GVariant*, gpointer*, gpointer);
static gboolean locate_pointer_key_handler (GVariant*, gpointer*, gpointer); static gboolean locate_pointer_key_handler (GVariant*, gpointer*, gpointer);
static gboolean iso_next_group_handler (GVariant*, gpointer*, gpointer); static gboolean iso_next_group_handler (GVariant*, gpointer*, gpointer);
static void init_bindings (void); static void init_bindings (void);
@@ -387,13 +384,6 @@ static MetaBoolPreference preferences_bool[] =
}, },
&auto_maximize, &auto_maximize,
}, },
{
{ KEY_LOCATE_POINTER,
SCHEMA_INTERFACE,
META_PREF_LOCATE_POINTER,
},
&locate_pointer_is_enabled,
},
{ { NULL, 0, 0 }, NULL }, { { NULL, 0, 0 }, NULL },
}; };
@@ -970,8 +960,6 @@ meta_prefs_init (void)
G_CALLBACK (settings_changed), NULL); G_CALLBACK (settings_changed), NULL);
g_signal_connect (settings, "changed::" KEY_GNOME_CURSOR_SIZE, g_signal_connect (settings, "changed::" KEY_GNOME_CURSOR_SIZE,
G_CALLBACK (settings_changed), NULL); G_CALLBACK (settings_changed), NULL);
g_signal_connect (settings, "changed::" KEY_LOCATE_POINTER,
G_CALLBACK (settings_changed), NULL);
g_hash_table_insert (settings_schemas, g_strdup (SCHEMA_INTERFACE), settings); g_hash_table_insert (settings_schemas, g_strdup (SCHEMA_INTERFACE), settings);
settings = g_settings_new (SCHEMA_INPUT_SOURCES); settings = g_settings_new (SCHEMA_INPUT_SOURCES);
@@ -1692,9 +1680,6 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_AUTO_MAXIMIZE: case META_PREF_AUTO_MAXIMIZE:
return "AUTO_MAXIMIZE"; return "AUTO_MAXIMIZE";
case META_PREF_LOCATE_POINTER:
return "LOCATE_POINTER";
} }
return "(unknown)"; return "(unknown)";
@@ -2035,12 +2020,6 @@ meta_prefs_get_locate_pointer_binding (MetaKeyCombo *combo)
*combo = locate_pointer_key_combo; *combo = locate_pointer_key_combo;
} }
gboolean
meta_prefs_is_locate_pointer_enabled (void)
{
return locate_pointer_is_enabled;
}
const char * const char *
meta_prefs_get_iso_next_group_option (void) meta_prefs_get_iso_next_group_option (void)
{ {

View File

@@ -508,42 +508,6 @@ query_xserver_stack (MetaDisplay *display,
XFree (children); XFree (children);
} }
static void
drop_x11_windows (MetaDisplay *display,
MetaStackTracker *tracker)
{
GArray *new_stack;
GList *l;
int i;
tracker->xserver_serial = 0;
new_stack = g_array_new (FALSE, FALSE, sizeof (guint64));
for (i = 0; i < tracker->verified_stack->len; i++)
{
guint64 window = g_array_index (tracker->verified_stack, guint64, i);
if (!META_STACK_ID_IS_X11 (window))
g_array_append_val (new_stack, window);
}
g_array_unref (tracker->verified_stack);
tracker->verified_stack = new_stack;
l = tracker->unverified_predictions->head;
while (l)
{
MetaStackOp *op = l->data;
GList *next = l->next;
if (META_STACK_ID_IS_X11 (op->any.window))
g_queue_remove (tracker->unverified_predictions, op);
l = next;
}
}
MetaStackTracker * MetaStackTracker *
meta_stack_tracker_new (MetaDisplay *display) meta_stack_tracker_new (MetaDisplay *display)
{ {
@@ -559,10 +523,6 @@ meta_stack_tracker_new (MetaDisplay *display)
"x11-display-opened", "x11-display-opened",
G_CALLBACK (query_xserver_stack), G_CALLBACK (query_xserver_stack),
tracker); tracker);
g_signal_connect (display,
"x11-display-closing",
G_CALLBACK (drop_x11_windows),
tracker);
meta_stack_tracker_dump (tracker); meta_stack_tracker_dump (tracker);
@@ -586,9 +546,6 @@ meta_stack_tracker_free (MetaStackTracker *tracker)
g_signal_handlers_disconnect_by_func (tracker->display, g_signal_handlers_disconnect_by_func (tracker->display,
(gpointer)query_xserver_stack, (gpointer)query_xserver_stack,
tracker); tracker);
g_signal_handlers_disconnect_by_func (tracker->display,
drop_x11_windows,
tracker);
g_free (tracker); g_free (tracker);
} }

View File

@@ -1296,7 +1296,8 @@ _meta_window_shared_new (MetaDisplay *display,
window->transient_for->on_all_workspaces_requested, window->transient_for->on_all_workspaces_requested,
window->transient_for->workspace); window->transient_for->workspace);
} }
else if (window->on_all_workspaces)
if (window->on_all_workspaces)
{ {
meta_topic (META_DEBUG_PLACEMENT, meta_topic (META_DEBUG_PLACEMENT,
"Putting window %s on all workspaces\n", "Putting window %s on all workspaces\n",
@@ -7100,9 +7101,9 @@ meta_window_set_user_time (MetaWindow *window,
if (meta_prefs_get_focus_new_windows () == G_DESKTOP_FOCUS_NEW_WINDOWS_STRICT && if (meta_prefs_get_focus_new_windows () == G_DESKTOP_FOCUS_NEW_WINDOWS_STRICT &&
window_is_terminal (window)) window_is_terminal (window))
window->display->allow_terminal_deactivation = FALSE; window->display->allow_terminal_deactivation = FALSE;
}
g_object_notify_by_pspec (G_OBJECT (window), obj_props[PROP_USER_TIME]); g_object_notify_by_pspec (G_OBJECT (window), obj_props[PROP_USER_TIME]);
}
} }
/** /**

View File

@@ -657,14 +657,6 @@ dbus_idle_monitor_built_sources = gnome.gdbus_codegen('meta-dbus-idle-monitor',
) )
mutter_built_sources += dbus_idle_monitor_built_sources mutter_built_sources += dbus_idle_monitor_built_sources
mutter_marshal = gnome.genmarshal('meta-marshal',
sources: ['meta-marshal.list'],
prefix: 'meta_marshal',
internal: true,
valist_marshallers: true,
)
mutter_built_sources += mutter_marshal
if have_profiler if have_profiler
mutter_sources += [ mutter_sources += [
'backends/meta-profiler.c', 'backends/meta-profiler.c',

View File

@@ -1 +0,0 @@
VOID:FLOAT,FLOAT

View File

@@ -65,7 +65,6 @@
* @META_PREF_AUTO_MAXIMIZE: auto-maximize * @META_PREF_AUTO_MAXIMIZE: auto-maximize
* @META_PREF_CENTER_NEW_WINDOWS: center new windows * @META_PREF_CENTER_NEW_WINDOWS: center new windows
* @META_PREF_DRAG_THRESHOLD: drag threshold * @META_PREF_DRAG_THRESHOLD: drag threshold
* @META_PREF_LOCATE_POINTER: show pointer location
*/ */
/* Keep in sync with GSettings schemas! */ /* Keep in sync with GSettings schemas! */
@@ -104,7 +103,6 @@ typedef enum
META_PREF_AUTO_MAXIMIZE, META_PREF_AUTO_MAXIMIZE,
META_PREF_CENTER_NEW_WINDOWS, META_PREF_CENTER_NEW_WINDOWS,
META_PREF_DRAG_THRESHOLD, META_PREF_DRAG_THRESHOLD,
META_PREF_LOCATE_POINTER,
} MetaPreference; } MetaPreference;
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref, typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
@@ -438,7 +436,6 @@ typedef enum _MetaKeyBindingAction
* @META_KEY_BINDING_BUILTIN: built-in * @META_KEY_BINDING_BUILTIN: built-in
* @META_KEY_BINDING_IS_REVERSED: is reversed * @META_KEY_BINDING_IS_REVERSED: is reversed
* @META_KEY_BINDING_NON_MASKABLE: always active * @META_KEY_BINDING_NON_MASKABLE: always active
* @META_KEY_BINDING_NO_AUTO_GRAB: not grabbed automatically
*/ */
typedef enum typedef enum
{ {
@@ -448,7 +445,6 @@ typedef enum
META_KEY_BINDING_IS_REVERSED = 1 << 2, META_KEY_BINDING_IS_REVERSED = 1 << 2,
META_KEY_BINDING_NON_MASKABLE = 1 << 3, META_KEY_BINDING_NON_MASKABLE = 1 << 3,
META_KEY_BINDING_IGNORE_AUTOREPEAT = 1 << 4, META_KEY_BINDING_IGNORE_AUTOREPEAT = 1 << 4,
META_KEY_BINDING_NO_AUTO_GRAB = 1 << 5,
} MetaKeyBindingFlags; } MetaKeyBindingFlags;
/** /**

View File

@@ -566,7 +566,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
} }
else else
memmove (&(rect->clickable), &(rect->visible), sizeof (rect->clickable)); g_memmove (&(rect->clickable), &(rect->visible), sizeof(rect->clickable));
x = rect->visible.x - layout->button_margin.left * scale; x = rect->visible.x - layout->button_margin.left * scale;
@@ -613,7 +613,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
rect->clickable.height = button_height + button_y; rect->clickable.height = button_height + button_y;
} }
else else
memmove (&(rect->clickable), &(rect->visible), sizeof (rect->clickable)); g_memmove (&(rect->clickable), &(rect->visible), sizeof(rect->clickable));
x = rect->visible.x + rect->visible.width + layout->button_margin.right * scale; x = rect->visible.x + rect->visible.width + layout->button_margin.right * scale;
if (i < n_left - 1) if (i < n_left - 1)

View File

@@ -289,7 +289,6 @@ egl_image_buffer_attach (MetaWaylandBuffer *buffer,
int format, width, height, y_inverted; int format, width, height, y_inverted;
CoglPixelFormat cogl_format; CoglPixelFormat cogl_format;
EGLImageKHR egl_image; EGLImageKHR egl_image;
CoglEglImageFlags flags;
CoglTexture2D *texture_2d; CoglTexture2D *texture_2d;
if (buffer->egl_image.texture) if (buffer->egl_image.texture)
@@ -344,12 +343,10 @@ egl_image_buffer_attach (MetaWaylandBuffer *buffer,
if (egl_image == EGL_NO_IMAGE_KHR) if (egl_image == EGL_NO_IMAGE_KHR)
return FALSE; return FALSE;
flags = COGL_EGL_IMAGE_FLAG_NONE;
texture_2d = cogl_egl_texture_2d_new_from_image (cogl_context, texture_2d = cogl_egl_texture_2d_new_from_image (cogl_context,
width, height, width, height,
cogl_format, cogl_format,
egl_image, egl_image,
flags,
error); error);
meta_egl_destroy_image (egl, egl_display, egl_image, NULL); meta_egl_destroy_image (egl, egl_display, egl_image, NULL);

View File

@@ -79,7 +79,6 @@ meta_wayland_dma_buf_realize_texture (MetaWaylandBuffer *buffer,
uint64_t modifiers[META_WAYLAND_DMA_BUF_MAX_FDS]; uint64_t modifiers[META_WAYLAND_DMA_BUF_MAX_FDS];
CoglPixelFormat cogl_format; CoglPixelFormat cogl_format;
EGLImageKHR egl_image; EGLImageKHR egl_image;
CoglEglImageFlags flags;
CoglTexture2D *texture; CoglTexture2D *texture;
if (buffer->dma_buf.texture) if (buffer->dma_buf.texture)
@@ -135,13 +134,11 @@ meta_wayland_dma_buf_realize_texture (MetaWaylandBuffer *buffer,
if (egl_image == EGL_NO_IMAGE_KHR) if (egl_image == EGL_NO_IMAGE_KHR)
return FALSE; return FALSE;
flags = COGL_EGL_IMAGE_FLAG_NO_GET_DATA;
texture = cogl_egl_texture_2d_new_from_image (cogl_context, texture = cogl_egl_texture_2d_new_from_image (cogl_context,
dma_buf->width, dma_buf->width,
dma_buf->height, dma_buf->height,
cogl_format, cogl_format,
egl_image, egl_image,
flags,
error); error);
meta_egl_destroy_image (egl, egl_display, egl_image, NULL); meta_egl_destroy_image (egl, egl_display, egl_image, NULL);

View File

@@ -48,26 +48,16 @@ typedef struct
char *lock_file; char *lock_file;
int abstract_fd; int abstract_fd;
int unix_fd; int unix_fd;
char *name;
} MetaXWaylandConnection;
typedef struct
{
MetaXWaylandConnection private_connection;
MetaXWaylandConnection public_connection;
guint xserver_grace_period_id;
struct wl_display *wayland_display; struct wl_display *wayland_display;
struct wl_client *client; struct wl_client *client;
struct wl_resource *xserver_resource; struct wl_resource *xserver_resource;
char *display_name;
char *auth_file; char *auth_file;
GCancellable *xserver_died_cancellable; GCancellable *xserver_died_cancellable;
GSubprocess *proc; GSubprocess *proc;
GMainLoop *init_loop; GMainLoop *init_loop;
GList *x11_windows;
MetaXWaylandDnd *dnd; MetaXWaylandDnd *dnd;
} MetaXWaylandManager; } MetaXWaylandManager;

View File

@@ -418,9 +418,9 @@ meta_wayland_init (void)
meta_wayland_eglstream_controller_init (compositor); meta_wayland_eglstream_controller_init (compositor);
#endif #endif
if (meta_get_x11_display_policy () != META_DISPLAY_POLICY_DISABLED) if (meta_should_autostart_x11_display ())
{ {
if (!meta_xwayland_init (&compositor->xwayland_manager, compositor->wayland_display)) if (!meta_xwayland_start (&compositor->xwayland_manager, compositor->wayland_display))
g_error ("Failed to start X Wayland"); g_error ("Failed to start X Wayland");
} }
@@ -443,9 +443,9 @@ meta_wayland_init (void)
compositor->display_name = g_strdup (display_name); compositor->display_name = g_strdup (display_name);
} }
if (meta_get_x11_display_policy () != META_DISPLAY_POLICY_DISABLED) if (meta_should_autostart_x11_display ())
{ {
set_gnome_env ("DISPLAY", compositor->xwayland_manager.public_connection.name); set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor));
set_gnome_env ("XAUTHORITY", meta_wayland_get_xwayland_auth_file (compositor)); set_gnome_env ("XAUTHORITY", meta_wayland_get_xwayland_auth_file (compositor));
} }
@@ -461,7 +461,7 @@ meta_wayland_get_wayland_display_name (MetaWaylandCompositor *compositor)
const char * const char *
meta_wayland_get_xwayland_display_name (MetaWaylandCompositor *compositor) meta_wayland_get_xwayland_display_name (MetaWaylandCompositor *compositor)
{ {
return compositor->xwayland_manager.private_connection.name; return compositor->xwayland_manager.display_name;
} }
void void
@@ -471,7 +471,7 @@ meta_wayland_finalize (void)
compositor = meta_wayland_compositor_get_default (); compositor = meta_wayland_compositor_get_default ();
meta_xwayland_shutdown (&compositor->xwayland_manager); meta_xwayland_stop (&compositor->xwayland_manager);
g_clear_pointer (&compositor->display_name, g_free); g_clear_pointer (&compositor->display_name, g_free);
} }

View File

@@ -25,14 +25,14 @@
#include "wayland/meta-wayland-private.h" #include "wayland/meta-wayland-private.h"
gboolean gboolean
meta_xwayland_init (MetaXWaylandManager *manager, meta_xwayland_start (MetaXWaylandManager *manager,
struct wl_display *display); struct wl_display *display);
void void
meta_xwayland_complete_init (MetaDisplay *display); meta_xwayland_complete_init (MetaDisplay *display);
void void
meta_xwayland_shutdown (MetaXWaylandManager *manager); meta_xwayland_stop (MetaXWaylandManager *manager);
/* wl_data_device/X11 selection interoperation */ /* wl_data_device/X11 selection interoperation */
void meta_xwayland_init_dnd (void); void meta_xwayland_init_dnd (void);

View File

@@ -41,7 +41,6 @@
#include "compositor/meta-surface-actor-wayland.h" #include "compositor/meta-surface-actor-wayland.h"
#include "compositor/meta-window-actor-private.h" #include "compositor/meta-window-actor-private.h"
#include "core/main-private.h"
#include "meta/main.h" #include "meta/main.h"
#include "wayland/meta-wayland-actor-surface.h" #include "wayland/meta-wayland-actor-surface.h"
@@ -71,8 +70,6 @@ G_DEFINE_TYPE (MetaWaylandSurfaceRoleXWayland,
static int display_number_override = -1; static int display_number_override = -1;
static void meta_xwayland_stop_xserver (MetaXWaylandManager *manager);
void void
meta_xwayland_associate_window_with_surface (MetaWindow *window, meta_xwayland_associate_window_with_surface (MetaWindow *window,
MetaWaylandSurface *surface) MetaWaylandSurface *surface)
@@ -371,44 +368,23 @@ xserver_died (GObject *source,
g_warning ("Failed to finish waiting for Xwayland: %s", error->message); g_warning ("Failed to finish waiting for Xwayland: %s", error->message);
} }
else if (!g_subprocess_get_successful (proc)) else if (!g_subprocess_get_successful (proc))
g_warning ("X Wayland process exited"); g_warning ("X Wayland crashed; exiting");
else
if (meta_get_x11_display_policy () == META_DISPLAY_POLICY_MANDATORY)
{ {
/* For now we simply abort if we see the server exit.
*
* In the future X will only be loaded lazily for legacy X support
* but for now it's a hard requirement. */
g_warning ("Spurious exit of X Wayland server");
}
meta_exit (META_EXIT_ERROR); meta_exit (META_EXIT_ERROR);
}
else if (meta_get_x11_display_policy () == META_DISPLAY_POLICY_ON_DEMAND)
{
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
MetaDisplay *display = meta_get_display ();
if (display->x11_display)
meta_display_shutdown_x11 (display);
if (!meta_xwayland_init (&compositor->xwayland_manager,
compositor->wayland_display))
g_warning ("Failed to init X sockets");
}
}
static gboolean
shutdown_xwayland_cb (gpointer data)
{
MetaXWaylandManager *manager = data;
g_debug ("Shutting down Xwayland");
manager->xserver_grace_period_id = 0;
meta_display_shutdown_x11 (meta_get_display ());
meta_xwayland_stop_xserver (manager);
return G_SOURCE_REMOVE;
} }
static int static int
x_io_error (Display *display) x_io_error (Display *display)
{ {
g_warning ("Connection to xwayland lost"); g_warning ("Connection to xwayland lost");
if (meta_get_x11_display_policy () == META_DISPLAY_POLICY_MANDATORY)
meta_exit (META_EXIT_ERROR); meta_exit (META_EXIT_ERROR);
return 0; return 0;
@@ -421,36 +397,7 @@ meta_xwayland_override_display_number (int number)
} }
static gboolean static gboolean
open_display_sockets (MetaXWaylandManager *manager, choose_xdisplay (MetaXWaylandManager *manager)
int display_index,
int *abstract_fd_out,
int *unix_fd_out,
gboolean *fatal)
{
int abstract_fd, unix_fd;
abstract_fd = bind_to_abstract_socket (display_index,
fatal);
if (abstract_fd < 0)
return FALSE;
unix_fd = bind_to_unix_socket (display_index);
if (unix_fd < 0)
{
*fatal = FALSE;
close (abstract_fd);
return FALSE;
}
*abstract_fd_out = abstract_fd;
*unix_fd_out = unix_fd;
return TRUE;
}
static gboolean
choose_xdisplay (MetaXWaylandManager *manager,
MetaXWaylandConnection *connection)
{ {
int display = 0; int display = 0;
char *lock_file = NULL; char *lock_file = NULL;
@@ -470,10 +417,8 @@ choose_xdisplay (MetaXWaylandManager *manager,
return FALSE; return FALSE;
} }
if (!open_display_sockets (manager, display, manager->abstract_fd = bind_to_abstract_socket (display, &fatal);
&connection->abstract_fd, if (manager->abstract_fd < 0)
&connection->unix_fd,
&fatal))
{ {
unlink (lock_file); unlink (lock_file);
@@ -484,18 +429,27 @@ choose_xdisplay (MetaXWaylandManager *manager,
} }
else else
{ {
g_warning ("Failed to bind X11 socket"); g_warning ("Failed to bind abstract socket");
return FALSE; return FALSE;
} }
} }
manager->unix_fd = bind_to_unix_socket (display);
if (manager->unix_fd < 0)
{
unlink (lock_file);
close (manager->abstract_fd);
display++;
continue;
}
break; break;
} }
while (1); while (1);
connection->display_index = display; manager->display_index = display;
connection->name = g_strdup_printf (":%d", connection->display_index); manager->display_name = g_strdup_printf (":%d", manager->display_index);
connection->lock_file = lock_file; manager->lock_file = lock_file;
return TRUE; return TRUE;
} }
@@ -582,7 +536,6 @@ on_displayfd_ready (int fd,
gpointer user_data) gpointer user_data)
{ {
MetaXWaylandManager *manager = user_data; MetaXWaylandManager *manager = user_data;
MetaDisplay *display = meta_get_display ();
/* The server writes its display name to the displayfd /* The server writes its display name to the displayfd
* socket when it's ready. We don't care about the data * socket when it's ready. We don't care about the data
@@ -590,17 +543,11 @@ on_displayfd_ready (int fd,
* that means it's ready. */ * that means it's ready. */
xserver_finished_init (manager); xserver_finished_init (manager);
g_signal_emit_by_name (display, "init-xserver",
manager->private_connection.display_index);
if (meta_get_x11_display_policy () == META_DISPLAY_POLICY_ON_DEMAND)
meta_display_init_x11 (display, NULL);
return G_SOURCE_REMOVE; return G_SOURCE_REMOVE;
} }
static gboolean static gboolean
meta_xwayland_start_xserver (MetaXWaylandManager *manager) meta_xwayland_init_xserver (MetaXWaylandManager *manager)
{ {
int xwayland_client_fd[2]; int xwayland_client_fd[2];
int displayfd[2]; int displayfd[2];
@@ -634,15 +581,14 @@ meta_xwayland_start_xserver (MetaXWaylandManager *manager)
launcher = g_subprocess_launcher_new (flags); launcher = g_subprocess_launcher_new (flags);
g_subprocess_launcher_take_fd (launcher, xwayland_client_fd[1], 3); g_subprocess_launcher_take_fd (launcher, xwayland_client_fd[1], 3);
g_subprocess_launcher_take_fd (launcher, manager->public_connection.abstract_fd, 4); g_subprocess_launcher_take_fd (launcher, manager->abstract_fd, 4);
g_subprocess_launcher_take_fd (launcher, manager->public_connection.unix_fd, 5); g_subprocess_launcher_take_fd (launcher, manager->unix_fd, 5);
g_subprocess_launcher_take_fd (launcher, displayfd[1], 6); g_subprocess_launcher_take_fd (launcher, displayfd[1], 6);
g_subprocess_launcher_take_fd (launcher, manager->private_connection.abstract_fd, 7);
g_subprocess_launcher_setenv (launcher, "WAYLAND_SOCKET", "3", TRUE); g_subprocess_launcher_setenv (launcher, "WAYLAND_SOCKET", "3", TRUE);
manager->proc = g_subprocess_launcher_spawn (launcher, &error, manager->proc = g_subprocess_launcher_spawn (launcher, &error,
XWAYLAND_PATH, manager->public_connection.name, XWAYLAND_PATH, manager->display_name,
"-rootless", "-rootless",
"-noreset", "-noreset",
"-accessx", "-accessx",
@@ -651,7 +597,6 @@ meta_xwayland_start_xserver (MetaXWaylandManager *manager)
"-listen", "4", "-listen", "4",
"-listen", "5", "-listen", "5",
"-displayfd", "6", "-displayfd", "6",
"-initfd", "7",
NULL); NULL);
if (!manager->proc) if (!manager->proc)
{ {
@@ -675,133 +620,30 @@ meta_xwayland_start_xserver (MetaXWaylandManager *manager)
return TRUE; return TRUE;
} }
static gboolean
xdisplay_connection_activity_cb (gint fd,
GIOCondition cond,
gpointer user_data)
{
MetaXWaylandManager *manager = user_data;
if (!meta_xwayland_start_xserver (manager))
g_critical ("Could not start Xserver");
return G_SOURCE_REMOVE;
}
static void
window_unmanaged_cb (MetaWindow *window,
MetaXWaylandManager *manager)
{
manager->x11_windows = g_list_remove (manager->x11_windows, window);
g_signal_handlers_disconnect_by_func (window,
window_unmanaged_cb,
manager);
if (!manager->x11_windows)
{
g_debug ("All X11 windows gone, setting shutdown timeout");
manager->xserver_grace_period_id =
g_timeout_add_seconds (10, shutdown_xwayland_cb, manager);
}
}
static void
window_created_cb (MetaDisplay *display,
MetaWindow *window,
MetaXWaylandManager *manager)
{
if (window->xwindow &&
meta_window_get_client_pid (window) != getpid ())
{
manager->x11_windows = g_list_prepend (manager->x11_windows, window);
g_signal_connect (window, "unmanaged",
G_CALLBACK (window_unmanaged_cb), manager);
if (manager->xserver_grace_period_id)
{
g_source_remove (manager->xserver_grace_period_id);
manager->xserver_grace_period_id = 0;
}
}
}
static void
meta_xwayland_stop_xserver (MetaXWaylandManager *manager)
{
if (manager->proc)
g_subprocess_send_signal (manager->proc, SIGTERM);
g_signal_handlers_disconnect_by_func (meta_get_display (),
window_created_cb,
manager);
g_clear_object (&manager->xserver_died_cancellable);
g_clear_object (&manager->proc);
}
gboolean gboolean
meta_xwayland_init (MetaXWaylandManager *manager, meta_xwayland_start (MetaXWaylandManager *manager,
struct wl_display *wl_display) struct wl_display *wl_display)
{ {
MetaDisplayPolicy policy; if (!choose_xdisplay (manager))
gboolean fatal;
if (!manager->public_connection.name)
{
if (!choose_xdisplay (manager, &manager->public_connection))
return FALSE; return FALSE;
if (!choose_xdisplay (manager, &manager->private_connection))
return FALSE;
}
else
{
if (!open_display_sockets (manager,
manager->public_connection.display_index,
&manager->public_connection.abstract_fd,
&manager->public_connection.unix_fd,
&fatal))
return FALSE;
if (!open_display_sockets (manager,
manager->private_connection.display_index,
&manager->private_connection.abstract_fd,
&manager->private_connection.unix_fd,
&fatal))
return FALSE;
}
if (!prepare_auth_file (manager)) if (!prepare_auth_file (manager))
return FALSE; return FALSE;
manager->wayland_display = wl_display; manager->wayland_display = wl_display;
policy = meta_get_x11_display_policy (); return meta_xwayland_init_xserver (manager);
if (policy == META_DISPLAY_POLICY_MANDATORY)
{
return meta_xwayland_start_xserver (manager);
}
else if (policy == META_DISPLAY_POLICY_ON_DEMAND)
{
g_unix_fd_add (manager->public_connection.abstract_fd, G_IO_IN,
xdisplay_connection_activity_cb, manager);
return TRUE;
}
return FALSE;
} }
static void static void
on_x11_display_closing (MetaDisplay *display) on_x11_display_closing (MetaDisplay *display)
{ {
meta_xwayland_shutdown_dnd (); meta_xwayland_shutdown_dnd ();
g_signal_handlers_disconnect_by_func (display,
on_x11_display_closing,
NULL);
} }
/* To be called right after connecting */ /* To be called right after connecting */
void void
meta_xwayland_complete_init (MetaDisplay *display) meta_xwayland_complete_init (MetaDisplay *display)
{ {
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
MetaXWaylandManager *manager = &compositor->xwayland_manager;
/* We install an X IO error handler in addition to the child watch, /* We install an X IO error handler in addition to the child watch,
because after Xlib connects our child watch may not be called soon because after Xlib connects our child watch may not be called soon
enough, and therefore we won't crash when X exits (and most important enough, and therefore we won't crash when X exits (and most important
@@ -812,41 +654,31 @@ meta_xwayland_complete_init (MetaDisplay *display)
g_signal_connect (display, "x11-display-closing", g_signal_connect (display, "x11-display-closing",
G_CALLBACK (on_x11_display_closing), NULL); G_CALLBACK (on_x11_display_closing), NULL);
meta_xwayland_init_dnd (); meta_xwayland_init_dnd ();
g_signal_connect (meta_get_display (), "window-created",
G_CALLBACK (window_created_cb), manager);
} }
void void
meta_xwayland_shutdown (MetaXWaylandManager *manager) meta_xwayland_stop (MetaXWaylandManager *manager)
{ {
char path[256]; char path[256];
g_cancellable_cancel (manager->xserver_died_cancellable); g_cancellable_cancel (manager->xserver_died_cancellable);
g_clear_object (&manager->proc);
g_clear_object (&manager->xserver_died_cancellable);
snprintf (path, sizeof path, "/tmp/.X11-unix/X%d", manager->public_connection.display_index); snprintf (path, sizeof path, "/tmp/.X11-unix/X%d", manager->display_index);
unlink (path); unlink (path);
snprintf (path, sizeof path, "/tmp/.X11-unix/X%d", manager->private_connection.display_index); g_clear_pointer (&manager->display_name, g_free);
unlink (path);
g_clear_pointer (&manager->public_connection.name, g_free);
g_clear_pointer (&manager->private_connection.name, g_free);
if (manager->public_connection.lock_file)
{
unlink (manager->public_connection.lock_file);
g_clear_pointer (&manager->public_connection.lock_file, g_free);
}
if (manager->private_connection.lock_file)
{
unlink (manager->private_connection.lock_file);
g_clear_pointer (&manager->private_connection.lock_file, g_free);
}
if (manager->auth_file) if (manager->auth_file)
{ {
unlink (manager->auth_file); unlink (manager->auth_file);
g_clear_pointer (&manager->auth_file, g_free); g_clear_pointer (&manager->auth_file, g_free);
} }
if (manager->lock_file)
{
unlink (manager->lock_file);
g_clear_pointer (&manager->lock_file, g_free);
}
} }
static void static void

View File

@@ -1580,18 +1580,19 @@ handle_other_xevent (MetaX11Display *x11_display,
workspace = meta_workspace_manager_get_workspace_by_index (workspace_manager, space); workspace = meta_workspace_manager_get_workspace_by_index (workspace_manager, space);
if (workspace)
{
/* Handle clients using the older version of the spec... */ /* Handle clients using the older version of the spec... */
if (time == 0) if (time == 0 && workspace)
time = meta_x11_display_get_current_time_roundtrip (x11_display);
meta_workspace_activate (workspace, time);
}
else
{ {
meta_verbose ("Don't know about workspace %d\n", space); meta_warning ("Received a NET_CURRENT_DESKTOP message "
"from a broken (outdated) client who sent "
"a 0 timestamp\n");
time = meta_x11_display_get_current_time_roundtrip (x11_display);
} }
if (workspace)
meta_workspace_activate (workspace, time);
else
meta_verbose ("Don't know about workspace %d\n", space);
} }
else if (event->xclient.message_type == else if (event->xclient.message_type ==
x11_display->atom__NET_NUMBER_OF_DESKTOPS) x11_display->atom__NET_NUMBER_OF_DESKTOPS)

View File

@@ -144,8 +144,6 @@ struct _MetaX11Display
guint keys_grabbed : 1; guint keys_grabbed : 1;
guint closing : 1;
/* we use property updates as sentinels for certain window focus events /* we use property updates as sentinels for certain window focus events
* to avoid some race conditions on EnterNotify events * to avoid some race conditions on EnterNotify events
*/ */
@@ -251,6 +249,4 @@ void meta_x11_display_set_input_focus (MetaX11Display *x11_display,
Window xwindow, Window xwindow,
guint32 timestamp); guint32 timestamp);
const gchar * meta_x11_get_display_name (void);
#endif /* META_X11_DISPLAY_PRIVATE_H */ #endif /* META_X11_DISPLAY_PRIVATE_H */

View File

@@ -129,19 +129,17 @@ meta_x11_display_dispose (GObject *object)
{ {
MetaX11Display *x11_display = META_X11_DISPLAY (object); MetaX11Display *x11_display = META_X11_DISPLAY (object);
x11_display->closing = TRUE;
meta_x11_startup_notification_release (x11_display); meta_x11_startup_notification_release (x11_display);
meta_prefs_remove_listener (prefs_changed_callback, x11_display); meta_prefs_remove_listener (prefs_changed_callback, x11_display);
meta_x11_display_ungrab_keys (x11_display); meta_x11_display_ungrab_keys (x11_display);
g_clear_object (&x11_display->x11_stack);
meta_x11_selection_shutdown (x11_display); meta_x11_selection_shutdown (x11_display);
meta_x11_display_unmanage_windows (x11_display); meta_x11_display_unmanage_windows (x11_display);
g_clear_object (&x11_display->x11_stack);
if (x11_display->ui) if (x11_display->ui)
{ {
meta_ui_free (x11_display->ui); meta_ui_free (x11_display->ui);
@@ -184,8 +182,21 @@ meta_x11_display_dispose (GObject *object)
if (x11_display->guard_window != None) if (x11_display->guard_window != None)
{ {
MetaStackTracker *stack_tracker = x11_display->display->stack_tracker;
if (stack_tracker)
{
unsigned long serial;
serial = XNextRequest (x11_display->xdisplay);
meta_stack_tracker_record_remove (stack_tracker,
x11_display->guard_window,
serial);
}
XUnmapWindow (x11_display->xdisplay, x11_display->guard_window); XUnmapWindow (x11_display->xdisplay, x11_display->guard_window);
XDestroyWindow (x11_display->xdisplay, x11_display->guard_window); XDestroyWindow (x11_display->xdisplay, x11_display->guard_window);
x11_display->guard_window = None; x11_display->guard_window = None;
} }
@@ -977,25 +988,6 @@ meta_set_gnome_wm_keybindings (const char *wm_keybindings)
gnome_wm_keybindings = wm_keybindings; gnome_wm_keybindings = wm_keybindings;
} }
const gchar *
meta_x11_get_display_name (void)
{
#ifdef HAVE_WAYLAND
if (meta_is_wayland_compositor ())
{
MetaWaylandCompositor *compositor;
compositor = meta_wayland_compositor_get_default ();
return meta_wayland_get_xwayland_display_name (compositor);
}
else
#endif
{
return g_getenv ("DISPLAY");
}
}
gboolean gboolean
meta_x11_init_gdk_display (GError **error) meta_x11_init_gdk_display (GError **error)
{ {
@@ -1004,7 +996,7 @@ meta_x11_init_gdk_display (GError **error)
const char *gdk_gl_env = NULL; const char *gdk_gl_env = NULL;
Display *xdisplay; Display *xdisplay;
xdisplay_name = meta_x11_get_display_name (); xdisplay_name = g_getenv ("DISPLAY");
if (!xdisplay_name) if (!xdisplay_name)
{ {
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,

View File

@@ -886,21 +886,15 @@ meta_window_x11_maybe_focus_delayed (MetaWindow *window,
} }
static void static void
maybe_focus_default_window (MetaDisplay *display, maybe_focus_default_window (MetaWorkspace *workspace,
MetaWindow *not_this_one, MetaWindow *not_this_one,
guint32 timestamp) guint32 timestamp)
{ {
MetaWorkspace *workspace; MetaStack *stack = workspace->display->stack;
MetaStack *stack = display->stack;
g_autoptr (GList) focusable_windows = NULL; g_autoptr (GList) focusable_windows = NULL;
g_autoptr (GQueue) focus_candidates = NULL; g_autoptr (GQueue) focus_candidates = NULL;
GList *l; GList *l;
if (not_this_one && not_this_one->workspace)
workspace = not_this_one->workspace;
else
workspace = display->workspace_manager->active_workspace;
/* Go through all the focusable windows and try to focus them /* Go through all the focusable windows and try to focus them
* in order, waiting for a delay. The first one that replies to * in order, waiting for a delay. The first one that replies to
* the request (in case of take focus windows) changing the display * the request (in case of take focus windows) changing the display
@@ -994,7 +988,7 @@ meta_window_x11_focus (MetaWindow *window,
window->display->focus_window->unmanaging) window->display->focus_window->unmanaging)
{ {
meta_display_unset_input_focus (window->display, timestamp); meta_display_unset_input_focus (window->display, timestamp);
maybe_focus_default_window (window->display, window, maybe_focus_default_window (window->workspace, window,
timestamp); timestamp);
} }
} }