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
======
* Prepare for running Xwayland on demand [Carlos; !420]

View File

@@ -252,13 +252,6 @@ clutter_clone_allocate (ClutterActor *self,
if (priv->clone_source == NULL)
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
/* XXX - this is wrong: ClutterClone cannot clone unparented
* actors, as it will break all invariants

View File

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

View File

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

View File

@@ -179,12 +179,9 @@ enum
PROP_USE_ALPHA,
PROP_KEY_FOCUS,
PROP_NO_CLEAR_HINT,
PROP_ACCEPT_FOCUS,
PROP_LAST
PROP_ACCEPT_FOCUS
};
static GParamSpec *obj_props[PROP_LAST] = { NULL, };
enum
{
ACTIVATE,
@@ -842,7 +839,7 @@ clutter_stage_emit_key_focus_event (ClutterStage *stage,
else
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
@@ -1880,6 +1877,7 @@ clutter_stage_class_init (ClutterStageClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
GParamSpec *pspec;
gobject_class->constructed = clutter_stage_constructed;
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
*/
obj_props[PROP_CURSOR_VISIBLE] =
g_param_spec_boolean ("cursor-visible",
P_("Cursor Visible"),
P_("Whether the mouse pointer is visible on the main stage"),
TRUE,
CLUTTER_PARAM_READWRITE);
pspec = g_param_spec_boolean ("cursor-visible",
P_("Cursor Visible"),
P_("Whether the mouse pointer is visible on the main stage"),
TRUE,
CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class,
PROP_CURSOR_VISIBLE,
pspec);
/**
* ClutterStage:color:
*
@@ -1925,13 +1924,13 @@ clutter_stage_class_init (ClutterStageClass *klass)
* Deprecated: 1.10: Use the #ClutterActor:background-color property of
* #ClutterActor instead.
*/
obj_props[PROP_COLOR] =
clutter_param_spec_color ("color",
P_("Color"),
P_("The color of the stage"),
&default_stage_color,
CLUTTER_PARAM_READWRITE |
G_PARAM_DEPRECATED);
pspec = clutter_param_spec_color ("color",
P_("Color"),
P_("The color of the stage"),
&default_stage_color,
CLUTTER_PARAM_READWRITE |
G_PARAM_DEPRECATED);
g_object_class_install_property (gobject_class, PROP_COLOR, pspec);
/**
* ClutterStage:perspective:
@@ -1941,12 +1940,14 @@ clutter_stage_class_init (ClutterStageClass *klass)
*
* Since: 0.8
*/
obj_props[PROP_PERSPECTIVE] =
g_param_spec_boxed ("perspective",
P_("Perspective"),
P_("Perspective projection parameters"),
CLUTTER_TYPE_PERSPECTIVE,
CLUTTER_PARAM_READWRITE);
pspec = g_param_spec_boxed ("perspective",
P_("Perspective"),
P_("Perspective projection parameters"),
CLUTTER_TYPE_PERSPECTIVE,
CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class,
PROP_PERSPECTIVE,
pspec);
/**
* ClutterStage:title:
@@ -1955,12 +1956,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
*
* Since: 0.4
*/
obj_props[PROP_TITLE] =
g_param_spec_string ("title",
P_("Title"),
P_("Stage Title"),
NULL,
CLUTTER_PARAM_READWRITE);
pspec = g_param_spec_string ("title",
P_("Title"),
P_("Stage Title"),
NULL,
CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_TITLE, pspec);
/**
* ClutterStage:use-fog:
@@ -1973,12 +1974,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
*
* Deprecated: 1.10: This property does not do anything.
*/
obj_props[PROP_USE_FOG] =
g_param_spec_boolean ("use-fog",
P_("Use Fog"),
P_("Whether to enable depth cueing"),
FALSE,
CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED);
pspec = g_param_spec_boolean ("use-fog",
P_("Use Fog"),
P_("Whether to enable depth cueing"),
FALSE,
CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED);
g_object_class_install_property (gobject_class, PROP_USE_FOG, pspec);
/**
* ClutterStage:fog:
@@ -1990,12 +1991,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
*
* Deprecated: 1.10: This property does not do anything.
*/
obj_props[PROP_FOG] =
g_param_spec_boxed ("fog",
P_("Fog"),
P_("Settings for the depth cueing"),
CLUTTER_TYPE_FOG,
CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED);
pspec = g_param_spec_boxed ("fog",
P_("Fog"),
P_("Settings for the depth cueing"),
CLUTTER_TYPE_FOG,
CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED);
g_object_class_install_property (gobject_class, PROP_FOG, pspec);
/**
* ClutterStage:use-alpha:
@@ -2007,12 +2008,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
*
* Since: 1.2
*/
obj_props[PROP_USE_ALPHA] =
g_param_spec_boolean ("use-alpha",
P_("Use Alpha"),
P_("Whether to honour the alpha component of the stage color"),
FALSE,
CLUTTER_PARAM_READWRITE);
pspec = g_param_spec_boolean ("use-alpha",
P_("Use Alpha"),
P_("Whether to honour the alpha component of the stage color"),
FALSE,
CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_USE_ALPHA, pspec);
/**
* ClutterStage:key-focus:
@@ -2024,12 +2025,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
*
* Since: 1.2
*/
obj_props[PROP_KEY_FOCUS] =
g_param_spec_object ("key-focus",
P_("Key Focus"),
P_("The currently key focused actor"),
CLUTTER_TYPE_ACTOR,
CLUTTER_PARAM_READWRITE);
pspec = g_param_spec_object ("key-focus",
P_("Key Focus"),
P_("The currently key focused actor"),
CLUTTER_TYPE_ACTOR,
CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_KEY_FOCUS, pspec);
/**
* ClutterStage:no-clear-hint:
@@ -2041,12 +2042,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
*
* Since: 1.4
*/
obj_props[PROP_NO_CLEAR_HINT] =
g_param_spec_boolean ("no-clear-hint",
P_("No Clear Hint"),
P_("Whether the stage should clear its contents"),
FALSE,
CLUTTER_PARAM_READWRITE);
pspec = g_param_spec_boolean ("no-clear-hint",
P_("No Clear Hint"),
P_("Whether the stage should clear its contents"),
FALSE,
CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_NO_CLEAR_HINT, pspec);
/**
* ClutterStage:accept-focus:
@@ -2055,14 +2056,12 @@ clutter_stage_class_init (ClutterStageClass *klass)
*
* Since: 1.6
*/
obj_props[PROP_ACCEPT_FOCUS] =
g_param_spec_boolean ("accept-focus",
P_("Accept Focus"),
P_("Whether the stage should accept focus on show"),
TRUE,
CLUTTER_PARAM_READWRITE);
g_object_class_install_properties (gobject_class, PROP_LAST, obj_props);
pspec = g_param_spec_boolean ("accept-focus",
P_("Accept Focus"),
P_("Whether the stage should accept focus on show"),
TRUE,
CLUTTER_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_ACCEPT_FOCUS, pspec);
/**
* ClutterStage::activate:
@@ -2360,7 +2359,7 @@ clutter_stage_set_color (ClutterStage *stage,
{
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);
g_object_notify_by_pspec (G_OBJECT (stage),
obj_props[PROP_CURSOR_VISIBLE]);
g_object_notify (G_OBJECT (stage), "cursor-visible");
}
}
}
@@ -2684,8 +2682,7 @@ clutter_stage_hide_cursor (ClutterStage *stage)
iface->set_cursor_visible (impl, FALSE);
g_object_notify_by_pspec (G_OBJECT (stage),
obj_props[PROP_CURSOR_VISIBLE]);
g_object_notify (G_OBJECT (stage), "cursor-visible");
}
}
}
@@ -2897,7 +2894,7 @@ clutter_stage_set_title (ClutterStage *stage,
if (CLUTTER_STAGE_WINDOW_GET_IFACE(impl)->set_title != NULL)
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
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));
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;
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)
{
_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 */
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);
/* 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;
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_bytes -= (end - start);
@@ -228,8 +228,8 @@ clutter_text_buffer_real_inserted_text (ClutterTextBuffer *buffer,
const gchar *chars,
guint n_chars)
{
g_object_notify_by_pspec (G_OBJECT (buffer), obj_props[PROP_TEXT]);
g_object_notify_by_pspec (G_OBJECT (buffer), obj_props[PROP_LENGTH]);
g_object_notify (G_OBJECT (buffer), "text");
g_object_notify (G_OBJECT (buffer), "length");
}
static void
@@ -237,8 +237,8 @@ clutter_text_buffer_real_deleted_text (ClutterTextBuffer *buffer,
guint position,
guint n_chars)
{
g_object_notify_by_pspec (G_OBJECT (buffer), obj_props[PROP_TEXT]);
g_object_notify_by_pspec (G_OBJECT (buffer), obj_props[PROP_LENGTH]);
g_object_notify (G_OBJECT (buffer), "text");
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);
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,
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
@@ -4920,9 +4920,9 @@ clutter_text_set_buffer (ClutterText *self,
obj = G_OBJECT (self);
g_object_freeze_notify (obj);
g_object_notify_by_pspec (obj, obj_props[PROP_BUFFER]);
g_object_notify_by_pspec (obj, obj_props[PROP_TEXT]);
g_object_notify_by_pspec (obj, obj_props[PROP_MAX_LENGTH]);
g_object_notify (obj, "buffer");
g_object_notify (obj, "text");
g_object_notify (obj, "max-length");
g_object_thaw_notify (obj);
}

View File

@@ -13,7 +13,7 @@ G_BEGIN_DECLS
#define TEST_COGLBOX(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
TEST_TYPE_COGLBOX, TestCoglbox))
TEST_TYPE_COGLBOX, TestCoglboxClass))
#define TEST_COGLBOX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
@@ -77,7 +77,7 @@ struct _TestCoglboxPrivate
G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
#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
*--------------------------------------------------*/

