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
41 changed files with 1631 additions and 580 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

@@ -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);

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',

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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -2035,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

@@ -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

@@ -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,
@@ -4476,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

@@ -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

@@ -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

@@ -372,12 +372,7 @@ meta_workspace_add_window (MetaWorkspace *workspace,
meta_workspace_invalidate_work_area (workspace);
}
if (window->type == META_WINDOW_NORMAL ||
window->type == META_WINDOW_DIALOG ||
window->type == META_WINDOW_MODAL_DIALOG ||
window->type == META_WINDOW_UTILITY)
g_signal_emit (workspace, signals[WINDOW_ADDED], 0, window);
g_signal_emit (workspace, signals[WINDOW_ADDED], 0, window);
g_object_notify_by_pspec (G_OBJECT (workspace), obj_props[PROP_N_WINDOWS]);
}
@@ -398,12 +393,7 @@ meta_workspace_remove_window (MetaWorkspace *workspace,
meta_workspace_invalidate_work_area (workspace);
}
if (window->type == META_WINDOW_NORMAL ||
window->type == META_WINDOW_DIALOG ||
window->type == META_WINDOW_MODAL_DIALOG ||
window->type == META_WINDOW_UTILITY)
g_signal_emit (workspace, signals[WINDOW_REMOVED], 0, window);
g_signal_emit (workspace, signals[WINDOW_REMOVED], 0, window);
g_object_notify (G_OBJECT (workspace), "n-windows");
}

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

@@ -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

@@ -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);
}
}