View File

@@ -13,7 +13,7 @@ G_BEGIN_DECLS
#define TEST_COGLBOX(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
TEST_TYPE_COGLBOX, TestCoglbox))
TEST_TYPE_COGLBOX, TestCoglboxClass))
#define TEST_COGLBOX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
@@ -76,7 +76,7 @@ struct _TestCoglboxPrivate
G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
#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
*--------------------------------------------------*/

View File

@@ -13,7 +13,7 @@ G_BEGIN_DECLS
#define TEST_COGLBOX(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
TEST_TYPE_COGLBOX, TestCoglbox))
TEST_TYPE_COGLBOX, TestCoglboxClass))
#define TEST_COGLBOX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
@@ -78,7 +78,7 @@ struct _TestCoglboxPrivate
G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
#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
*--------------------------------------------------*/

View File

@@ -14,7 +14,7 @@ G_BEGIN_DECLS
#define TEST_COGLBOX(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
TEST_TYPE_COGLBOX, TestCoglbox))
TEST_TYPE_COGLBOX, TestCoglboxClass))
#define TEST_COGLBOX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
@@ -77,7 +77,7 @@ struct _TestCoglboxPrivate
G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
#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
*--------------------------------------------------*/

View File

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

View File

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

View File

@@ -60,12 +60,6 @@ G_BEGIN_DECLS
typedef struct _CoglTexture2D CoglTexture2D;
#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:
*
@@ -225,7 +219,6 @@ cogl_egl_texture_2d_new_from_image (CoglContext *ctx,
int height,
CoglPixelFormat format,
EGLImageKHR image,
CoglEglImageFlags flags,
GError **error);
typedef gboolean (*CoglTexture2DEGLImageExternalAlloc) (CoglTexture2D *tex_2d,

View File

@@ -182,7 +182,6 @@ typedef struct _CoglTextureLoader
int width;
int height;
CoglPixelFormat format;
CoglEglImageFlags flags;
} egl_image;
#endif
#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->is_get_data_supported =
!(loader->src.egl_image.flags & COGL_EGL_IMAGE_FLAG_NO_GET_DATA);
_cogl_texture_set_allocated (tex,
internal_format,
@@ -510,7 +508,6 @@ allocate_custom_egl_image_external (CoglTexture2D *tex_2d,
tex_2d->internal_format = internal_format;
tex_2d->gl_target = GL_TEXTURE_EXTERNAL_OES;
tex_2d->is_get_data_supported = FALSE;
return TRUE;
}
@@ -837,7 +834,10 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
gboolean
_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

View File

@@ -801,7 +801,6 @@ _cogl_winsys_texture_pixmap_x11_create (CoglTexturePixmapX11 *tex_pixmap)
tex->height,
texture_format,
egl_tex_pixmap->image,
COGL_EGL_IMAGE_FLAG_NONE,
NULL));
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(
mutter_installed_tests_libexecdir, 'cogl', 'conform')
if have_installed_tests
install_data('run-tests.sh', install_dir: cogl_installed_tests_libexecdir)
endif
install_data('run-tests.sh', install_dir: cogl_installed_tests_libexecdir)
cogl_config_env = configure_file(
input: 'config.env.in',

View File

@@ -124,8 +124,6 @@
real-time scheduling. The executable
or user must have CAP_SYS_NICE.
Requires a restart.
• “autostart-xwayland” — initializes Xwayland lazily if there are
X11 clients. Requires restart.
</description>
</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',
version: '3.33.4',
version: '3.33.3',
meson_version: '>= 0.50.0',
license: 'GPLv2+'
)
mutter_plugin_api_version = '3'
split_version = meson.project_version().split('.')
# 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)
libmutter_api_version = '4'
# generic version requirements
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 ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-07-18 21:05+0000\n"
"PO-Revision-Date: 2019-07-28 10:06+0200\n"
"POT-Creation-Date: 2019-06-28 19:41+0000\n"
"PO-Revision-Date: 2019-07-01 21:01+0200\n"
"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
"Language-Team: Friulian <fur@li.org>\n"
"Language: fur\n"
@@ -492,6 +492,7 @@ msgstr ""
"cun Xwayland"
#: data/org.gnome.mutter.wayland.gschema.xml.in:65
#, fuzzy
msgid ""
"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 "
@@ -503,14 +504,13 @@ msgid ""
"specific X11 ClientMessage to the root window or be among the applications "
"white-listed in key “xwayland-grab-access-rules”."
msgstr ""
"Cuant che a zire sot Xwayland, permet a ducj i events di tastiere di jessi "
"indreçâts sui barcons X11 “override redirect” cjapant il control de "
"tastiere. Cheste opzion e ven doprade di râr e no à efiets sui barcons "
"normâi di X11 che a puedin ricevi la concentrazion dai segnai de tastiere "
"sot circostancis normâls. Par une cjapade di control di X11, par che e sedi "
"tignude in considerazion sot Wayland, il client al scugne ancje o inviâ un "
"specific messaç (X11 ClientMessage) al barcon lidrîs o jessi tra lis "
"aplicazions metudis te liste blancje inte clâf “xwayland-grab-access-rules”."
"Permet a ducj i events di tastiere di jessi indreçâts sui barcons “override "
"redirect” di X11 cuntun cjapâ il control de tastiere emetût di aplicazions "
"X11 che a zirin in Xwayland, di jessi tignûts in considerazion. Par une "
"cjapade di control di X11, par che e sedi tignude in considerazion sot "
"Wayland, il client al scugne ancje inviâ un specific messaç (X11 "
"ClientMessage) al barcon lidrîs o jessi tra lis aplicazions metudis te liste "
"blancje inte clâf “xwayland-grab-access-rules”."
#: data/org.gnome.mutter.wayland.gschema.xml.in:84
msgid "Xwayland applications allowed to issue keyboard grabs"
@@ -698,7 +698,7 @@ msgstr "Stampe version"
msgid "Mutter plugin to use"
msgstr "Plugin Mutter di doprâ"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1834
#, c-format
msgid "Workspace %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"
msgstr "Cambie mût: mût %d"
#: src/x11/meta-x11-display.c:682
#: src/x11/meta-x11-display.c:681
#, c-format
msgid ""
"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 "
"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"
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
msgid "Failed to open X Window System display “%s”\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
msgid "Screen %d on display “%s” is invalid\n"
msgstr "Schermi %d su display “%s” no valit\n"

View File

@@ -21,16 +21,16 @@ msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
"POT-Creation-Date: 2019-07-18 13:55+0000\n"
"PO-Revision-Date: 2019-07-22 01:40-0300\n"
"POT-Creation-Date: 2019-02-04 17:52+0000\n"
"PO-Revision-Date: 2019-02-20 22:11-0300\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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\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"
#: data/50-mutter-navigation.xml:6
@@ -406,16 +406,6 @@ msgid "Enable experimental features"
msgstr "Habilitar recursos experimentais"
#: 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 ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
@@ -424,9 +414,7 @@ msgid ""
"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. • “rt-scheduler” — makes "
"mutter request a low priority real-time scheduling. The executable or user "
"must have CAP_SYS_NICE. Requires a restart."
"manage HiDPI monitors. Does not require a restart."
msgstr ""
"Para habilitar recursos experimentais, adicione a palavra-chave 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 "
"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 "
"exige uma reinicialização. • “rt-scheduler” — faz o mutter solicitar um "
"agendamento de tempo real de baixa prioridade. O executável ou usuário deve "
"ter CAP_SYS_NICE. Exige uma reinicialização."
"exige uma reinicialização."
#: data/org.gnome.mutter.gschema.xml.in:132
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
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
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"
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"
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"
msgstr "Gira a configuração de monitor embutido"
@@ -517,44 +495,28 @@ msgid "Re-enable shortcuts"
msgstr "Reabilita atalhos"
#: data/org.gnome.mutter.wayland.gschema.xml.in:64
#| msgid "Allow grabs with Xwayland"
msgid "Allow X11 grabs to lock keyboard focus with Xwayland"
msgstr "Permitir as capturas do X11 travar o foco do teclado com Xwayland"
msgid "Allow grabs with Xwayland"
msgstr "Permitir capturas com Xwayland"
#: 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 ""
"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 "
"which map an “override redirect” window (which do not receive keyboard "
"focus) and issue a keyboard grab to force all keyboard events to that "
"window. This option is seldom used and has no effect on regular X11 windows "
"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”."
"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”."
msgstr ""
"Permita que todos os eventos do teclado sejam roteados para as janelas "
"“override redirect” do X11 com uma captura ao executar no Xwayland. Esta "
"opção é para ter suporte a clientes X11 que mapeiam uma janela “override "
"redirect” (que não recebe o foco do teclado) e emitem uma captura de teclado "
"para forçar todos os eventos do teclado para aquela janela. Esta opção é "
"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”."
"Permite capturas de teclado emitidas por aplicativos X11 em execução no "
"Xwayland para serem levadas em consideração. Para que uma captura de X11 "
"seja levada em consideração no Wayland, o cliente também deve enviar um X11 "
"ClientMessage específica para a janela raiz ou estar entre os aplicativos "
"listados em branco 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"
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 ""
"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 "
@@ -581,7 +543,7 @@ msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2531
#: src/backends/meta-input-settings.c:2423
#, c-format
msgid "Mode Switch (Group %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'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2554
#: src/backends/meta-input-settings.c:2446
msgid "Switch monitor"
msgstr "Trocar monitor"
#: src/backends/meta-input-settings.c:2556
#: src/backends/meta-input-settings.c:2448
msgid "Show on-screen help"
msgstr "Mostrar ajuda na tela"
#: src/backends/meta-monitor.c:223
#: src/backends/meta-monitor-manager.c:954
msgid "Built-in display"
msgstr "Tela embutida"
#: src/backends/meta-monitor.c:252
#: src/backends/meta-monitor-manager.c:986
msgid "Unknown"
msgstr "Desconhecido"
#: src/backends/meta-monitor.c:254
#: src/backends/meta-monitor-manager.c:988
msgid "Unknown Display"
msgstr "Monitor desconhecido"
#: src/backends/meta-monitor.c:262
#: src/backends/meta-monitor-manager.c:996
#, c-format
#| msgid "%s %s"
msgctxt ""
"This is a monitor vendor name, followed by a size in inches, like 'Dell 15\"'"
msgid "%s %s"
msgstr "%s %s"
#: src/backends/meta-monitor.c:270
#: src/backends/meta-monitor-manager.c:1004
#, c-format
#| msgid "%s %s"
msgctxt ""
"This is a monitor vendor name followed by product/model name where size in "
"inches could not be calculated, e.g. Dell U2414H"
msgid "%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;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:510
#: src/compositor/compositor.c:482
#, c-format
msgid ""
"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"
msgstr "Evento de som"
@@ -687,16 +645,16 @@ msgid "Run with X11 backend"
msgstr "Executa com backend X11"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:151
#: src/core/meta-close-dialog-default.c:150
#, c-format
msgid "“%s” is not responding."
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."
msgstr "O aplicativo não está respondendo."
#: src/core/meta-close-dialog-default.c:158
#: src/core/meta-close-dialog-default.c:157
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@@ -704,11 +662,11 @@ msgstr ""
"Você pode escolher aguardar um pouco e continuar ou forçar o aplicativo a "
"sair completamente."
#: src/core/meta-close-dialog-default.c:165
#: src/core/meta-close-dialog-default.c:164
msgid "_Force Quit"
msgstr "_Forçar sair"
#: src/core/meta-close-dialog-default.c:165
#: src/core/meta-close-dialog-default.c:164
msgid "_Wait"
msgstr "_Esperar"
@@ -736,7 +694,7 @@ msgstr "Versão impressa"
msgid "Mutter plugin to use"
msgstr "Plug-in do Mutter para usar"
#: src/core/prefs.c:1849
#: src/core/prefs.c:1786
#, c-format
msgid "Workspace %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"
msgstr "Alternador de modo: Modo %d"
#: src/x11/meta-x11-display.c:682
#: src/x11/meta-x11-display.c:666
#, c-format
msgid ""
"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 --"
"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"
msgstr "Falha ao inicializar GDK\n"
#: src/x11/meta-x11-display.c:1048
#: src/x11/meta-x11-display.c:1032
#, c-format
msgid "Failed to open X Window System display “%s”\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
msgid "Screen %d on display “%s” is invalid\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
msgid ""
"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” "
"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
msgid "%s (on %s)"
msgstr "%s (em %s)"
@@ -2119,6 +2072,9 @@ msgstr "%s (em %s)"
#~ msgid "Commands to run in response to keybindings"
#~ msgstr "Comandos executados em resposta a teclas de atalho"
#~ msgid "Compositing Manager"
#~ msgstr "Gerenciador de composição"
#~ msgid "Control how new windows get focus"
#~ msgstr "Controla como novas janelas obtêm foco"

View File

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

View File

@@ -302,7 +302,7 @@ meta_barrier_destroy (MetaBarrier *barrier)
static void
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

View File

@@ -39,7 +39,6 @@
#include "backends/x11/cm/meta-cursor-sprite-xfixes.h"
#include "cogl/cogl.h"
#include "clutter/clutter.h"
#include "meta-marshal.h"
#include "meta/main.h"
#include "meta/meta-x11-errors.h"
#include "meta/util.h"
@@ -167,31 +166,20 @@ meta_cursor_tracker_class_init (MetaCursorTrackerClass *klass)
NULL, NULL, NULL,
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",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
meta_marshal_VOID__FLOAT_FLOAT,
NULL, NULL, NULL,
G_TYPE_NONE, 2,
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",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}

View File

@@ -34,7 +34,6 @@ typedef enum _MetaExperimentalFeature
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1),
META_EXPERIMENTAL_FEATURE_RT_SCHEDULER = (1 << 2),
META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND = (1 << 3),
} MetaExperimentalFeature;
#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;
else if (g_str_equal (feature, "rt-scheduler"))
features |= META_EXPERIMENTAL_FEATURE_RT_SCHEDULER;
else if (g_str_equal (feature, "autostart-xwayland"))
features |= META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND;
else
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];
uint64_t modifiers[1];
CoglPixelFormat cogl_format;
CoglEglImageFlags flags;
CoglTexture2D *cogl_tex;
CoglOffscreen *cogl_fbo;
int ret;
@@ -1920,13 +1919,11 @@ copy_shared_framebuffer_primary_gpu (CoglOnscreen *onscre
return FALSE;
}
flags = COGL_EGL_IMAGE_FLAG_NO_GET_DATA;
cogl_tex = cogl_egl_texture_2d_new_from_image (cogl_context,
dumb_fb->width,
dumb_fb->height,
cogl_format,
egl_image,
flags,
&error);
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_redirect_x11_windows (MetaCompositor *compositor);
#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
meta_compositor_manage (MetaCompositor *compositor)
{
@@ -604,7 +595,8 @@ meta_compositor_manage (MetaCompositor *compositor)
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);
}

View File

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

View File

@@ -252,11 +252,12 @@ static void
set_file (MetaBackground *self,
GFile **filep,
MetaBackgroundImage **imagep,
GFile *file,
gboolean force_reload)
GFile *file)
{
if (force_reload || !file_equal0 (*filep, file))
if (!file_equal0 (*filep, file))
{
g_clear_object (filep);
if (*imagep)
{
g_signal_handlers_disconnect_by_func (*imagep,
@@ -266,12 +267,11 @@ set_file (MetaBackground *self,
*imagep = NULL;
}
g_set_object (filep, file);
if (file)
{
MetaBackgroundImageCache *cache = meta_background_image_cache_get_default ();
*filep = g_object_ref (file);
*imagep = meta_background_image_cache_load (cache, file);
g_signal_connect (*imagep, "loaded",
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
meta_background_dispose (GObject *object)
{
@@ -313,8 +287,8 @@ meta_background_dispose (GObject *object)
free_color_texture (self);
free_wallpaper_texture (self);
set_file (self, &self->file1, &self->background_image1, NULL, FALSE);
set_file (self, &self->file2, &self->background_image2, NULL, FALSE);
set_file (self, &self->file1, &self->background_image1, NULL);
set_file (self, &self->file2, &self->background_image2, NULL);
set_display (self, NULL);
@@ -338,7 +312,7 @@ meta_background_constructed (GObject *object)
G_OBJECT_CLASS (meta_background_parent_class)->constructed (object);
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_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 (blend_factor >= 0.0 && blend_factor <= 1.0);
set_file (self, &self->file1, &self->background_image1, file1, FALSE);
set_file (self, &self->file2, &self->background_image2, file2, FALSE);
set_file (self, &self->file1, &self->background_image1, file1);
set_file (self, &self->file2, &self->background_image2, file2);
self->blend_factor = blend_factor;
self->style = style;

View File

@@ -41,6 +41,9 @@ struct _MetaModulePrivate
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);
static gboolean
@@ -189,7 +192,7 @@ meta_module_class_init (MetaModuleClass *klass)
static void
meta_module_init (MetaModule *self)
{
self->priv = meta_module_get_instance_private (self);
self->priv = META_MODULE_GET_PRIVATE (self);
}
GType

View File

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

View File

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

View File

@@ -288,13 +288,13 @@ is_argb32 (MetaWindowActor *self)
}
static gboolean
is_opaque (MetaWindowActor *self)
is_non_opaque (MetaWindowActor *self)
{
MetaWindowActorPrivate *priv =
meta_window_actor_get_instance_private (self);
MetaWindow *window = priv->window;
return !is_argb32 (self) && (window->opacity == 0xFF);
return is_argb32 (self) || (window->opacity != 0xFF);
}
static gboolean
@@ -647,10 +647,7 @@ clip_shadow_under_window (MetaWindowActor *self)
MetaWindowActorPrivate *priv =
meta_window_actor_get_instance_private (self);
if (priv->window->frame)
return TRUE;
return is_opaque (self);
return is_non_opaque (self) && priv->window->frame;
}
static void
@@ -686,8 +683,7 @@ meta_window_actor_paint (ClutterActor *actor)
meta_window_actor_get_shadow_bounds (self, appears_focused, &bounds);
clip = cairo_region_create_rectangle (&bounds);
if (frame_bounds)
cairo_region_subtract (clip, frame_bounds);
cairo_region_subtract (clip, frame_bounds);
}
meta_shadow_paint (shadow,
@@ -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
* generate shadows for them.
*/
if (!is_opaque (self))
if (is_non_opaque (self))
return FALSE;
/*
@@ -1355,8 +1351,7 @@ meta_window_actor_set_clip_region_beneath (MetaWindowActor *self,
if (clip_shadow_under_window (self))
{
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);
}
}
else
@@ -1370,28 +1365,9 @@ meta_window_actor_cull_out (MetaCullable *cullable,
cairo_region_t *clip_region)
{
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_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
@@ -2059,21 +2035,3 @@ screen_cast_window_iface_init (MetaScreenCastWindowInterface *iface)
iface->capture_into = meta_window_actor_capture_into;
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_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 _MetaDefaultPluginClass MetaDefaultPluginClass;
typedef struct _MetaDefaultPluginPrivate MetaDefaultPluginPrivate;
@@ -215,7 +218,7 @@ meta_default_plugin_init (MetaDefaultPlugin *self)
{
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.version = "0.1";

View File

@@ -264,7 +264,7 @@ struct _MetaDisplayClass
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,
guint32 timestamp);

View File

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

View File

@@ -27,7 +27,7 @@
#include "backends/meta-cursor-tracker-private.h"
#include "backends/meta-idle-monitor-private.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/window-private.h"
#include "meta/meta-backend.h"
@@ -68,16 +68,14 @@ get_window_for_event (MetaDisplay *display,
case META_EVENT_ROUTE_NORMAL:
{
ClutterActor *source;
MetaWindowActor *window_actor;
/* Always use the key focused window for key events. */
if (IS_KEY_EVENT (event))
return stage_has_key_focus () ? display->focus_window : NULL;
source = clutter_event_get_source (event);
window_actor = meta_window_actor_from_actor (source);
if (window_actor)
return meta_window_actor_get_meta_window (window_actor);
if (META_IS_SURFACE_ACTOR (source))
return meta_surface_actor_get_window (META_SURFACE_ACTOR (source));
else
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);
window->unmaps_pending += 1;
}
if (!x11_display->closing)
{
meta_stack_tracker_record_add (window->display->stack_tracker,
window->xwindow,
XNextRequest (x11_display->xdisplay));
}
meta_stack_tracker_record_add (window->display->stack_tracker,
window->xwindow,
XNextRequest (x11_display->xdisplay));
XReparentWindow (x11_display->xdisplay,
window->xwindow,
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_locate_pointer_binding (MetaKeyCombo *combo);
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_ungrab_keys (MetaX11Display *x11_display);

View File

@@ -182,8 +182,8 @@ static gboolean process_keyboard_resize_grab (MetaDisplay *display,
MetaWindow *window,
ClutterKeyEvent *event);
static void maybe_update_locate_pointer_keygrab (MetaDisplay *display,
gboolean grab);
static void grab_key_bindings (MetaDisplay *display);
static void ungrab_key_bindings (MetaDisplay *display);
static GHashTable *key_handlers;
static GHashTable *external_grabs;
@@ -529,8 +529,8 @@ reload_iso_next_group_combos (MetaKeyBindingManager *keys)
static void
devirtualize_modifiers (MetaKeyBindingManager *keys,
MetaVirtualModifier modifiers,
unsigned int *mask)
MetaVirtualModifier modifiers,
unsigned int *mask)
{
*mask = 0;
@@ -1345,10 +1345,6 @@ prefs_changed_callback (MetaPreference 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:
ungrab_key_bindings (display);
rebuild_key_binding_table (keys);
@@ -1470,12 +1466,6 @@ change_keygrab_foreach (gpointer key,
if (data->only_per_window != binding_is_per_window)
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)
return;
@@ -1484,9 +1474,9 @@ change_keygrab_foreach (gpointer key,
static void
change_binding_keygrabs (MetaKeyBindingManager *keys,
Window xwindow,
gboolean only_per_window,
gboolean grab)
Window xwindow,
gboolean only_per_window,
gboolean grab)
{
ChangeKeygrabData data;
@@ -1498,21 +1488,6 @@ change_binding_keygrabs (MetaKeyBindingManager *keys,
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
meta_x11_display_change_keygrabs (MetaX11Display *x11_display,
gboolean grab)
@@ -1524,7 +1499,9 @@ meta_x11_display_change_keygrabs (MetaX11Display *x11_display,
meta_change_keygrab (keys, x11_display->xroot,
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++)
meta_change_keygrab (keys, x11_display->xroot,
@@ -1570,8 +1547,6 @@ meta_window_grab_keys (MetaWindow *window)
MetaDisplay *display = window->display;
MetaKeyBindingManager *keys = &display->key_binding_manager;
if (!meta_is_wayland_compositor ())
return;
if (window->all_keys_grabbed)
return;
@@ -1606,7 +1581,7 @@ meta_window_grab_keys (MetaWindow *window)
void
meta_window_ungrab_keys (MetaWindow *window)
{
if (!meta_is_wayland_compositor () && window->keys_grabbed)
if (window->keys_grabbed)
{
MetaDisplay *display = window->display;
MetaKeyBindingManager *keys = &display->key_binding_manager;
@@ -1665,11 +1640,7 @@ meta_display_grab_accelerator (MetaDisplay *display,
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->action = next_dynamic_keybinding_action ();
@@ -1715,11 +1686,8 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
{
int i;
if (!meta_is_wayland_compositor ())
{
meta_change_keygrab (keys, display->x11_display->xroot,
FALSE, &binding->resolved_combo);
}
meta_change_keygrab (keys, display->x11_display->xroot,
FALSE, &binding->resolved_combo);
for (i = 0; i < binding->resolved_combo.len; i++)
{
@@ -1797,7 +1765,7 @@ meta_window_grab_all_keys (MetaWindow *window,
guint32 timestamp)
{
Window grabwindow;
gboolean retval = TRUE;
gboolean retval;
if (window->all_keys_grabbed)
return FALSE;
@@ -1813,29 +1781,25 @@ meta_window_grab_all_keys (MetaWindow *window,
window->desc);
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,
"Grabbing all keys on window %s\n", window->desc);
retval = grab_keyboard (grabwindow, timestamp, XIGrabModeAsync);
if (retval)
{
window->keys_grabbed = FALSE;
window->all_keys_grabbed = TRUE;
window->grab_on_frame = window->frame != NULL;
}
meta_topic (META_DEBUG_KEYBINDINGS,
"Grabbing all keys on window %s\n", window->desc);
retval = grab_keyboard (grabwindow, timestamp, XIGrabModeAsync);
if (retval)
{
window->keys_grabbed = FALSE;
window->all_keys_grabbed = TRUE;
window->grab_on_frame = window->frame != NULL;
}
return retval;
}
void
meta_window_ungrab_all_keys (MetaWindow *window,
guint32 timestamp)
meta_window_ungrab_all_keys (MetaWindow *window, guint32 timestamp)
{
if (!meta_is_wayland_compositor () && window->all_keys_grabbed)
if (window->all_keys_grabbed)
{
ungrab_keyboard (timestamp);
@@ -4489,13 +4453,13 @@ meta_display_init_keys (MetaDisplay *display)
handler = g_new0 (MetaKeyHandler, 1);
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);
handler = g_new0 (MetaKeyHandler, 1);
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);

View File

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

View File

@@ -717,27 +717,15 @@ prefs_changed_callback (MetaPreference pref,
}
}
MetaDisplayPolicy
meta_get_x11_display_policy (void)
gboolean
meta_should_autostart_x11_display (void)
{
MetaBackend *backend = meta_get_backend ();
if (META_IS_BACKEND_X11_CM (backend))
return META_DISPLAY_POLICY_MANDATORY;
gboolean wants_x11 = TRUE;
#ifdef HAVE_WAYLAND
if (meta_is_wayland_compositor ())
{
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;
}
wants_x11 = !opt_no_x11;
#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);
x11_display = meta_x11_get_display_name ();
x11_display = getenv ("DISPLAY");
wayland_display = getenv ("WAYLAND_DISPLAY");
if (x11_display)

View File

@@ -150,8 +150,9 @@ meta_workspace_manager_class_init (MetaWorkspaceManagerClass *klass)
G_TYPE_INT,
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
* a different index. Note that other workspaces can change
* their index too when reordering happens.

View File

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

View File

@@ -508,42 +508,6 @@ query_xserver_stack (MetaDisplay *display,
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 *
meta_stack_tracker_new (MetaDisplay *display)
{
@@ -559,10 +523,6 @@ meta_stack_tracker_new (MetaDisplay *display)
"x11-display-opened",
G_CALLBACK (query_xserver_stack),
tracker);
g_signal_connect (display,
"x11-display-closing",
G_CALLBACK (drop_x11_windows),
tracker);
meta_stack_tracker_dump (tracker);
@@ -586,9 +546,6 @@ meta_stack_tracker_free (MetaStackTracker *tracker)
g_signal_handlers_disconnect_by_func (tracker->display,
(gpointer)query_xserver_stack,
tracker);
g_signal_handlers_disconnect_by_func (tracker->display,
drop_x11_windows,
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->workspace);
}
else if (window->on_all_workspaces)
if (window->on_all_workspaces)
{
meta_topic (META_DEBUG_PLACEMENT,
"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 &&
window_is_terminal (window))
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_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
mutter_sources += [
'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_CENTER_NEW_WINDOWS: center new windows
* @META_PREF_DRAG_THRESHOLD: drag threshold
* @META_PREF_LOCATE_POINTER: show pointer location
*/
/* Keep in sync with GSettings schemas! */
@@ -104,7 +103,6 @@ typedef enum
META_PREF_AUTO_MAXIMIZE,
META_PREF_CENTER_NEW_WINDOWS,
META_PREF_DRAG_THRESHOLD,
META_PREF_LOCATE_POINTER,
} MetaPreference;
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
@@ -438,7 +436,6 @@ typedef enum _MetaKeyBindingAction
* @META_KEY_BINDING_BUILTIN: built-in
* @META_KEY_BINDING_IS_REVERSED: is reversed
* @META_KEY_BINDING_NON_MASKABLE: always active
* @META_KEY_BINDING_NO_AUTO_GRAB: not grabbed automatically
*/
typedef enum
{
@@ -448,7 +445,6 @@ typedef enum
META_KEY_BINDING_IS_REVERSED = 1 << 2,
META_KEY_BINDING_NON_MASKABLE = 1 << 3,
META_KEY_BINDING_IGNORE_AUTOREPEAT = 1 << 4,
META_KEY_BINDING_NO_AUTO_GRAB = 1 << 5,
} MetaKeyBindingFlags;
/**

View File

@@ -566,7 +566,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
}
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;
@@ -613,7 +613,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
rect->clickable.height = button_height + button_y;
}
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;
if (i < n_left - 1)

View File

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

View File

@@ -48,26 +48,16 @@ typedef struct
char *lock_file;
int abstract_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_client *client;
struct wl_resource *xserver_resource;
char *display_name;
char *auth_file;
GCancellable *xserver_died_cancellable;
GSubprocess *proc;
GMainLoop *init_loop;
GList *x11_windows;
MetaXWaylandDnd *dnd;
} MetaXWaylandManager;

View File

@@ -418,9 +418,9 @@ meta_wayland_init (void)
meta_wayland_eglstream_controller_init (compositor);
#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");
}
@@ -443,9 +443,9 @@ meta_wayland_init (void)
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));
}
@@ -461,7 +461,7 @@ meta_wayland_get_wayland_display_name (MetaWaylandCompositor *compositor)
const char *
meta_wayland_get_xwayland_display_name (MetaWaylandCompositor *compositor)
{
return compositor->xwayland_manager.private_connection.name;
return compositor->xwayland_manager.display_name;
}
void
@@ -471,7 +471,7 @@ meta_wayland_finalize (void)
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);
}

View File

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

View File

@@ -41,7 +41,6 @@
#include "compositor/meta-surface-actor-wayland.h"
#include "compositor/meta-window-actor-private.h"
#include "core/main-private.h"
#include "meta/main.h"
#include "wayland/meta-wayland-actor-surface.h"
@@ -71,8 +70,6 @@ G_DEFINE_TYPE (MetaWaylandSurfaceRoleXWayland,
static int display_number_override = -1;
static void meta_xwayland_stop_xserver (MetaXWaylandManager *manager);
void
meta_xwayland_associate_window_with_surface (MetaWindow *window,
MetaWaylandSurface *surface)
@@ -371,45 +368,24 @@ xserver_died (GObject *source,
g_warning ("Failed to finish waiting for Xwayland: %s", error->message);
}
else if (!g_subprocess_get_successful (proc))
g_warning ("X Wayland process exited");
if (meta_get_x11_display_policy () == META_DISPLAY_POLICY_MANDATORY)
g_warning ("X Wayland crashed; exiting");
else
{
meta_exit (META_EXIT_ERROR);
/* 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");
}
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;
meta_exit (META_EXIT_ERROR);
}
static int
x_io_error (Display *display)
{
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;
}
@@ -421,36 +397,7 @@ meta_xwayland_override_display_number (int number)
}
static gboolean
open_display_sockets (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)
choose_xdisplay (MetaXWaylandManager *manager)
{
int display = 0;
char *lock_file = NULL;
@@ -470,10 +417,8 @@ choose_xdisplay (MetaXWaylandManager *manager,
return FALSE;
}
if (!open_display_sockets (manager, display,
&connection->abstract_fd,
&connection->unix_fd,
&fatal))
manager->abstract_fd = bind_to_abstract_socket (display, &fatal);
if (manager->abstract_fd < 0)
{
unlink (lock_file);
@@ -484,18 +429,27 @@ choose_xdisplay (MetaXWaylandManager *manager,
}
else
{
g_warning ("Failed to bind X11 socket");
g_warning ("Failed to bind abstract socket");
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;
}
while (1);
connection->display_index = display;
connection->name = g_strdup_printf (":%d", connection->display_index);
connection->lock_file = lock_file;
manager->display_index = display;
manager->display_name = g_strdup_printf (":%d", manager->display_index);
manager->lock_file = lock_file;
return TRUE;
}
@@ -582,7 +536,6 @@ on_displayfd_ready (int fd,
gpointer user_data)
{
MetaXWaylandManager *manager = user_data;
MetaDisplay *display = meta_get_display ();
/* The server writes its display name to the displayfd
* 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. */
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;
}
static gboolean
meta_xwayland_start_xserver (MetaXWaylandManager *manager)
meta_xwayland_init_xserver (MetaXWaylandManager *manager)
{
int xwayland_client_fd[2];
int displayfd[2];
@@ -634,15 +581,14 @@ meta_xwayland_start_xserver (MetaXWaylandManager *manager)
launcher = g_subprocess_launcher_new (flags);
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->public_connection.unix_fd, 5);
g_subprocess_launcher_take_fd (launcher, manager->abstract_fd, 4);
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, manager->private_connection.abstract_fd, 7);
g_subprocess_launcher_setenv (launcher, "WAYLAND_SOCKET", "3", TRUE);
manager->proc = g_subprocess_launcher_spawn (launcher, &error,
XWAYLAND_PATH, manager->public_connection.name,
XWAYLAND_PATH, manager->display_name,
"-rootless",
"-noreset",
"-accessx",
@@ -651,7 +597,6 @@ meta_xwayland_start_xserver (MetaXWaylandManager *manager)
"-listen", "4",
"-listen", "5",
"-displayfd", "6",
"-initfd", "7",
NULL);
if (!manager->proc)
{
@@ -675,133 +620,30 @@ meta_xwayland_start_xserver (MetaXWaylandManager *manager)
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
meta_xwayland_init (MetaXWaylandManager *manager,
struct wl_display *wl_display)
meta_xwayland_start (MetaXWaylandManager *manager,
struct wl_display *wl_display)
{
MetaDisplayPolicy policy;
gboolean fatal;
if (!manager->public_connection.name)
{
if (!choose_xdisplay (manager, &manager->public_connection))
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 (!choose_xdisplay (manager))
return FALSE;
if (!prepare_auth_file (manager))
return FALSE;
manager->wayland_display = wl_display;
policy = meta_get_x11_display_policy ();
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;
return meta_xwayland_init_xserver (manager);
}
static void
on_x11_display_closing (MetaDisplay *display)
{
meta_xwayland_shutdown_dnd ();
g_signal_handlers_disconnect_by_func (display,
on_x11_display_closing,
NULL);
}
/* To be called right after connecting */
void
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,
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
@@ -812,41 +654,31 @@ meta_xwayland_complete_init (MetaDisplay *display)
g_signal_connect (display, "x11-display-closing",
G_CALLBACK (on_x11_display_closing), NULL);
meta_xwayland_init_dnd ();
g_signal_connect (meta_get_display (), "window-created",
G_CALLBACK (window_created_cb), manager);
}
void
meta_xwayland_shutdown (MetaXWaylandManager *manager)
meta_xwayland_stop (MetaXWaylandManager *manager)
{
char path[256];
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);
snprintf (path, sizeof path, "/tmp/.X11-unix/X%d", manager->private_connection.display_index);
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);
}
g_clear_pointer (&manager->display_name, g_free);
if (manager->auth_file)
{
unlink (manager->auth_file);
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

View File

@@ -1580,18 +1580,19 @@ handle_other_xevent (MetaX11Display *x11_display,
workspace = meta_workspace_manager_get_workspace_by_index (workspace_manager, space);
if (workspace)
/* Handle clients using the older version of the spec... */
if (time == 0 && workspace)
{
/* Handle clients using the older version of the spec... */
if (time == 0)
time = meta_x11_display_get_current_time_roundtrip (x11_display);
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);
}
meta_workspace_activate (workspace, time);
}
if (workspace)
meta_workspace_activate (workspace, time);
else
{
meta_verbose ("Don't know about workspace %d\n", space);
}
meta_verbose ("Don't know about workspace %d\n", space);
}
else if (event->xclient.message_type ==
x11_display->atom__NET_NUMBER_OF_DESKTOPS)

View File

@@ -144,8 +144,6 @@ struct _MetaX11Display
guint keys_grabbed : 1;
guint closing : 1;
/* we use property updates as sentinels for certain window focus 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,
guint32 timestamp);
const gchar * meta_x11_get_display_name (void);
#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);
x11_display->closing = TRUE;
meta_x11_startup_notification_release (x11_display);
meta_prefs_remove_listener (prefs_changed_callback, x11_display);
meta_x11_display_ungrab_keys (x11_display);
g_clear_object (&x11_display->x11_stack);
meta_x11_selection_shutdown (x11_display);
meta_x11_display_unmanage_windows (x11_display);
g_clear_object (&x11_display->x11_stack);
if (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)
{
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);
XDestroyWindow (x11_display->xdisplay, x11_display->guard_window);
x11_display->guard_window = None;
}
@@ -977,25 +988,6 @@ meta_set_gnome_wm_keybindings (const char *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
meta_x11_init_gdk_display (GError **error)
{
@@ -1004,7 +996,7 @@ meta_x11_init_gdk_display (GError **error)
const char *gdk_gl_env = NULL;
Display *xdisplay;
xdisplay_name = meta_x11_get_display_name ();
xdisplay_name = g_getenv ("DISPLAY");
if (!xdisplay_name)
{
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
maybe_focus_default_window (MetaDisplay *display,
MetaWindow *not_this_one,
guint32 timestamp)
maybe_focus_default_window (MetaWorkspace *workspace,
MetaWindow *not_this_one,
guint32 timestamp)
{
MetaWorkspace *workspace;
MetaStack *stack = display->stack;
MetaStack *stack = workspace->display->stack;
g_autoptr (GList) focusable_windows = NULL;
g_autoptr (GQueue) focus_candidates = NULL;
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
* in order, waiting for a delay. The first one that replies to
* 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)
{
meta_display_unset_input_focus (window->display, timestamp);
maybe_focus_default_window (window->display, window,
maybe_focus_default_window (window->workspace, window,
timestamp);
}
}