Compare commits
87 Commits
gnome-3-28
...
wip/carlos
Author | SHA1 | Date | |
---|---|---|---|
![]() |
255a7afe73 | ||
![]() |
3649795108 | ||
![]() |
36b9551f92 | ||
![]() |
6abe4703c7 | ||
![]() |
69ca584168 | ||
![]() |
8ee14a7cb7 | ||
![]() |
909dbafd67 | ||
![]() |
d5203f170e | ||
![]() |
2a45b7de7c | ||
![]() |
62c67be4c8 | ||
![]() |
0332b7394e | ||
![]() |
15f41c9f68 | ||
![]() |
2a38601b42 | ||
![]() |
d7bdc1591f | ||
![]() |
bd36764b4d | ||
![]() |
473bf38753 | ||
![]() |
f7747e4d4f | ||
![]() |
e8dc2acfca | ||
![]() |
cf734999fb | ||
![]() |
c9c3283540 | ||
![]() |
d2a8cdfd7c | ||
![]() |
3e85ac8131 | ||
![]() |
5f83d9a5c8 | ||
![]() |
ac20bf2000 | ||
![]() |
3561082aba | ||
![]() |
e34c330f66 | ||
![]() |
7655e09d00 | ||
![]() |
be069fb8ae | ||
![]() |
a30166a547 | ||
![]() |
0f9c6aef99 | ||
![]() |
332d55f7f6 | ||
![]() |
98d7024288 | ||
![]() |
82564772dc | ||
![]() |
33c2a38ff7 | ||
![]() |
52fdd24467 | ||
![]() |
2319cd9c40 | ||
![]() |
3b4319a87c | ||
![]() |
20176d0395 | ||
![]() |
762a3f89a9 | ||
![]() |
822c2666f5 | ||
![]() |
b412e6c493 | ||
![]() |
ae26cd0774 | ||
![]() |
3104d697c0 | ||
![]() |
0b3a1c9c31 | ||
![]() |
423c5f8e77 | ||
![]() |
3bbff94878 | ||
![]() |
4ef886f51e | ||
![]() |
22485ba36f | ||
![]() |
8df2a1452c | ||
![]() |
b12c92e206 | ||
![]() |
70036429bd | ||
![]() |
44502be560 | ||
![]() |
8cf42cd06c | ||
![]() |
b5328c977e | ||
![]() |
4339b23dd0 | ||
![]() |
a95cbd0aca | ||
![]() |
6df2b7af55 | ||
![]() |
c01b099dbd | ||
![]() |
2d80fd02e7 | ||
![]() |
bb65854065 | ||
![]() |
bc05e49eba | ||
![]() |
773b8384fa | ||
![]() |
7fdac6d310 | ||
![]() |
f6cd87734d | ||
![]() |
01a0fa9437 | ||
![]() |
657417a578 | ||
![]() |
4af00ae296 | ||
![]() |
84e575be77 | ||
![]() |
7945ee5beb | ||
![]() |
b6f5bab212 | ||
![]() |
5ad34e0efb | ||
![]() |
a1c34aad09 | ||
![]() |
98dfd5b887 | ||
![]() |
17a745bf81 | ||
![]() |
85bbd82ae8 | ||
![]() |
deda7a5235 | ||
![]() |
96141e28f9 | ||
![]() |
e6109cfc22 | ||
![]() |
3684f6b0ac | ||
![]() |
31b5059068 | ||
![]() |
ebff7fd7f4 | ||
![]() |
6e415353e3 | ||
![]() |
67917db45f | ||
![]() |
8286557a05 | ||
![]() |
63e2c0329f | ||
![]() |
06c357d781 | ||
![]() |
2f260edf19 |
66
NEWS
66
NEWS
@@ -1,70 +1,34 @@
|
||||
3.28.4
|
||||
======
|
||||
* Don't expose resolutions that are below the minimum [Andrea; #793223]
|
||||
* Fix lock up with some DRI drivers [Alex; #127]
|
||||
* Improve grab-device clock updates on X11 [Jeff; !174]
|
||||
* Prevent clients from modifying the shared keymap [Jonas; #784206]
|
||||
* Fix screen rotation regression [Jonas; #216]
|
||||
* Fix non-lowercase letters on virtual key devices [Carlos; gnome-shell#135]
|
||||
* Send correct button codes from virtual evdev devices [Jonas; !190]
|
||||
* Avoid crash when a cursor is not found [Sebastian; #254]
|
||||
* Improve EGLstream support [Miguel; #2, #782575]
|
||||
* Handle requests to unmanaged windows gracefully [Jonas; #240]
|
||||
* Improve support for proprietary Nvidia driver [Jonas; #790316]
|
||||
* Fix handling of non-UTF8 encodings [Florian; !227]
|
||||
* Consider remapped keys when guessing keycode from keysym [Andrea; #443]
|
||||
* Fix support of extended characters in on-screen keyboard [Andrea; #109]
|
||||
* Various crash fixes [Jonas, Olivier, Florian, Marco; #70, #189, #15,
|
||||
#130, #255, #194, #336, #576]
|
||||
* Misc. bug fixes [Iain, Jonas, Sam, Carlos, Florian, Olivier, Marco; #223,
|
||||
#192, #788834, #782344, !130, #134, #221, #306, #279, #331, !557]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Andrea Azzarone, Olivier Fourdan, Carlos Garnacho,
|
||||
Sebastian Keller, Iain Lane, Alex Villacís Lasso, Florian Müllner,
|
||||
Bastien Nocera, Aaron Plattner, Jeff Smith, Sam Spilsbury,
|
||||
Marco Trevisan (Treviño), Miguel A. Vico, Daniel van Vugt
|
||||
|
||||
3.28.3
|
||||
3.29.2
|
||||
======
|
||||
* Fix size change animations on wayland [Georges; #780292]
|
||||
* Handle touch events on server-side titlebars [Carlos; #770185]
|
||||
* Fix crash with unhandled mouse buttons on titlebars [Olivier; #160]
|
||||
* Fix Korean Hangul support on wayland [Changwoo; #152]
|
||||
* Fix crash when taking up from suspend [Jonas; #786929]
|
||||
* Fix crash with parent-less modal dialogs [Olivier; #174]
|
||||
* Misc. bug fixes [Olivier, Georges; #83, #112, #150, #104,
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Olivier Fourdan, Carlos Garnacho, Georges Basile Stavracas Neto,
|
||||
Changwoo Ryu, Marco Trevisan (Treviño)
|
||||
|
||||
3.28.2
|
||||
======
|
||||
* Take inhibitors into account for monitoring idle [Bastien; #705942]
|
||||
* Fix window animations on wayland [Georges; #780292]
|
||||
* Misc. bug fixes [Mario, Jonas, Olivier, Florian; gnome-shell#157, #130,
|
||||
#21, #124, !96, #138, !102, #781471]
|
||||
* Misc. bug fixes [Florian, Olivier, Jonas, Georges; #134, #124, !96, #138,
|
||||
!102, #781471, #150]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Olivier Fourdan, Carlos Garnacho, Florian Müllner,
|
||||
Georges Basile Stavracas Neto, Bastien Nocera, Mario Sanchez Prada,
|
||||
Ray Strode, Marco Trevisan (Treviño)
|
||||
Georges Basile Stavracas Neto, Marco Trevisan (Treviño), Daniel van Vugt
|
||||
|
||||
3.28.1
|
||||
Translators:
|
||||
Daniel Șerbănescu [ro], Marcos Lans [gl], Dz Chen [zh_CN]
|
||||
|
||||
3.29.1
|
||||
======
|
||||
* Fix various input-method regressions [Carlos; #65, #74, #66]
|
||||
* Fix various input-method regressions [Carlos, Olivier; #65, #74, #66, #112]
|
||||
* Fix wayland build on FreeBSD [Ting-Wei; #792280, #792717]
|
||||
* Fix swapped colors in screenshots (again) [Carlos; #72]
|
||||
* Allow building with elogind [Rasmus; !46]
|
||||
* Consider display rotation for cursor [Olivier; #85]
|
||||
* Fall back to non-modifier GBM surfaces [Daniel; #84]
|
||||
* Disable KMS modifiers by default [Jonas; #81]
|
||||
* Misc bug fixes [handsome-feng; !45]
|
||||
* Take inhibitors into account for monitoring idle [Bastien; #705942]
|
||||
* Misc. bug fixes [handsome-feng, Olivier, Mario, Jonas; !45, #83, #104,
|
||||
gnome-shell#157, #130, #21]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Olivier Fourdan, Carlos Garnacho, handsome-feng, Yussuf Khalil,
|
||||
Ting-Wei Lan, Aleksandr Mezin, Alberts Muktupāvels,
|
||||
Georges Basile Stavracas Neto, Benjamin Otte, Daniel Stone, Rasmus Thomsen,
|
||||
Georges Basile Stavracas Neto, Bastien Nocera, Benjamin Otte,
|
||||
Mario Sanchez Prada, Daniel Stone, Ray Strode, Rasmus Thomsen,
|
||||
Marco Trevisan (Treviño), Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
|
@@ -840,8 +840,6 @@ struct _ClutterActorPrivate
|
||||
guint needs_compute_expand : 1;
|
||||
guint needs_x_expand : 1;
|
||||
guint needs_y_expand : 1;
|
||||
guint needs_paint_volume_update : 1;
|
||||
guint had_effects_on_last_paint_volume_update : 1;
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -1094,11 +1092,6 @@ static void clutter_actor_set_child_transform_internal (ClutterActor *sel
|
||||
static void clutter_actor_realize_internal (ClutterActor *self);
|
||||
static void clutter_actor_unrealize_internal (ClutterActor *self);
|
||||
|
||||
static void clutter_actor_push_in_cloned_branch (ClutterActor *self,
|
||||
gulong count);
|
||||
static void clutter_actor_pop_in_cloned_branch (ClutterActor *self,
|
||||
gulong count);
|
||||
|
||||
/* Helper macro which translates by the anchor coord, applies the
|
||||
given transformation and then translates back */
|
||||
#define TRANSFORM_ABOUT_ANCHOR_COORD(a,m,c,_transform) G_STMT_START { \
|
||||
@@ -1511,8 +1504,6 @@ clutter_actor_real_map (ClutterActor *self)
|
||||
|
||||
CLUTTER_ACTOR_SET_FLAGS (self, CLUTTER_ACTOR_MAPPED);
|
||||
|
||||
self->priv->needs_paint_volume_update = TRUE;
|
||||
|
||||
stage = _clutter_actor_get_stage_internal (self);
|
||||
priv->pick_id = _clutter_stage_acquire_pick_id (CLUTTER_STAGE (stage), self);
|
||||
|
||||
@@ -2746,7 +2737,6 @@ clutter_actor_real_queue_relayout (ClutterActor *self)
|
||||
priv->needs_width_request = TRUE;
|
||||
priv->needs_height_request = TRUE;
|
||||
priv->needs_allocation = TRUE;
|
||||
priv->needs_paint_volume_update = TRUE;
|
||||
|
||||
/* reset the cached size requests */
|
||||
memset (priv->width_requests, 0,
|
||||
@@ -4295,9 +4285,6 @@ clutter_actor_remove_child_internal (ClutterActor *self,
|
||||
|
||||
self->priv->age += 1;
|
||||
|
||||
if (self->priv->in_cloned_branch)
|
||||
clutter_actor_pop_in_cloned_branch (child, self->priv->in_cloned_branch);
|
||||
|
||||
/* if the child that got removed was visible and set to
|
||||
* expand then we want to reset the parent's state in
|
||||
* case the child was the only thing that was making it
|
||||
@@ -8531,7 +8518,6 @@ clutter_actor_init (ClutterActor *self)
|
||||
priv->needs_width_request = TRUE;
|
||||
priv->needs_height_request = TRUE;
|
||||
priv->needs_allocation = TRUE;
|
||||
priv->needs_paint_volume_update = TRUE;
|
||||
|
||||
priv->cached_width_age = 1;
|
||||
priv->cached_height_age = 1;
|
||||
@@ -10098,9 +10084,6 @@ clutter_actor_allocate (ClutterActor *self,
|
||||
return;
|
||||
}
|
||||
|
||||
if (CLUTTER_ACTOR_IS_MAPPED (self))
|
||||
self->priv->needs_paint_volume_update = TRUE;
|
||||
|
||||
if (!stage_allocation_changed)
|
||||
{
|
||||
/* If the actor didn't move but needs_allocation is set, we just
|
||||
@@ -12919,9 +12902,6 @@ clutter_actor_add_child_internal (ClutterActor *self,
|
||||
|
||||
self->priv->age += 1;
|
||||
|
||||
if (self->priv->in_cloned_branch)
|
||||
clutter_actor_push_in_cloned_branch (child, self->priv->in_cloned_branch);
|
||||
|
||||
/* if push_internal() has been called then we automatically set
|
||||
* the flag on the actor
|
||||
*/
|
||||
@@ -12992,9 +12972,6 @@ clutter_actor_add_child_internal (ClutterActor *self,
|
||||
child->priv->needs_height_request = TRUE;
|
||||
child->priv->needs_allocation = TRUE;
|
||||
|
||||
if (CLUTTER_ACTOR_IS_MAPPED (child))
|
||||
child->priv->needs_paint_volume_update = TRUE;
|
||||
|
||||
/* we only queue a relayout here, because any possible
|
||||
* redraw has already been queued either by show() or
|
||||
* by our call to queue_redraw() above
|
||||
@@ -17486,7 +17463,7 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
|
||||
*/
|
||||
effects = _clutter_meta_group_peek_metas (priv->effects);
|
||||
for (l = effects;
|
||||
l != NULL && l->data != priv->current_effect;
|
||||
l != NULL || (l != NULL && l->data != priv->current_effect);
|
||||
l = l->next)
|
||||
{
|
||||
if (!_clutter_effect_get_paint_volume (l->data, pv))
|
||||
@@ -17522,32 +17499,6 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_clutter_actor_has_active_paint_volume_override_effects (ClutterActor *self)
|
||||
{
|
||||
const GList *l;
|
||||
|
||||
if (self->priv->effects == NULL)
|
||||
return FALSE;
|
||||
|
||||
/* We just need to all effects current effect to see
|
||||
* if anyone wants to override the paint volume. If so, then
|
||||
* we need to recompute, since the paint volume returned can
|
||||
* change from call to call. */
|
||||
for (l = _clutter_meta_group_peek_metas (self->priv->effects);
|
||||
l != NULL;
|
||||
l = l->next)
|
||||
{
|
||||
ClutterEffect *effect = l->data;
|
||||
|
||||
if (clutter_actor_meta_get_enabled (CLUTTER_ACTOR_META (effect)) &&
|
||||
_clutter_effect_has_custom_paint_volume (effect))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* The public clutter_actor_get_paint_volume API returns a const
|
||||
* pointer since we return a pointer directly to the cached
|
||||
* PaintVolume associated with the actor and don't want the user to
|
||||
@@ -17558,37 +17509,16 @@ _clutter_actor_has_active_paint_volume_override_effects (ClutterActor *self)
|
||||
static ClutterPaintVolume *
|
||||
_clutter_actor_get_paint_volume_mutable (ClutterActor *self)
|
||||
{
|
||||
gboolean has_paint_volume_override_effects;
|
||||
ClutterActorPrivate *priv;
|
||||
|
||||
priv = self->priv;
|
||||
|
||||
has_paint_volume_override_effects = _clutter_actor_has_active_paint_volume_override_effects (self);
|
||||
|
||||
if (priv->paint_volume_valid)
|
||||
{
|
||||
/* If effects are applied, the actor paint volume
|
||||
* needs to be recomputed on each paint, since those
|
||||
* paint volumes could change over the duration of the
|
||||
* effect.
|
||||
*
|
||||
* We also need to update the paint volume if we went
|
||||
* from having effects to not having effects on the last
|
||||
* paint volume update. */
|
||||
if (!priv->needs_paint_volume_update &&
|
||||
priv->current_effect == NULL &&
|
||||
!has_paint_volume_override_effects &&
|
||||
!priv->had_effects_on_last_paint_volume_update)
|
||||
return &priv->paint_volume;
|
||||
clutter_paint_volume_free (&priv->paint_volume);
|
||||
}
|
||||
|
||||
priv->had_effects_on_last_paint_volume_update = has_paint_volume_override_effects;
|
||||
clutter_paint_volume_free (&priv->paint_volume);
|
||||
|
||||
if (_clutter_actor_get_paint_volume_real (self, &priv->paint_volume))
|
||||
{
|
||||
priv->paint_volume_valid = TRUE;
|
||||
priv->needs_paint_volume_update = FALSE;
|
||||
return &priv->paint_volume;
|
||||
}
|
||||
else
|
||||
@@ -20758,31 +20688,29 @@ clutter_actor_get_child_transform (ClutterActor *self,
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_actor_push_in_cloned_branch (ClutterActor *self,
|
||||
gulong count)
|
||||
clutter_actor_push_in_cloned_branch (ClutterActor *self)
|
||||
{
|
||||
ClutterActor *iter;
|
||||
|
||||
for (iter = self->priv->first_child;
|
||||
iter != NULL;
|
||||
iter = iter->priv->next_sibling)
|
||||
clutter_actor_push_in_cloned_branch (iter, count);
|
||||
clutter_actor_push_in_cloned_branch (iter);
|
||||
|
||||
self->priv->in_cloned_branch += count;
|
||||
self->priv->in_cloned_branch += 1;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_actor_pop_in_cloned_branch (ClutterActor *self,
|
||||
gulong count)
|
||||
clutter_actor_pop_in_cloned_branch (ClutterActor *self)
|
||||
{
|
||||
ClutterActor *iter;
|
||||
|
||||
self->priv->in_cloned_branch -= count;
|
||||
self->priv->in_cloned_branch -= 1;
|
||||
|
||||
for (iter = self->priv->first_child;
|
||||
iter != NULL;
|
||||
iter = iter->priv->next_sibling)
|
||||
clutter_actor_pop_in_cloned_branch (iter, count);
|
||||
clutter_actor_pop_in_cloned_branch (iter);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -20798,7 +20726,7 @@ _clutter_actor_attach_clone (ClutterActor *actor,
|
||||
|
||||
g_hash_table_add (priv->clones, clone);
|
||||
|
||||
clutter_actor_push_in_cloned_branch (actor, 1);
|
||||
clutter_actor_push_in_cloned_branch (actor);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -20813,7 +20741,7 @@ _clutter_actor_detach_clone (ClutterActor *actor,
|
||||
g_hash_table_lookup (priv->clones, clone) == NULL)
|
||||
return;
|
||||
|
||||
clutter_actor_pop_in_cloned_branch (actor, 1);
|
||||
clutter_actor_pop_in_cloned_branch (actor);
|
||||
|
||||
g_hash_table_remove (priv->clones, clone);
|
||||
|
||||
|
@@ -9,7 +9,6 @@ gboolean _clutter_effect_pre_paint (ClutterEffect
|
||||
void _clutter_effect_post_paint (ClutterEffect *effect);
|
||||
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
|
||||
void _clutter_effect_paint (ClutterEffect *effect,
|
||||
ClutterEffectPaintFlags flags);
|
||||
void _clutter_effect_pick (ClutterEffect *effect,
|
||||
|
@@ -308,14 +308,6 @@ _clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||
return CLUTTER_EFFECT_GET_CLASS (effect)->get_paint_volume (effect, volume);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_clutter_effect_has_custom_paint_volume (ClutterEffect *effect)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
|
||||
|
||||
return CLUTTER_EFFECT_GET_CLASS (effect)->get_paint_volume != clutter_effect_real_get_paint_volume;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_effect_queue_repaint:
|
||||
* @effect: A #ClutterEffect which needs redrawing
|
||||
|
@@ -186,12 +186,6 @@ update_fbo (ClutterEffect *effect, int fbo_width, int fbo_height)
|
||||
priv->texture = NULL;
|
||||
}
|
||||
|
||||
if (priv->offscreen != NULL)
|
||||
{
|
||||
cogl_handle_unref (priv->offscreen);
|
||||
priv->offscreen = NULL;
|
||||
}
|
||||
|
||||
priv->texture =
|
||||
clutter_offscreen_effect_create_texture (self, fbo_width, fbo_height);
|
||||
if (priv->texture == NULL)
|
||||
@@ -202,6 +196,9 @@ update_fbo (ClutterEffect *effect, int fbo_width, int fbo_height)
|
||||
priv->fbo_width = fbo_width;
|
||||
priv->fbo_height = fbo_height;
|
||||
|
||||
if (priv->offscreen != NULL)
|
||||
cogl_handle_unref (priv->offscreen);
|
||||
|
||||
priv->offscreen = cogl_offscreen_new_to_texture (priv->texture);
|
||||
if (priv->offscreen == NULL)
|
||||
{
|
||||
|
@@ -1166,21 +1166,6 @@ _clutter_paint_volume_get_stage_paint_box (ClutterPaintVolume *pv,
|
||||
|
||||
_clutter_paint_volume_get_bounding_box (&projected_pv, box);
|
||||
|
||||
if (pv->is_2d && pv->actor &&
|
||||
clutter_actor_get_z_position (pv->actor) == 0)
|
||||
{
|
||||
/* If the volume/actor are perfectly 2D, take the bounding box as
|
||||
* good. We won't need to add any extra room for sub-pixel positioning
|
||||
* in this case.
|
||||
*/
|
||||
clutter_paint_volume_free (&projected_pv);
|
||||
box->x1 = CLUTTER_NEARBYINT (box->x1);
|
||||
box->y1 = CLUTTER_NEARBYINT (box->y1);
|
||||
box->x2 = CLUTTER_NEARBYINT (box->x2);
|
||||
box->y2 = CLUTTER_NEARBYINT (box->y2);
|
||||
return;
|
||||
}
|
||||
|
||||
/* The aim here is that for a given rectangle defined with floating point
|
||||
* coordinates we want to determine a stable quantized size in pixels
|
||||
* that doesn't vary due to the original box's sub-pixel position.
|
||||
|
@@ -1782,7 +1782,7 @@ selection_paint (ClutterText *self)
|
||||
CoglColor cogl_color = { 0, };
|
||||
CoglFramebuffer *fb;
|
||||
|
||||
fb = cogl_get_draw_framebuffer ();
|
||||
fb = _clutter_actor_get_active_framebuffer (actor);
|
||||
if (G_UNLIKELY (fb == NULL))
|
||||
return;
|
||||
|
||||
@@ -2391,7 +2391,13 @@ clutter_text_paint (ClutterActor *self)
|
||||
float alloc_width;
|
||||
float alloc_height;
|
||||
|
||||
fb = cogl_get_draw_framebuffer ();
|
||||
/* FIXME: this should not be needed, but apparently the text-cache
|
||||
* test unit manages to get in a situation where the active frame
|
||||
* buffer is NULL
|
||||
*/
|
||||
fb = _clutter_actor_get_active_framebuffer (self);
|
||||
if (fb == NULL)
|
||||
fb = cogl_get_draw_framebuffer ();
|
||||
|
||||
/* Note that if anything in this paint method changes it needs to be
|
||||
reflected in the get_paint_volume implementation which is tightly
|
||||
|
@@ -185,26 +185,6 @@ clutter_virtual_input_device_evdev_notify_absolute_motion (ClutterVirtualInputDe
|
||||
NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
translate_to_evdev_button (int clutter_button)
|
||||
{
|
||||
switch (clutter_button)
|
||||
{
|
||||
case CLUTTER_BUTTON_PRIMARY:
|
||||
return BTN_LEFT;
|
||||
case CLUTTER_BUTTON_SECONDARY:
|
||||
return BTN_RIGHT;
|
||||
case CLUTTER_BUTTON_MIDDLE:
|
||||
return BTN_MIDDLE;
|
||||
default:
|
||||
/*
|
||||
* For compatibility reasons, all additional buttons go after the old
|
||||
* 4-7 scroll ones.
|
||||
*/
|
||||
return clutter_button + (BTN_LEFT - 1) - 4;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_virtual_input_device_evdev_notify_button (ClutterVirtualInputDevice *virtual_device,
|
||||
uint64_t time_us,
|
||||
@@ -214,33 +194,30 @@ clutter_virtual_input_device_evdev_notify_button (ClutterVirtualInputDevice *vir
|
||||
ClutterVirtualInputDeviceEvdev *virtual_evdev =
|
||||
CLUTTER_VIRTUAL_INPUT_DEVICE_EVDEV (virtual_device);
|
||||
int button_count;
|
||||
int evdev_button;
|
||||
|
||||
if (time_us == CLUTTER_CURRENT_TIME)
|
||||
time_us = g_get_monotonic_time ();
|
||||
|
||||
evdev_button = translate_to_evdev_button (button);
|
||||
|
||||
if (get_button_type (evdev_button) != EVDEV_BUTTON_TYPE_BUTTON)
|
||||
if (get_button_type (button) != EVDEV_BUTTON_TYPE_BUTTON)
|
||||
{
|
||||
g_warning ("Unknown/invalid virtual device button 0x%x pressed",
|
||||
evdev_button);
|
||||
button);
|
||||
return;
|
||||
}
|
||||
|
||||
button_count = update_button_count (virtual_evdev, evdev_button, button_state);
|
||||
button_count = update_button_count (virtual_evdev, button, button_state);
|
||||
if (button_count < 0 || button_count > 1)
|
||||
{
|
||||
g_warning ("Received multiple virtual 0x%x button %s (ignoring)", evdev_button,
|
||||
g_warning ("Received multiple virtual 0x%x button %s (ignoring)", button,
|
||||
button_state == CLUTTER_BUTTON_STATE_PRESSED ? "presses" : "releases");
|
||||
update_button_count (virtual_evdev, evdev_button, 1 - button_state);
|
||||
update_button_count (virtual_evdev, button, 1 - button_state);
|
||||
return;
|
||||
}
|
||||
|
||||
clutter_seat_evdev_notify_button (virtual_evdev->seat,
|
||||
virtual_evdev->device,
|
||||
time_us,
|
||||
evdev_button,
|
||||
button,
|
||||
button_state);
|
||||
}
|
||||
|
||||
|
@@ -110,7 +110,8 @@ clutter_input_device_xi2_finalize (GObject *object)
|
||||
if (device_xi2->wacom_device)
|
||||
libwacom_destroy (device_xi2->wacom_device);
|
||||
|
||||
g_array_unref (device_xi2->group_modes);
|
||||
if (device_xi2->group_modes)
|
||||
g_array_unref (device_xi2->group_modes);
|
||||
#endif
|
||||
|
||||
G_OBJECT_CLASS (clutter_input_device_xi2_parent_class)->finalize (object);
|
||||
|
@@ -38,14 +38,6 @@
|
||||
|
||||
typedef struct _ClutterKeymapX11Class ClutterKeymapX11Class;
|
||||
typedef struct _DirectionCacheEntry DirectionCacheEntry;
|
||||
typedef struct _ClutterKeymapKey ClutterKeymapKey;
|
||||
|
||||
struct _ClutterKeymapKey
|
||||
{
|
||||
guint keycode;
|
||||
guint group;
|
||||
guint level;
|
||||
};
|
||||
|
||||
struct _DirectionCacheEntry
|
||||
{
|
||||
@@ -67,7 +59,6 @@ struct _ClutterKeymapX11
|
||||
|
||||
ClutterModifierType num_lock_mask;
|
||||
ClutterModifierType scroll_lock_mask;
|
||||
ClutterModifierType level3_shift_mask;
|
||||
|
||||
PangoDirection current_direction;
|
||||
|
||||
@@ -78,10 +69,6 @@ struct _ClutterKeymapX11
|
||||
Atom current_group_atom;
|
||||
guint current_cache_serial;
|
||||
DirectionCacheEntry group_direction_cache[4];
|
||||
int current_group;
|
||||
|
||||
GHashTable *reserved_keycodes;
|
||||
GQueue *available_keycodes;
|
||||
#endif
|
||||
|
||||
guint caps_lock_state : 1;
|
||||
@@ -211,9 +198,6 @@ get_xkb (ClutterKeymapX11 *keymap_x11)
|
||||
if (keymap_x11->scroll_lock_mask == 0)
|
||||
keymap_x11->scroll_lock_mask = XkbKeysymToModifiers (backend_x11->xdpy,
|
||||
XK_Scroll_Lock);
|
||||
if (keymap_x11->level3_shift_mask == 0)
|
||||
keymap_x11->level3_shift_mask = XkbKeysymToModifiers (backend_x11->xdpy,
|
||||
XK_ISO_Level3_Shift);
|
||||
|
||||
return keymap_x11->xkb_desc;
|
||||
}
|
||||
@@ -444,100 +428,16 @@ clutter_keymap_x11_set_property (GObject *gobject,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
static void
|
||||
clutter_keymap_x11_refresh_reserved_keycodes (ClutterKeymapX11 *keymap_x11)
|
||||
{
|
||||
Display *dpy = clutter_x11_get_default_display ();
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
|
||||
g_hash_table_iter_init (&iter, keymap_x11->reserved_keycodes);
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
guint reserved_keycode = GPOINTER_TO_UINT (key);
|
||||
guint reserved_keysym = GPOINTER_TO_UINT (value);
|
||||
guint actual_keysym = XkbKeycodeToKeysym (dpy, reserved_keycode, 0, 0);
|
||||
|
||||
/* If an available keycode is no longer mapped to the stored keysym, then
|
||||
* the keycode should not be considered available anymore and should be
|
||||
* removed both from the list of available and reserved keycodes.
|
||||
*/
|
||||
if (reserved_keysym != actual_keysym)
|
||||
{
|
||||
g_hash_table_iter_remove (&iter);
|
||||
g_queue_remove (keymap_x11->available_keycodes, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_keymap_x11_replace_keycode (ClutterKeymapX11 *keymap_x11,
|
||||
KeyCode keycode,
|
||||
KeySym keysym)
|
||||
{
|
||||
if (CLUTTER_BACKEND_X11 (keymap_x11->backend)->use_xkb)
|
||||
{
|
||||
Display *dpy = clutter_x11_get_default_display ();
|
||||
XkbDescPtr xkb = get_xkb (keymap_x11);
|
||||
XkbMapChangesRec changes;
|
||||
|
||||
XFlush (dpy);
|
||||
|
||||
xkb->device_spec = XkbUseCoreKbd;
|
||||
memset (&changes, 0, sizeof(changes));
|
||||
|
||||
if (keysym != NoSymbol)
|
||||
{
|
||||
int types[XkbNumKbdGroups] = { XkbOneLevelIndex };
|
||||
XkbChangeTypesOfKey (xkb, keycode, 1, XkbGroup1Mask, types, &changes);
|
||||
XkbKeySymEntry (xkb, keycode, 0, 0) = keysym;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Reset to NoSymbol */
|
||||
XkbChangeTypesOfKey (xkb, keycode, 0, XkbGroup1Mask, NULL, &changes);
|
||||
}
|
||||
|
||||
changes.changed = XkbKeySymsMask | XkbKeyTypesMask;
|
||||
changes.first_key_sym = keycode;
|
||||
changes.num_key_syms = 1;
|
||||
changes.first_type = 0;
|
||||
changes.num_types = xkb->map->num_types;
|
||||
XkbChangeMap (dpy, xkb, &changes);
|
||||
|
||||
XFlush (dpy);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
clutter_keymap_x11_finalize (GObject *gobject)
|
||||
{
|
||||
ClutterKeymapX11 *keymap;
|
||||
ClutterEventTranslator *translator;
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
|
||||
keymap = CLUTTER_KEYMAP_X11 (gobject);
|
||||
translator = CLUTTER_EVENT_TRANSLATOR (keymap);
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
clutter_keymap_x11_refresh_reserved_keycodes (keymap);
|
||||
g_hash_table_iter_init (&iter, keymap->reserved_keycodes);
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
guint keycode = GPOINTER_TO_UINT (key);
|
||||
clutter_keymap_x11_replace_keycode (keymap, keycode, NoSymbol);
|
||||
}
|
||||
|
||||
g_hash_table_destroy (keymap->reserved_keycodes);
|
||||
g_queue_free (keymap->available_keycodes);
|
||||
|
||||
_clutter_backend_remove_event_translator (keymap->backend, translator);
|
||||
|
||||
if (keymap->xkb_desc != NULL)
|
||||
@@ -547,7 +447,6 @@ clutter_keymap_x11_finalize (GObject *gobject)
|
||||
G_OBJECT_CLASS (clutter_keymap_x11_parent_class)->finalize (gobject);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
clutter_keymap_x11_class_init (ClutterKeymapX11Class *klass)
|
||||
{
|
||||
@@ -570,12 +469,6 @@ static void
|
||||
clutter_keymap_x11_init (ClutterKeymapX11 *keymap)
|
||||
{
|
||||
keymap->current_direction = PANGO_DIRECTION_NEUTRAL;
|
||||
keymap->current_group = -1;
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
keymap->reserved_keycodes = g_hash_table_new (NULL, NULL);
|
||||
keymap->available_keycodes = g_queue_new ();
|
||||
#endif
|
||||
}
|
||||
|
||||
static ClutterTranslateReturn
|
||||
@@ -605,8 +498,7 @@ clutter_keymap_x11_translate_event (ClutterEventTranslator *translator,
|
||||
{
|
||||
case XkbStateNotify:
|
||||
CLUTTER_NOTE (EVENT, "Updating keyboard state");
|
||||
keymap_x11->current_group = XkbStateGroup (&xkb_event->state);
|
||||
update_direction (keymap_x11, keymap_x11->current_group);
|
||||
update_direction (keymap_x11, XkbStateGroup (&xkb_event->state));
|
||||
update_locked_mods (keymap_x11, xkb_event->state.locked_mods);
|
||||
retval = CLUTTER_TRANSLATE_REMOVE;
|
||||
break;
|
||||
@@ -773,258 +665,3 @@ _clutter_keymap_x11_get_direction (ClutterKeymapX11 *keymap)
|
||||
#endif
|
||||
return PANGO_DIRECTION_NEUTRAL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_keymap_x11_get_entries_for_keyval (ClutterKeymapX11 *keymap_x11,
|
||||
guint keyval,
|
||||
ClutterKeymapKey **keys,
|
||||
gint *n_keys)
|
||||
{
|
||||
#ifdef HAVE_XKB
|
||||
if (CLUTTER_BACKEND_X11 (keymap_x11->backend)->use_xkb)
|
||||
{
|
||||
XkbDescRec *xkb = get_xkb (keymap_x11);
|
||||
GArray *retval;
|
||||
gint keycode;
|
||||
|
||||
keycode = keymap_x11->min_keycode;
|
||||
retval = g_array_new (FALSE, FALSE, sizeof (ClutterKeymapKey));
|
||||
|
||||
while (keycode <= keymap_x11->max_keycode)
|
||||
{
|
||||
gint max_shift_levels = XkbKeyGroupsWidth (xkb, keycode);
|
||||
gint group = 0;
|
||||
gint level = 0;
|
||||
gint total_syms = XkbKeyNumSyms (xkb, keycode);
|
||||
gint i = 0;
|
||||
KeySym *entry;
|
||||
|
||||
/* entry is an array with all syms for group 0, all
|
||||
* syms for group 1, etc. and for each group the
|
||||
* shift level syms are in order
|
||||
*/
|
||||
entry = XkbKeySymsPtr (xkb, keycode);
|
||||
|
||||
while (i < total_syms)
|
||||
{
|
||||
g_assert (i == (group * max_shift_levels + level));
|
||||
|
||||
if (entry[i] == keyval)
|
||||
{
|
||||
ClutterKeymapKey key;
|
||||
|
||||
key.keycode = keycode;
|
||||
key.group = group;
|
||||
key.level = level;
|
||||
|
||||
g_array_append_val (retval, key);
|
||||
|
||||
g_assert (XkbKeySymEntry (xkb, keycode, level, group) ==
|
||||
keyval);
|
||||
}
|
||||
|
||||
++level;
|
||||
|
||||
if (level == max_shift_levels)
|
||||
{
|
||||
level = 0;
|
||||
++group;
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
++keycode;
|
||||
}
|
||||
|
||||
if (retval->len > 0)
|
||||
{
|
||||
*keys = (ClutterKeymapKey*) retval->data;
|
||||
*n_keys = retval->len;
|
||||
}
|
||||
else
|
||||
{
|
||||
*keys = NULL;
|
||||
*n_keys = 0;
|
||||
}
|
||||
|
||||
g_array_free (retval, retval->len > 0 ? FALSE : TRUE);
|
||||
|
||||
return *n_keys > 0;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
static guint
|
||||
clutter_keymap_x11_get_available_keycode (ClutterKeymapX11 *keymap_x11)
|
||||
{
|
||||
if (CLUTTER_BACKEND_X11 (keymap_x11->backend)->use_xkb)
|
||||
{
|
||||
clutter_keymap_x11_refresh_reserved_keycodes (keymap_x11);
|
||||
|
||||
if (g_hash_table_size (keymap_x11->reserved_keycodes) < 5)
|
||||
{
|
||||
Display *dpy = clutter_x11_get_default_display ();
|
||||
XkbDescPtr xkb = get_xkb (keymap_x11);
|
||||
guint i;
|
||||
|
||||
for (i = xkb->max_key_code; i >= xkb->min_key_code; --i)
|
||||
{
|
||||
if (XkbKeycodeToKeysym (dpy, i, 0, 0) == NoSymbol)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return GPOINTER_TO_UINT (g_queue_pop_head (keymap_x11->available_keycodes));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
gboolean clutter_keymap_x11_reserve_keycode (ClutterKeymapX11 *keymap_x11,
|
||||
guint keyval,
|
||||
guint *keycode_out)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_KEYMAP_X11 (keymap_x11), FALSE);
|
||||
g_return_val_if_fail (keyval != 0, FALSE);
|
||||
g_return_val_if_fail (keycode_out != NULL, FALSE);
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
*keycode_out = clutter_keymap_x11_get_available_keycode (keymap_x11);
|
||||
|
||||
if (*keycode_out == NoSymbol)
|
||||
{
|
||||
g_warning ("Cannot reserve a keycode for keyval %d: no available keycode", keyval);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!clutter_keymap_x11_replace_keycode (keymap_x11, *keycode_out, keyval))
|
||||
{
|
||||
g_warning ("Failed to remap keycode %d to keyval %d", *keycode_out, keyval);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_hash_table_insert (keymap_x11->reserved_keycodes, GUINT_TO_POINTER (*keycode_out), GUINT_TO_POINTER (keyval));
|
||||
g_queue_remove (keymap_x11->available_keycodes, GUINT_TO_POINTER (*keycode_out));
|
||||
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
void clutter_keymap_x11_release_keycode_if_needed (ClutterKeymapX11 *keymap_x11,
|
||||
guint keycode)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_KEYMAP_X11 (keymap_x11));
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
if (!g_hash_table_contains (keymap_x11->reserved_keycodes, GUINT_TO_POINTER (keycode)) ||
|
||||
g_queue_index (keymap_x11->available_keycodes, GUINT_TO_POINTER (keycode)) != -1)
|
||||
return;
|
||||
|
||||
g_queue_push_tail (keymap_x11->available_keycodes, GUINT_TO_POINTER (keycode));
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
clutter_keymap_x11_latch_modifiers (ClutterKeymapX11 *keymap_x11,
|
||||
uint32_t level,
|
||||
gboolean enable)
|
||||
{
|
||||
#ifdef HAVE_XKB
|
||||
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (keymap_x11->backend);
|
||||
uint32_t modifiers[] = {
|
||||
0,
|
||||
ShiftMask,
|
||||
keymap_x11->level3_shift_mask,
|
||||
keymap_x11->level3_shift_mask | ShiftMask,
|
||||
};
|
||||
uint32_t value = 0;
|
||||
|
||||
if (!backend_x11->use_xkb)
|
||||
return;
|
||||
|
||||
level = CLAMP (level, 0, G_N_ELEMENTS (modifiers) - 1);
|
||||
|
||||
if (enable)
|
||||
value = modifiers[level];
|
||||
else
|
||||
value = 0;
|
||||
|
||||
XkbLatchModifiers (clutter_x11_get_default_display (),
|
||||
XkbUseCoreKbd, modifiers[level],
|
||||
value);
|
||||
#endif
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
clutter_keymap_x11_get_current_group (ClutterKeymapX11 *keymap_x11)
|
||||
{
|
||||
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (keymap_x11->backend);
|
||||
XkbStateRec state_rec;
|
||||
|
||||
if (keymap_x11->current_group >= 0)
|
||||
return keymap_x11->current_group;
|
||||
|
||||
XkbGetState (backend_x11->xdpy, XkbUseCoreKbd, &state_rec);
|
||||
return XkbStateGroup (&state_rec);
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_keymap_x11_keycode_for_keyval (ClutterKeymapX11 *keymap_x11,
|
||||
guint keyval,
|
||||
guint *keycode_out,
|
||||
guint *level_out)
|
||||
{
|
||||
ClutterKeymapKey *keys;
|
||||
gint i, n_keys, group;
|
||||
gboolean found = FALSE;
|
||||
|
||||
g_return_val_if_fail (keycode_out != NULL, FALSE);
|
||||
g_return_val_if_fail (level_out != NULL, FALSE);
|
||||
|
||||
group = clutter_keymap_x11_get_current_group (keymap_x11);
|
||||
|
||||
if (!clutter_keymap_x11_get_entries_for_keyval (keymap_x11, keyval, &keys, &n_keys))
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; i < n_keys && !found; i++)
|
||||
{
|
||||
if (keys[i].group == group)
|
||||
{
|
||||
*keycode_out = keys[i].keycode;
|
||||
*level_out = keys[i].level;
|
||||
found = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
|
||||
g_hash_table_iter_init (&iter, keymap_x11->reserved_keycodes);
|
||||
while (!found && g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
guint reserved_keycode = GPOINTER_TO_UINT (key);
|
||||
guint reserved_keysym = GPOINTER_TO_UINT (value);
|
||||
|
||||
if (keyval == reserved_keysym)
|
||||
{
|
||||
*keycode_out = reserved_keycode;
|
||||
*level_out = 0;
|
||||
found = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_free (keys);
|
||||
return found;
|
||||
}
|
||||
|
@@ -51,18 +51,6 @@ gboolean _clutter_keymap_x11_get_is_modifier (ClutterKeymapX11 *keymap,
|
||||
|
||||
PangoDirection _clutter_keymap_x11_get_direction (ClutterKeymapX11 *keymap);
|
||||
|
||||
gboolean clutter_keymap_x11_keycode_for_keyval (ClutterKeymapX11 *keymap_x11,
|
||||
guint keyval,
|
||||
guint *keycode_out,
|
||||
guint *level_out);
|
||||
void clutter_keymap_x11_latch_modifiers (ClutterKeymapX11 *keymap_x11,
|
||||
uint32_t level,
|
||||
gboolean enable);
|
||||
gboolean clutter_keymap_x11_reserve_keycode (ClutterKeymapX11 *keymap_x11,
|
||||
guint keyval,
|
||||
guint *keycode_out);
|
||||
void clutter_keymap_x11_release_keycode_if_needed (ClutterKeymapX11 *keymap_x11,
|
||||
guint keycode);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_KEYMAP_X11_H__ */
|
||||
|
@@ -32,8 +32,6 @@
|
||||
|
||||
#include "clutter-virtual-input-device.h"
|
||||
#include "x11/clutter-virtual-input-device-x11.h"
|
||||
#include "x11/clutter-backend-x11.h"
|
||||
#include "x11/clutter-keymap-x11.h"
|
||||
|
||||
struct _ClutterVirtualInputDeviceX11
|
||||
{
|
||||
@@ -137,36 +135,11 @@ clutter_virtual_input_device_x11_notify_keyval (ClutterVirtualInputDevice *virtu
|
||||
uint32_t keyval,
|
||||
ClutterKeyState key_state)
|
||||
{
|
||||
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (clutter_get_default_backend ());
|
||||
ClutterKeymapX11 *keymap = backend_x11->keymap;
|
||||
uint32_t keycode, level;
|
||||
|
||||
if (!clutter_keymap_x11_keycode_for_keyval (keymap, keyval, &keycode, &level))
|
||||
{
|
||||
level = 0;
|
||||
|
||||
if (!clutter_keymap_x11_reserve_keycode (keymap, keyval, &keycode))
|
||||
{
|
||||
g_warning ("No keycode found for keyval %x in current group", keyval);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!_clutter_keymap_x11_get_is_modifier (keymap, keycode) &&
|
||||
key_state == CLUTTER_KEY_STATE_PRESSED)
|
||||
clutter_keymap_x11_latch_modifiers (keymap, level, TRUE);
|
||||
KeyCode keycode;
|
||||
|
||||
keycode = XKeysymToKeycode (clutter_x11_get_default_display (), keyval);
|
||||
XTestFakeKeyEvent (clutter_x11_get_default_display (),
|
||||
(KeyCode) keycode,
|
||||
key_state == CLUTTER_KEY_STATE_PRESSED, 0);
|
||||
|
||||
|
||||
if (key_state == CLUTTER_KEY_STATE_RELEASED)
|
||||
{
|
||||
if (!_clutter_keymap_x11_get_is_modifier (keymap, keycode))
|
||||
clutter_keymap_x11_latch_modifiers (keymap, level, FALSE);
|
||||
clutter_keymap_x11_release_keycode_if_needed (keymap, keycode);
|
||||
}
|
||||
keycode, key_state == CLUTTER_KEY_STATE_PRESSED, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -230,13 +230,13 @@ paint_cb (ClutterStage *stage,
|
||||
gboolean *was_painted = data;
|
||||
|
||||
/* old shader effect */
|
||||
g_assert_cmpint (get_pixel (0, 25), ==, 0xff0000);
|
||||
g_assert_cmpint (get_pixel (50, 50), ==, 0xff0000);
|
||||
/* new shader effect */
|
||||
g_assert_cmpint (get_pixel (100, 25), ==, 0x00ffff);
|
||||
g_assert_cmpint (get_pixel (150, 50), ==, 0x00ffff);
|
||||
/* another new shader effect */
|
||||
g_assert_cmpint (get_pixel (200, 25), ==, 0xff00ff);
|
||||
g_assert_cmpint (get_pixel (250, 50), ==, 0xff00ff);
|
||||
/* new shader effect */
|
||||
g_assert_cmpint (get_pixel (300, 25), ==, 0x00ffff);
|
||||
g_assert_cmpint (get_pixel (350, 50), ==, 0x00ffff);
|
||||
|
||||
*was_painted = TRUE;
|
||||
}
|
||||
|
@@ -492,6 +492,9 @@ _cogl_pipeline_free (CoglPipeline *pipeline)
|
||||
_cogl_bitmask_destroy (&uniforms_state->changed_mask);
|
||||
}
|
||||
|
||||
if (pipeline->differences & COGL_PIPELINE_STATE_NEEDS_BIG_STATE)
|
||||
g_slice_free (CoglPipelineBigState, pipeline->big_state);
|
||||
|
||||
if (pipeline->differences & COGL_PIPELINE_STATE_LAYERS)
|
||||
{
|
||||
g_list_foreach (pipeline->layer_differences,
|
||||
@@ -505,9 +508,6 @@ _cogl_pipeline_free (CoglPipeline *pipeline)
|
||||
if (pipeline->differences & COGL_PIPELINE_STATE_FRAGMENT_SNIPPETS)
|
||||
_cogl_pipeline_snippet_list_free (&pipeline->big_state->fragment_snippets);
|
||||
|
||||
if (pipeline->differences & COGL_PIPELINE_STATE_NEEDS_BIG_STATE)
|
||||
g_slice_free (CoglPipelineBigState, pipeline->big_state);
|
||||
|
||||
g_list_free (pipeline->deprecated_get_layers_list);
|
||||
|
||||
recursively_free_layer_caches (pipeline);
|
||||
|
@@ -94,7 +94,6 @@ cogl_texture_new_with_size (unsigned int width,
|
||||
if (!cogl_texture_allocate (tex, &skip_error))
|
||||
{
|
||||
cogl_error_free (skip_error);
|
||||
skip_error = NULL;
|
||||
cogl_object_unref (tex);
|
||||
tex = NULL;
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
AC_PREREQ(2.62)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [28])
|
||||
m4_define([mutter_micro_version], [4])
|
||||
m4_define([mutter_minor_version], [29])
|
||||
m4_define([mutter_micro_version], [2])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
|
@@ -120,10 +120,6 @@
|
||||
framebuffers instead of window content,
|
||||
to manage HiDPI monitors. Does not
|
||||
require a restart.
|
||||
• “remote-desktop” — enables remote desktop support. To support
|
||||
remote desktop with screen sharing,
|
||||
“screen-cast” must also be enabled.
|
||||
• “screen-cast” — enables screen cast support.
|
||||
</description>
|
||||
</key>
|
||||
|
||||
|
12
po/gl.po
12
po/gl.po
@@ -14,16 +14,16 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gl\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
|
||||
"POT-Creation-Date: 2018-03-01 10:47+0000\n"
|
||||
"PO-Revision-Date: 2018-03-03 14:18+0200\n"
|
||||
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
|
||||
"POT-Creation-Date: 2018-03-03 13:19+0000\n"
|
||||
"PO-Revision-Date: 2018-05-07 19:37+0200\n"
|
||||
"Last-Translator: marcos <marcoslansgarza@gmail.com>\n"
|
||||
"Language-Team: Galician\n"
|
||||
"Language: gl\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: Virtaal 0.7.1\n"
|
||||
"X-Generator: Poedit 2.0.6\n"
|
||||
"X-Project-Style: gnome\n"
|
||||
|
||||
#: data/50-mutter-navigation.xml:6
|
||||
@@ -100,7 +100,7 @@ msgstr "Cambia á xanela anterior dun aplicativo"
|
||||
|
||||
#: data/50-mutter-navigation.xml:70
|
||||
msgid "Switch system controls"
|
||||
msgstr "Cambiar entre os controles do sistema"
|
||||
msgstr "Cambiar entre os controis do sistema"
|
||||
|
||||
#: data/50-mutter-navigation.xml:75
|
||||
msgid "Switch to previous system control"
|
||||
@@ -124,7 +124,7 @@ msgstr "Cambia directamente á xanela anterior do aplicativo"
|
||||
|
||||
#: data/50-mutter-navigation.xml:97
|
||||
msgid "Switch system controls directly"
|
||||
msgstr "Cambiar entre os controles do sistema directamente"
|
||||
msgstr "Cambiar entre os controis do sistema directamente"
|
||||
|
||||
#: data/50-mutter-navigation.xml:102
|
||||
msgid "Switch directly to previous system control"
|
||||
|
554
po/ro.po
554
po/ro.po
@@ -4,14 +4,13 @@
|
||||
# Mugurel Tudor <mugurelu@gnome.ro>, 2002-2004, 2005, 2006, 2007.
|
||||
# Adi Roiban https://launchpad.net/~adiroiban, 2008, 2009
|
||||
# Lucian Adrian Grijincu <lucian.grijincu@gmail.com>, 2011.
|
||||
# Daniel Șerbănescu <daniel [at] serbanescu [dot] dk>, 2015.
|
||||
# Daniel Șerbănescu <daniel [at] serbanescu [dot] dk>, 2015, 2018.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity.HEAD.ro\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter&"
|
||||
"keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2015-10-21 11:43+0000\n"
|
||||
"PO-Revision-Date: 2015-10-22 19:10+0200\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
|
||||
"POT-Creation-Date: 2018-04-26 07:32+0000\n"
|
||||
"PO-Revision-Date: 2018-04-30 07:54+0200\n"
|
||||
"Last-Translator: Daniel Șerbănescu <daniel [at] serbanescu [dot] dk>\n"
|
||||
"Language-Team: Gnome Romanian Translation Team\n"
|
||||
"Language: ro\n"
|
||||
@@ -23,272 +22,256 @@ msgstr ""
|
||||
"X-Generator: Virtaal 0.7.1\n"
|
||||
"X-Project-Style: gnome\n"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:1
|
||||
#: data/50-mutter-navigation.xml:6
|
||||
msgid "Navigation"
|
||||
msgstr "Navigare"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:2
|
||||
#: data/50-mutter-navigation.xml:9
|
||||
msgid "Move window to workspace 1"
|
||||
msgstr "Mută fereastra pe spațiul de lucru 1"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:3
|
||||
#: data/50-mutter-navigation.xml:12
|
||||
msgid "Move window to workspace 2"
|
||||
msgstr "Mută fereastra pe spațiul de lucru 2"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:4
|
||||
#: data/50-mutter-navigation.xml:15
|
||||
msgid "Move window to workspace 3"
|
||||
msgstr "Mută fereastra pe spațiul de lucru 3"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:5
|
||||
#: data/50-mutter-navigation.xml:18
|
||||
msgid "Move window to workspace 4"
|
||||
msgstr "Mută fereastra pe spațiul de lucru 4"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:6
|
||||
#: data/50-mutter-navigation.xml:21
|
||||
msgid "Move window to last workspace"
|
||||
msgstr "Mută fereastra pe spațiul de lucru anterior"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:7
|
||||
msgid "Move window one workspace to the left"
|
||||
msgstr "Mută fereastra pe spațiul de lucru de la stânga"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:8
|
||||
msgid "Move window one workspace to the right"
|
||||
msgstr "Mută fereastra pe spațiul de lucru de la dreapta"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:9
|
||||
#: data/50-mutter-navigation.xml:24
|
||||
msgid "Move window one workspace up"
|
||||
msgstr "Mută fereastra pe spațiul de lucru de mai sus"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:10
|
||||
#: data/50-mutter-navigation.xml:27
|
||||
msgid "Move window one workspace down"
|
||||
msgstr "Mută fereastra pe spațiul de lucru de mai jos"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:11
|
||||
#: data/50-mutter-navigation.xml:30
|
||||
msgid "Move window one monitor to the left"
|
||||
msgstr "Mută fereastra cu un monitor la stânga"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:12
|
||||
#: data/50-mutter-navigation.xml:33
|
||||
msgid "Move window one monitor to the right"
|
||||
msgstr "Mută fereastra un monitor la dreapta"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:13
|
||||
#: data/50-mutter-navigation.xml:36
|
||||
msgid "Move window one monitor up"
|
||||
msgstr "Mută fereastra cu un monitor mai sus"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:14
|
||||
#: data/50-mutter-navigation.xml:39
|
||||
msgid "Move window one monitor down"
|
||||
msgstr "Mută fereastra cu un monitor mai jos"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:15
|
||||
#: data/50-mutter-navigation.xml:43
|
||||
msgid "Switch applications"
|
||||
msgstr "Comută aplicațiile"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:16
|
||||
#: data/50-mutter-navigation.xml:48
|
||||
msgid "Switch to previous application"
|
||||
msgstr "Schimbă la aplicația anterioară"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:17
|
||||
#: data/50-mutter-navigation.xml:52
|
||||
msgid "Switch windows"
|
||||
msgstr "Schimbă ferestre"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:18
|
||||
#: data/50-mutter-navigation.xml:57
|
||||
msgid "Switch to previous window"
|
||||
msgstr "Schimbă la fereastra anterioară"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:19
|
||||
#: data/50-mutter-navigation.xml:61
|
||||
msgid "Switch windows of an application"
|
||||
msgstr "Schimbă ferestrele unei aplicații"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:20
|
||||
#: data/50-mutter-navigation.xml:66
|
||||
msgid "Switch to previous window of an application"
|
||||
msgstr "Schimbă la fereastra anterioară a unei aplicații"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:21
|
||||
#: data/50-mutter-navigation.xml:70
|
||||
msgid "Switch system controls"
|
||||
msgstr "Schimbă comenzile de sistem"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:22
|
||||
#: data/50-mutter-navigation.xml:75
|
||||
msgid "Switch to previous system control"
|
||||
msgstr "Schimbă la comanda de control anterioară"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:23
|
||||
#: data/50-mutter-navigation.xml:79
|
||||
msgid "Switch windows directly"
|
||||
msgstr "Schimbă ferestrele în mod direct"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:24
|
||||
#: data/50-mutter-navigation.xml:84
|
||||
msgid "Switch directly to previous window"
|
||||
msgstr "Schimbă la fereastra anterioară în mod direct"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:25
|
||||
#: data/50-mutter-navigation.xml:88
|
||||
msgid "Switch windows of an app directly"
|
||||
msgstr "Schimbă în mod direct ferestrele uneui aplicații "
|
||||
msgstr "Comută direct ferestrele unei aplicații"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:26
|
||||
#: data/50-mutter-navigation.xml:93
|
||||
msgid "Switch directly to previous window of an app"
|
||||
msgstr "Schimbă în mod direct la fereastra anterioară a unei aplicații"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:27
|
||||
#: data/50-mutter-navigation.xml:97
|
||||
msgid "Switch system controls directly"
|
||||
msgstr "Schimbă comenzile de sistem în mod direct"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:28
|
||||
#: data/50-mutter-navigation.xml:102
|
||||
msgid "Switch directly to previous system control"
|
||||
msgstr "Schimbă în mod direct la o comandă de sistem anterioară"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:29
|
||||
#: data/50-mutter-navigation.xml:105
|
||||
msgid "Hide all normal windows"
|
||||
msgstr "Ascunde toate ferestrele normale "
|
||||
msgstr "Ascunde toate ferestrele normale"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:30
|
||||
#: data/50-mutter-navigation.xml:108
|
||||
msgid "Switch to workspace 1"
|
||||
msgstr "Comută la spațiul de lucru 1"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:31
|
||||
#: data/50-mutter-navigation.xml:111
|
||||
msgid "Switch to workspace 2"
|
||||
msgstr "Comută la spațiul de lucru 2"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:32
|
||||
#: data/50-mutter-navigation.xml:114
|
||||
msgid "Switch to workspace 3"
|
||||
msgstr "Comută la spațiul de lucru 3"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:33
|
||||
#: data/50-mutter-navigation.xml:117
|
||||
msgid "Switch to workspace 4"
|
||||
msgstr "Comută la spațiul de lucru 4"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:34
|
||||
#: data/50-mutter-navigation.xml:120
|
||||
msgid "Switch to last workspace"
|
||||
msgstr "Comută la ultimul spațiu de lucru "
|
||||
msgstr "Comută la ultimul spațiu de lucru"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:35
|
||||
msgid "Move to workspace left"
|
||||
msgstr "Mută pe spațiul de lucru din stânga"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:36
|
||||
msgid "Move to workspace right"
|
||||
msgstr "Mută pe spațiul de lucru din dreapta"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:37
|
||||
#: data/50-mutter-navigation.xml:123
|
||||
msgid "Move to workspace above"
|
||||
msgstr "Mută pe spațiul de lucru deasupra"
|
||||
|
||||
#: ../data/50-mutter-navigation.xml.in.h:38
|
||||
#: data/50-mutter-navigation.xml:126
|
||||
msgid "Move to workspace below"
|
||||
msgstr "Mută pe spațiul de lucru de jos"
|
||||
|
||||
#: ../data/50-mutter-system.xml.in.h:1
|
||||
#: data/50-mutter-system.xml:6 data/50-mutter-wayland.xml:6
|
||||
msgid "System"
|
||||
msgstr "Sistem"
|
||||
|
||||
#: ../data/50-mutter-system.xml.in.h:2
|
||||
#: data/50-mutter-system.xml:8
|
||||
msgid "Show the run command prompt"
|
||||
msgstr "Arată prompterul de comandă al comenzii run (rulează)"
|
||||
|
||||
#: ../data/50-mutter-system.xml.in.h:3
|
||||
#: data/50-mutter-system.xml:10
|
||||
msgid "Show the activities overview"
|
||||
msgstr "Arată prezentarea generală a activităților"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:1
|
||||
#: data/50-mutter-wayland.xml:8
|
||||
msgid "Restore the keyboard shortcuts"
|
||||
msgstr "Restaurează scurtăturile de tastatură"
|
||||
|
||||
#: data/50-mutter-windows.xml:6
|
||||
msgid "Windows"
|
||||
msgstr "Ferestre"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:2
|
||||
#: data/50-mutter-windows.xml:8
|
||||
msgid "Activate the window menu"
|
||||
msgstr "Activează meniul ferestrei"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:3
|
||||
#: data/50-mutter-windows.xml:10
|
||||
msgid "Toggle fullscreen mode"
|
||||
msgstr "Comută modul pe tot ecranul"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:4
|
||||
#: data/50-mutter-windows.xml:12
|
||||
msgid "Toggle maximization state"
|
||||
msgstr "Comută starea de maximizare"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:5
|
||||
#: data/50-mutter-windows.xml:14
|
||||
msgid "Maximize window"
|
||||
msgstr "Maximizează fereastra"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:6
|
||||
#: data/50-mutter-windows.xml:16
|
||||
msgid "Restore window"
|
||||
msgstr "Restabilește fereastra"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:7
|
||||
msgid "Toggle shaded state"
|
||||
msgstr "Comută starea de umbrire"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:8
|
||||
#: data/50-mutter-windows.xml:18
|
||||
msgid "Close window"
|
||||
msgstr "Închide fereastra"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:9
|
||||
#: data/50-mutter-windows.xml:20
|
||||
msgid "Hide window"
|
||||
msgstr "Ascunde fereastra"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:10
|
||||
#: data/50-mutter-windows.xml:22
|
||||
msgid "Move window"
|
||||
msgstr "Mută fereastra"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:11
|
||||
#: data/50-mutter-windows.xml:24
|
||||
msgid "Resize window"
|
||||
msgstr "Redimensionează fereastra"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:12
|
||||
#: data/50-mutter-windows.xml:27
|
||||
msgid "Toggle window on all workspaces or one"
|
||||
msgstr "Comută fereastra pe toate spațiile de lucru sau doar pe unul"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:13
|
||||
#: data/50-mutter-windows.xml:29
|
||||
msgid "Raise window if covered, otherwise lower it"
|
||||
msgstr "Ridică fereastra dacă este acoperită, altfel, coboar-o"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:14
|
||||
#: data/50-mutter-windows.xml:31
|
||||
msgid "Raise window above other windows"
|
||||
msgstr "Ridică fereastra deasupra celorlalte ferestre"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:15
|
||||
#: data/50-mutter-windows.xml:33
|
||||
msgid "Lower window below other windows"
|
||||
msgstr "Coboară fereastra sub alte ferestre"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:16
|
||||
#: data/50-mutter-windows.xml:35
|
||||
msgid "Maximize window vertically"
|
||||
msgstr "Maximizează fereastra pe verticală"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:17
|
||||
#: data/50-mutter-windows.xml:37
|
||||
msgid "Maximize window horizontally"
|
||||
msgstr "Maximizează fereastra pe orizontală"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:18
|
||||
#: data/50-mutter-windows.xml:41
|
||||
msgid "View split on left"
|
||||
msgstr "Împarte în stânga"
|
||||
|
||||
#: ../data/50-mutter-windows.xml.in.h:19
|
||||
#: data/50-mutter-windows.xml:45
|
||||
msgid "View split on right"
|
||||
msgstr "Împarte în dreapta"
|
||||
|
||||
#: ../data/mutter.desktop.in.h:1
|
||||
#: data/mutter.desktop.in:4
|
||||
msgid "Mutter"
|
||||
msgstr "Mutter"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:1
|
||||
#: data/org.gnome.mutter.gschema.xml.in:7
|
||||
msgid "Modifier to use for extended window management operations"
|
||||
msgstr ""
|
||||
"Modificatorul folosit pentru operațiile extinse de management al ferestrelor"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:2
|
||||
#: data/org.gnome.mutter.gschema.xml.in:8
|
||||
msgid ""
|
||||
"This key will initiate the \"overlay\", which is a combination window "
|
||||
"overview and application launching system. The default is intended to be the "
|
||||
"\"Windows key\" on PC hardware. It's expected that this binding either the "
|
||||
"default or set to the empty string."
|
||||
"This key will initiate the “overlay”, which is a combination window overview "
|
||||
"and application launching system. The default is intended to be the “Windows "
|
||||
"key” on PC hardware. It’s expected that this binding either the default or "
|
||||
"set to the empty string."
|
||||
msgstr ""
|
||||
"Această cheie va iniția „overlay”-ul, care este o combinație între o privire "
|
||||
"de ansamblu a ferestrelor și un sistemul de lansare de aplicații. Implicit "
|
||||
"este testa „Windows” pe hardware PC. Este de așteptat ca această cheie să "
|
||||
"fie sau implicit sau setat la șirul vid."
|
||||
"Această cheie va iniția „suprapunerea”, care este o combinație între o "
|
||||
"privire de ansamblu a ferestrelor și un sistem de lansare de aplicații. "
|
||||
"Implicit este tasta „Windows” pe hardware PC. Este de așteptat ca această "
|
||||
"legătură să fie ori stabilită la implicit sau la șirul vid."
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:3
|
||||
#: data/org.gnome.mutter.gschema.xml.in:20
|
||||
msgid "Attach modal dialogs"
|
||||
msgstr "Atașează dialogurile modale"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:4
|
||||
#: data/org.gnome.mutter.gschema.xml.in:21
|
||||
msgid ""
|
||||
"When true, instead of having independent titlebars, modal dialogs appear "
|
||||
"attached to the titlebar of the parent window and are moved together with "
|
||||
@@ -298,13 +281,12 @@ msgstr ""
|
||||
"modale apar atașate la bara de titlu a ferestrei părinte și sunt mutate "
|
||||
"împreună cu fereastra părinte."
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:5
|
||||
#, fuzzy
|
||||
#: data/org.gnome.mutter.gschema.xml.in:30
|
||||
msgid "Enable edge tiling when dropping windows on screen edges"
|
||||
msgstr ""
|
||||
"Activează mozaicul lateral la plasarea ferestrelor pe marginile ecranului"
|
||||
"Activează mozaicul de margine la plasarea ferestrelor pe marginile ecranului"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:6
|
||||
#: data/org.gnome.mutter.gschema.xml.in:31
|
||||
msgid ""
|
||||
"If enabled, dropping windows on vertical screen edges maximizes them "
|
||||
"vertically and resizes them horizontally to cover half of the available "
|
||||
@@ -315,25 +297,25 @@ msgstr ""
|
||||
"pentru a acoperi jumătate din suprafața disponibilă. Plasarea ferestrelor pe "
|
||||
"marginea de sus a ecranului le maximizează complet."
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:7
|
||||
#: data/org.gnome.mutter.gschema.xml.in:40
|
||||
msgid "Workspaces are managed dynamically"
|
||||
msgstr "Spațiile de lucru sunt gestionate în mod dinamic"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:8
|
||||
#: data/org.gnome.mutter.gschema.xml.in:41
|
||||
msgid ""
|
||||
"Determines whether workspaces are managed dynamically or whether there's a "
|
||||
"Determines whether workspaces are managed dynamically or whether there’s a "
|
||||
"static number of workspaces (determined by the num-workspaces key in org."
|
||||
"gnome.desktop.wm.preferences)."
|
||||
msgstr ""
|
||||
"Determină dacă spațiile de lucru sunt gestionate în mod dinamic sau dacă "
|
||||
"există un număr static de spații de lucru (determinată de cheia „num-"
|
||||
"workspaces” din ”org.gnome.desktop.wm.preferences”)"
|
||||
"Determină dacă spațiile de lucru sunt administrate dinamic sau dacă există "
|
||||
"un număr static de spații de lucru (determinat de cheia num-workspaces din "
|
||||
"org.gnome.desktop.wm.preferences)"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:9
|
||||
#: data/org.gnome.mutter.gschema.xml.in:50
|
||||
msgid "Workspaces only on primary"
|
||||
msgstr "Spații de lucru doar pe ecranul principal"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:10
|
||||
#: data/org.gnome.mutter.gschema.xml.in:51
|
||||
msgid ""
|
||||
"Determines whether workspace switching should happen for windows on all "
|
||||
"monitors or only for windows on the primary monitor."
|
||||
@@ -342,11 +324,11 @@ msgstr ""
|
||||
"ferestrele de pe toate monitoarele sau doar pentru ferestrele de pe "
|
||||
"monitorul principal."
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:11
|
||||
#: data/org.gnome.mutter.gschema.xml.in:59
|
||||
msgid "No tab popup"
|
||||
msgstr "Fără popup pentru tab"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:12
|
||||
#: data/org.gnome.mutter.gschema.xml.in:60
|
||||
msgid ""
|
||||
"Determines whether the use of popup and highlight frame should be disabled "
|
||||
"for window cycling."
|
||||
@@ -354,42 +336,40 @@ msgstr ""
|
||||
"Determină dacă utilizarea unui popup sau a unui cadrul evidențiat ar trebui "
|
||||
"să fie dezactivată pentru rotirea ferestrelor."
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:13
|
||||
#: data/org.gnome.mutter.gschema.xml.in:68
|
||||
msgid "Delay focus changes until the pointer stops moving"
|
||||
msgstr ""
|
||||
"Întârzie schimbările de focalizare până când cursorul încetează să se miște"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:14
|
||||
#: data/org.gnome.mutter.gschema.xml.in:69
|
||||
msgid ""
|
||||
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
|
||||
"the focus will not be changed immediately when entering a window, but only "
|
||||
"after the pointer stops moving."
|
||||
"If set to true, and the focus mode is either “sloppy” or “mouse” then the "
|
||||
"focus will not be changed immediately when entering a window, but only after "
|
||||
"the pointer stops moving."
|
||||
msgstr ""
|
||||
"Dacă este activat iar modul de focalizare este „alunecos” sau „maus”, "
|
||||
"focalizarea nu va fi schimbată imediat după intrarea în câmpul unei "
|
||||
"ferestre, ci doar după ce pointerul încetează să se miște."
|
||||
"Dacă este stabilit ca adevărat, iar modul de focalizare este ori „neglijent” "
|
||||
"ori „maus”, atunci focalizarea nu va fi schimbată imediat la intrarea într-o "
|
||||
"fereastră, ci doar după ce indicatorul nu se mai mișcă."
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:15
|
||||
#, fuzzy
|
||||
#: data/org.gnome.mutter.gschema.xml.in:79
|
||||
msgid "Draggable border width"
|
||||
msgstr "Lățimea margini ce poate fi acționată"
|
||||
msgstr "Lățimea marginii ce poate fi plasată"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:16
|
||||
#, fuzzy
|
||||
#: data/org.gnome.mutter.gschema.xml.in:80
|
||||
msgid ""
|
||||
"The amount of total draggable borders. If the theme's visible borders are "
|
||||
"The amount of total draggable borders. If the theme’s visible borders are "
|
||||
"not enough, invisible borders will be added to meet this value."
|
||||
msgstr ""
|
||||
"Numărul marginilor ce pot fi acționate. Dacă marginile vizibile ale temei "
|
||||
"sunt insuficiente vor fi adăugate margini invizibile pentru a completa "
|
||||
"aceast număr."
|
||||
"Numărul total de margini ce pot fi plasate. Dacă marginile vizibile ale "
|
||||
"temei nu sunt suficiente, vor fi adăugate margini invizibile pentru a "
|
||||
"respecta această valoare."
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:17
|
||||
#: data/org.gnome.mutter.gschema.xml.in:89
|
||||
msgid "Auto maximize nearly monitor sized windows"
|
||||
msgstr ""
|
||||
"Maximizează automat ferestrele de dimensiune apropiată de cea a monitorului"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:18
|
||||
#: data/org.gnome.mutter.gschema.xml.in:90
|
||||
msgid ""
|
||||
"If enabled, new windows that are initially the size of the monitor "
|
||||
"automatically get maximized."
|
||||
@@ -397,11 +377,11 @@ msgstr ""
|
||||
"Dacă este activată, ferestrele noi care sunt inițial de mărimea monitorului "
|
||||
"sunt maximizate în mod automat."
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:19
|
||||
#: data/org.gnome.mutter.gschema.xml.in:98
|
||||
msgid "Place new windows in the center"
|
||||
msgstr "Plasează ferestre noi în centru"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:20
|
||||
#: data/org.gnome.mutter.gschema.xml.in:99
|
||||
msgid ""
|
||||
"When true, the new windows will always be put in the center of the active "
|
||||
"screen of the monitor."
|
||||
@@ -409,107 +389,262 @@ msgstr ""
|
||||
"Când este adevărat, ferestrele noi vor fi plasate în centrul ecranului activ "
|
||||
"al monitorului."
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:21
|
||||
#: data/org.gnome.mutter.gschema.xml.in:107
|
||||
msgid "Enable experimental features"
|
||||
msgstr "Activează funcționalitățile experimentale"
|
||||
|
||||
#: 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. Don’t 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. • “remote-desktop” — "
|
||||
"enables remote desktop support. To support remote desktop with screen "
|
||||
"sharing, “screen-cast” must also be enabled. • “screen-cast” — enables "
|
||||
"screen cast support."
|
||||
msgstr ""
|
||||
"Pentru a activa funcționalitățile experimentale, adăugați cuvântul cheie al "
|
||||
"funcționalității la listă. Dacă funcționalitatea necesită sau nu repornirea "
|
||||
"compunătorului depinde de funcționalitatea dată. Nu este necesar ca "
|
||||
"funcționalitatea experimentală să fie încă disponibilă, sau configurabilă. "
|
||||
"Nu vă așteptați să adăugați ceva la această configurare care va rezista "
|
||||
"timpului. Cuvintele cheie posibile în mod curent: • “scale-monitor-"
|
||||
"framebuffer” — face ca mutter să treacă implicit la aranjarea monitoarelor "
|
||||
"logice într-un spațiu logic de coordonate pixel, în timpul scalării de "
|
||||
"framebuffer-uri de monitor în locul conținutului ferestrei, pentru a "
|
||||
"gestiona monitoare HiDPI. Nu necesită o repornire. • “remote-desktop” — "
|
||||
"activează suportul pentru desktop la distanță. Pentru a suporta desktop la "
|
||||
"distanță cu partajarea ecranului, trebuie să fie activat și „screen-cast”. • "
|
||||
"“screen-cast” — activează suportul pentru înregistrarea ecranului."
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:145
|
||||
msgid "Select window from tab popup"
|
||||
msgstr "Selectează fereastra din popup-ul tabului"
|
||||
|
||||
#: ../data/org.gnome.mutter.gschema.xml.in.h:22
|
||||
#: data/org.gnome.mutter.gschema.xml.in:150
|
||||
msgid "Cancel tab popup"
|
||||
msgstr "Elimină popup-ul pentru tab"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
|
||||
#: data/org.gnome.mutter.gschema.xml.in:155
|
||||
msgid "Switch monitor configurations"
|
||||
msgstr "Comută configurațiile de monitor"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:160
|
||||
msgid "Rotates the built-in monitor configuration"
|
||||
msgstr "Rotește configurarea de monitor integrat"
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
|
||||
msgid "Switch to VT 1"
|
||||
msgstr "Comută la terminalul virtual 1"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:10
|
||||
msgid "Switch to VT 2"
|
||||
msgstr "Comută la terminalul virtual 2"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:14
|
||||
msgid "Switch to VT 3"
|
||||
msgstr "Comută la terminalul virtual 3"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:18
|
||||
msgid "Switch to VT 4"
|
||||
msgstr "Comută la terminalul virtual 4"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:22
|
||||
msgid "Switch to VT 5"
|
||||
msgstr "Comută la terminalul virtual 5"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:26
|
||||
msgid "Switch to VT 6"
|
||||
msgstr "Comută la terminalul virtual 6"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:30
|
||||
msgid "Switch to VT 7"
|
||||
msgstr "Comută la terminalul virtual 7"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:34
|
||||
msgid "Switch to VT 8"
|
||||
msgstr "Comută la terminalul virtual 8"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:38
|
||||
msgid "Switch to VT 9"
|
||||
msgstr "Comută la terminalul virtual 9"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:42
|
||||
msgid "Switch to VT 10"
|
||||
msgstr "Comută la terminalul virtual 10"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:46
|
||||
msgid "Switch to VT 11"
|
||||
msgstr "Comută la terminalul virtual 11"
|
||||
|
||||
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:50
|
||||
msgid "Switch to VT 12"
|
||||
msgstr "Comută la terminalul virtual 12"
|
||||
|
||||
#: ../src/backends/meta-monitor-manager.c:500
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
|
||||
msgid "Re-enable shortcuts"
|
||||
msgstr "Reactivează scurtăturile"
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:64
|
||||
msgid "Allow grabs with Xwayland"
|
||||
msgstr "Permite capturi de tastatură cu 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”."
|
||||
msgstr ""
|
||||
"Permite capturile de tastatură emise de aplicațiile X11 care rulează în "
|
||||
"Xwayland să fie luate în considerare. Pentru ca o captură X11 să fie luată "
|
||||
"în considerare în Wayland, clientul trebuie ori să trimită un mesaj specific "
|
||||
"ClientMessage X11 la fereastra root ori să se numere printre aplicațiile "
|
||||
"permise în cheia „xwayland-grab-access-rules”."
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:77
|
||||
msgid "Xwayland applications allowed to issue keyboard grabs"
|
||||
msgstr "Aplicațiile Xwayland sunt permise de a emite capturi de tastatură"
|
||||
|
||||
#: 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 "
|
||||
"resource class of a given X11 window can be obtained using the command "
|
||||
"“xprop WM_CLASS”. Wildcards “*” and jokers “?” in the values are supported. "
|
||||
"Values starting with “!” are blacklisted, which has precedence over the "
|
||||
"whitelist, to revoke applications from the default system list. The default "
|
||||
"system list includes the following applications: "
|
||||
"“@XWAYLAND_GRAB_DEFAULT_ACCESS_RULES@” Users can break an existing grab by "
|
||||
"using the specific keyboard shortcut defined by the keybinding key “restore-"
|
||||
"shortcuts”."
|
||||
msgstr ""
|
||||
"Listează numele resurselor sau clasa resurselor ale ferestrelor X11 permise "
|
||||
"sau nepermise să emită capturi de tastatură X11 în Xwayland. Numele resursei "
|
||||
"sau clasa resursei a unei ferestre X11 date pot fi obținute utilizând "
|
||||
"comanda „xprop WM_CLASS*. Metacaracterele „*” și jokerii „?” în valori sunt "
|
||||
"suportați. Valorile care încep cu „!” sunt adăugate în lista de interziceri, "
|
||||
"care are prioritate peste lista de permisiuni, pentru a revoca aplicații din "
|
||||
"lista de sistem implicită. Lista de sistem implicită include următoarele "
|
||||
"aplicații: „@XWAYLAND_GRAB_DEFAULT_ACCESS_RULES@” Utilizatorii pot să "
|
||||
"întrerupă o captură existentă prin utilizarea scurtăturii de tastatură "
|
||||
"specifice definite de tasta de stabilire a combinațiilor de taste „restore-"
|
||||
"shortcuts”."
|
||||
|
||||
#. TRANSLATORS: This string refers to a button that switches between
|
||||
#. * different modes.
|
||||
#.
|
||||
#: src/backends/meta-input-settings.c:2325
|
||||
#, c-format
|
||||
msgid "Mode Switch (Group %d)"
|
||||
msgstr "Comutator de mod (grupul %d)"
|
||||
|
||||
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
|
||||
#. * mapping through the available outputs.
|
||||
#.
|
||||
#: src/backends/meta-input-settings.c:2348
|
||||
msgid "Switch monitor"
|
||||
msgstr "Comută monitorul"
|
||||
|
||||
#: src/backends/meta-input-settings.c:2350
|
||||
msgid "Show on-screen help"
|
||||
msgstr "Arată ajutorul virtual"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:903
|
||||
msgid "Built-in display"
|
||||
msgstr "Afișaj integrat"
|
||||
|
||||
#: ../src/backends/meta-monitor-manager.c:526
|
||||
#: src/backends/meta-monitor-manager.c:926
|
||||
msgid "Unknown"
|
||||
msgstr "Necunoscut"
|
||||
|
||||
#: ../src/backends/meta-monitor-manager.c:528
|
||||
#: src/backends/meta-monitor-manager.c:928
|
||||
msgid "Unknown Display"
|
||||
msgstr "Afișaj necunoscut"
|
||||
|
||||
#. TRANSLATORS: this is a monitor vendor name, followed by a
|
||||
#. * size in inches, like 'Dell 15"'
|
||||
#.
|
||||
#: ../src/backends/meta-monitor-manager.c:536
|
||||
#: src/backends/meta-monitor-manager.c:936
|
||||
#, c-format
|
||||
msgid "%s %s"
|
||||
msgstr "%s %s"
|
||||
|
||||
#. 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:456
|
||||
#: src/compositor/compositor.c:481
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Another compositing manager is already running on screen %i on display \"%s"
|
||||
"\"."
|
||||
"Another compositing manager is already running on screen %i on display “%s”."
|
||||
msgstr ""
|
||||
"Un alt administrator de ferestre compozit rulează deja pe ecranul %i pe "
|
||||
"Un alt administrator de ferestre de compunere rulează deja pe ecranul %i pe "
|
||||
"afișajul „%s”."
|
||||
|
||||
#: ../src/core/bell.c:185
|
||||
#: src/core/bell.c:194
|
||||
msgid "Bell event"
|
||||
msgstr "Eveniment sonor"
|
||||
|
||||
#: ../src/core/delete.c:127
|
||||
#: src/core/display.c:608
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display “%s”\n"
|
||||
msgstr "Nu s-a putut deschide afișajul sistemului de ferestre X „%s”\n"
|
||||
|
||||
#: src/core/main.c:190
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "Dezactivează conexiunea la administratorul de sesiune"
|
||||
|
||||
#: src/core/main.c:196
|
||||
msgid "Replace the running window manager"
|
||||
msgstr "Înlocuiește administratorul de ferestre curent"
|
||||
|
||||
#: src/core/main.c:202
|
||||
msgid "Specify session management ID"
|
||||
msgstr "Specifică ID-ul administrării de sesiune"
|
||||
|
||||
#: src/core/main.c:207
|
||||
msgid "X Display to use"
|
||||
msgstr "Ecranul X ce va fi folosit"
|
||||
|
||||
#: src/core/main.c:213
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "Inițializează sesiunea din fișierul salvat"
|
||||
|
||||
#: src/core/main.c:219
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "Realizează apelurile X sincron"
|
||||
|
||||
#: src/core/main.c:226
|
||||
msgid "Run as a wayland compositor"
|
||||
msgstr "Rulează ca un compunător wayland"
|
||||
|
||||
#: src/core/main.c:232
|
||||
msgid "Run as a nested compositor"
|
||||
msgstr "Rulează ca un compunător imbricat"
|
||||
|
||||
#: src/core/main.c:240
|
||||
msgid "Run as a full display server, rather than nested"
|
||||
msgstr "Rulează ca server de afișare și nu ca server imbricat"
|
||||
|
||||
#: src/core/main.c:246
|
||||
msgid "Run with X11 backend"
|
||||
msgstr "Rulează cu backend X11"
|
||||
|
||||
#. Translators: %s is a window title
|
||||
#: src/core/meta-close-dialog-default.c:147
|
||||
#, c-format
|
||||
msgid "“%s” is not responding."
|
||||
msgstr "„%s” nu răspunde."
|
||||
|
||||
#: ../src/core/delete.c:129
|
||||
#: src/core/meta-close-dialog-default.c:149
|
||||
msgid "Application is not responding."
|
||||
msgstr "Aplicația nu răspunde."
|
||||
|
||||
#: ../src/core/delete.c:134
|
||||
#: src/core/meta-close-dialog-default.c:154
|
||||
msgid ""
|
||||
"You may choose to wait a short while for it to continue or force the "
|
||||
"application to quit entirely."
|
||||
@@ -517,112 +652,95 @@ msgstr ""
|
||||
"Puteți alege între a aștepta pentru câteva secunde ca aplicația să continue "
|
||||
"sau a forța terminarea aplicației."
|
||||
|
||||
#: ../src/core/delete.c:141
|
||||
msgid "_Wait"
|
||||
msgstr "_Așteaptă"
|
||||
|
||||
#: ../src/core/delete.c:141
|
||||
#: src/core/meta-close-dialog-default.c:161
|
||||
msgid "_Force Quit"
|
||||
msgstr "_Forțează închiderea"
|
||||
|
||||
#: ../src/core/display.c:563
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "Nu s-a putut deschide afișajul X Window System „%s”\n"
|
||||
#: src/core/meta-close-dialog-default.c:161
|
||||
msgid "_Wait"
|
||||
msgstr "_Așteaptă"
|
||||
|
||||
#: ../src/core/main.c:176
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "Dezactivează conexiunea la administratorul de sesiune"
|
||||
|
||||
#: ../src/core/main.c:182
|
||||
msgid "Replace the running window manager"
|
||||
msgstr "Înlocuiește administratorul de ferestre curent"
|
||||
|
||||
#: ../src/core/main.c:188
|
||||
msgid "Specify session management ID"
|
||||
msgstr "Specifică ID-ul administrării de sesiune"
|
||||
|
||||
#: ../src/core/main.c:193
|
||||
msgid "X Display to use"
|
||||
msgstr "Ecranul X ce va fi folosit"
|
||||
|
||||
#: ../src/core/main.c:199
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "Inițializează sesiunea din fișierul salvat"
|
||||
|
||||
#: ../src/core/main.c:205
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "Realizează apelurile X sincron"
|
||||
|
||||
#: ../src/core/main.c:212
|
||||
msgid "Run as a wayland compositor"
|
||||
msgstr "Rulează ca compozitor wayland"
|
||||
|
||||
#: ../src/core/main.c:220
|
||||
msgid "Run as a full display server, rather than nested"
|
||||
msgstr "Rulează ca server de afișare și nu ca server imbricat"
|
||||
|
||||
#: ../src/core/mutter.c:39
|
||||
#: src/core/mutter.c:39
|
||||
#, c-format
|
||||
msgid ""
|
||||
"mutter %s\n"
|
||||
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
"This is free software; see the source for copying conditions.\n"
|
||||
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
|
||||
"PARTICULAR PURPOSE.\n"
|
||||
msgstr ""
|
||||
"mutter %s\n"
|
||||
"Drepturi de autor (C) 2001--%d Havoc Pennington, Red Hat, Inc., și alții\n"
|
||||
"Drepturi de autor (C) 2001-%d Havoc Pennington, Red Hat, Inc., și alții\n"
|
||||
"Acesta este software liber; consultați codul sursă pentru condițiile de "
|
||||
"copiere.\n"
|
||||
"Nu există NICI O garanție; nici pentru COMERCIALIZARE sau UTILIZAREA ÎNTR-UN "
|
||||
"Nu există NICIO garanție; nici pentru COMERCIALIZARE sau UTILIZAREA ÎNTR-UN "
|
||||
"SCOP ANUME.\n"
|
||||
|
||||
#: ../src/core/mutter.c:53
|
||||
#: src/core/mutter.c:53
|
||||
msgid "Print version"
|
||||
msgstr "Afișează versiunea"
|
||||
|
||||
#: ../src/core/mutter.c:59
|
||||
#: src/core/mutter.c:59
|
||||
msgid "Mutter plugin to use"
|
||||
msgstr "Modul Mutter de utilizat"
|
||||
|
||||
#: ../src/core/prefs.c:2050
|
||||
#: src/core/prefs.c:1997
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Spațiu de lucru %d"
|
||||
|
||||
#: ../src/core/screen.c:526
|
||||
#: src/core/screen.c:583
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Display \"%s\" already has a window manager; try using the --replace option "
|
||||
"to replace the current window manager."
|
||||
"Display “%s” already has a window manager; try using the --replace option to "
|
||||
"replace the current window manager."
|
||||
msgstr ""
|
||||
"Afișajul „%s” are deja un administrator de ferestre; încercați să folosiți "
|
||||
"Afișajul „%s” are deja un administrator de ferestre; încercați să utilizați "
|
||||
"opțiunea --replace (înlocuiește) pentru a înlocui administratorul de "
|
||||
"ferestre actual."
|
||||
"ferestre curent."
|
||||
|
||||
#: ../src/core/screen.c:608
|
||||
#: src/core/screen.c:668
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Ecranul %d pe afișajul „%s” este invalid\n"
|
||||
msgid "Screen %d on display “%s” is invalid\n"
|
||||
msgstr "Ecranul %d de pe afișajul „%s” nu este valid\n"
|
||||
|
||||
#: ../src/core/util.c:118
|
||||
#: src/core/util.c:120
|
||||
msgid "Mutter was compiled without support for verbose mode\n"
|
||||
msgstr "Mutter a fost compilat fără suport pentru modul detaliat\n"
|
||||
|
||||
#: ../src/x11/session.c:1815
|
||||
#: src/wayland/meta-wayland-tablet-pad.c:567
|
||||
#, c-format
|
||||
msgid "Mode Switch: Mode %d"
|
||||
msgstr "Comutator de mod: modul %d"
|
||||
|
||||
#: src/x11/session.c:1818
|
||||
msgid ""
|
||||
"These windows do not support "save current setup" and will have to "
|
||||
"be restarted manually next time you log in."
|
||||
"These windows do not support “save current setup” and will have to be "
|
||||
"restarted manually next time you log in."
|
||||
msgstr ""
|
||||
"Aceste ferestre nu suportă „salvează configurarea curentă” și vor trebui "
|
||||
"repornite manual următoarea dată când vă veți autentifica."
|
||||
|
||||
#: ../src/x11/window-props.c:549
|
||||
#: src/x11/window-props.c:559
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (pe %s)"
|
||||
|
||||
#~ msgid "Move window one workspace to the left"
|
||||
#~ msgstr "Mută fereastra pe spațiul de lucru de la stânga"
|
||||
|
||||
#~ msgid "Move window one workspace to the right"
|
||||
#~ msgstr "Mută fereastra pe spațiul de lucru de la dreapta"
|
||||
|
||||
#~ msgid "Move to workspace left"
|
||||
#~ msgstr "Mută pe spațiul de lucru din stânga"
|
||||
|
||||
#~ msgid "Move to workspace right"
|
||||
#~ msgstr "Mută pe spațiul de lucru din dreapta"
|
||||
|
||||
#~ msgid "Toggle shaded state"
|
||||
#~ msgstr "Comută starea de umbrire"
|
||||
|
||||
#~ msgid "Switch to workspace on the left of the current workspace"
|
||||
#~ msgstr "Schimbă cu spațiul de lucru din stânga celui actual"
|
||||
|
||||
|
405
po/zh_CN.po
405
po/zh_CN.po
@@ -1,6 +1,6 @@
|
||||
# translation of mutter.po to zh_CN
|
||||
# Simplified Chinese translation of mutter.
|
||||
# Copyright (C) 2002, 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2012-2018 mutter's COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the mutter package.
|
||||
# Sun G11n <gnome_int_l10n@ireland.sun.com>, 2002.
|
||||
# He Qiangqiang <carton@linux.net.cn>, 2002
|
||||
# Xiong Jiang <jxiong@offtopic.org>, 2003
|
||||
@@ -11,22 +11,24 @@
|
||||
# Lele Long <schemacs@gmail.com>, 2011.
|
||||
# YunQiang Su <wzssyqa@gmail.com>, 2011, 2012.
|
||||
# Tong Hui <tonghuix@gmail.com>, 2014.
|
||||
# Mandy Wang <wangmychn@gmail.com>, 2017.
|
||||
# Mingcong Bai <jeffbai@aosc.xyz>, 2017.
|
||||
# Dingzhong Chen <wsxy162@gmail.com>, 2017, 2018.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter master\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=mutter&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2017-02-03 10:06+0000\n"
|
||||
"PO-Revision-Date: 2017-01-04 21:52+0800\n"
|
||||
"Last-Translator: Mandy Wang <wangmychn@gmail.com>\n"
|
||||
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
|
||||
"POT-Creation-Date: 2018-02-09 13:01+0000\n"
|
||||
"PO-Revision-Date: 2018-02-16 22:22+0800\n"
|
||||
"Last-Translator: Dingzhong Chen <wsxy162@gmail.com>\n"
|
||||
"Language-Team: Chinese (China) <i18n-zh@googlegroups.com>\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 1.8.7.1\n"
|
||||
"X-Generator: Gtranslator 2.91.7\n"
|
||||
|
||||
#: data/50-mutter-navigation.xml:6
|
||||
msgid "Navigation"
|
||||
@@ -53,134 +55,118 @@ msgid "Move window to last workspace"
|
||||
msgstr "将窗口移到最后一个工作区"
|
||||
|
||||
#: data/50-mutter-navigation.xml:24
|
||||
msgid "Move window one workspace to the left"
|
||||
msgstr "将窗口左移一个工作区"
|
||||
|
||||
#: data/50-mutter-navigation.xml:27
|
||||
msgid "Move window one workspace to the right"
|
||||
msgstr "将窗口右移一个工作区"
|
||||
|
||||
#: data/50-mutter-navigation.xml:30
|
||||
msgid "Move window one workspace up"
|
||||
msgstr "将窗口上移一个工作区"
|
||||
|
||||
#: data/50-mutter-navigation.xml:33
|
||||
#: data/50-mutter-navigation.xml:27
|
||||
msgid "Move window one workspace down"
|
||||
msgstr "将窗口下移一个工作区"
|
||||
|
||||
#: data/50-mutter-navigation.xml:36
|
||||
#: data/50-mutter-navigation.xml:30
|
||||
msgid "Move window one monitor to the left"
|
||||
msgstr "将窗口左移一个显示器"
|
||||
|
||||
#: data/50-mutter-navigation.xml:39
|
||||
#: data/50-mutter-navigation.xml:33
|
||||
msgid "Move window one monitor to the right"
|
||||
msgstr "将窗口右移一个显示器"
|
||||
|
||||
#: data/50-mutter-navigation.xml:42
|
||||
#: data/50-mutter-navigation.xml:36
|
||||
msgid "Move window one monitor up"
|
||||
msgstr "将窗口上移一个显示器"
|
||||
|
||||
#: data/50-mutter-navigation.xml:45
|
||||
#: data/50-mutter-navigation.xml:39
|
||||
msgid "Move window one monitor down"
|
||||
msgstr "将窗口下移一个显示器"
|
||||
|
||||
#: data/50-mutter-navigation.xml:49
|
||||
#: data/50-mutter-navigation.xml:43
|
||||
msgid "Switch applications"
|
||||
msgstr "切换应用程序"
|
||||
|
||||
#: data/50-mutter-navigation.xml:54
|
||||
#: data/50-mutter-navigation.xml:48
|
||||
msgid "Switch to previous application"
|
||||
msgstr "切换到前一个应用程序"
|
||||
|
||||
#: data/50-mutter-navigation.xml:58
|
||||
#: data/50-mutter-navigation.xml:52
|
||||
msgid "Switch windows"
|
||||
msgstr "切换窗口"
|
||||
|
||||
#: data/50-mutter-navigation.xml:63
|
||||
#: data/50-mutter-navigation.xml:57
|
||||
msgid "Switch to previous window"
|
||||
msgstr "切换到前一个窗口"
|
||||
|
||||
#: data/50-mutter-navigation.xml:67
|
||||
#: data/50-mutter-navigation.xml:61
|
||||
msgid "Switch windows of an application"
|
||||
msgstr "在应用程序的窗口之间切换窗口"
|
||||
|
||||
#: data/50-mutter-navigation.xml:72
|
||||
#: data/50-mutter-navigation.xml:66
|
||||
msgid "Switch to previous window of an application"
|
||||
msgstr "切换到一个应用程序的前一个窗口"
|
||||
|
||||
#: data/50-mutter-navigation.xml:76
|
||||
#: data/50-mutter-navigation.xml:70
|
||||
msgid "Switch system controls"
|
||||
msgstr "切换系统控制"
|
||||
|
||||
#: data/50-mutter-navigation.xml:81
|
||||
#: data/50-mutter-navigation.xml:75
|
||||
msgid "Switch to previous system control"
|
||||
msgstr "切换到前一个系统控制"
|
||||
|
||||
#: data/50-mutter-navigation.xml:85
|
||||
#: data/50-mutter-navigation.xml:79
|
||||
msgid "Switch windows directly"
|
||||
msgstr "直接切换窗口"
|
||||
|
||||
#: data/50-mutter-navigation.xml:90
|
||||
#: data/50-mutter-navigation.xml:84
|
||||
msgid "Switch directly to previous window"
|
||||
msgstr "直接切换到前一个窗口"
|
||||
|
||||
#: data/50-mutter-navigation.xml:94
|
||||
#: data/50-mutter-navigation.xml:88
|
||||
msgid "Switch windows of an app directly"
|
||||
msgstr "在应用程序窗口间直接移动焦点"
|
||||
|
||||
#: data/50-mutter-navigation.xml:99
|
||||
#: data/50-mutter-navigation.xml:93
|
||||
msgid "Switch directly to previous window of an app"
|
||||
msgstr "直接切换到一个应用程序的前一个窗口"
|
||||
|
||||
#: data/50-mutter-navigation.xml:103
|
||||
#: data/50-mutter-navigation.xml:97
|
||||
msgid "Switch system controls directly"
|
||||
msgstr "直接切换系统控制"
|
||||
|
||||
#: data/50-mutter-navigation.xml:108
|
||||
#: data/50-mutter-navigation.xml:102
|
||||
msgid "Switch directly to previous system control"
|
||||
msgstr "直接切换到前一个系统控制"
|
||||
|
||||
#: data/50-mutter-navigation.xml:111
|
||||
#: data/50-mutter-navigation.xml:105
|
||||
msgid "Hide all normal windows"
|
||||
msgstr "隐藏所有正常窗口"
|
||||
|
||||
#: data/50-mutter-navigation.xml:114
|
||||
#: data/50-mutter-navigation.xml:108
|
||||
msgid "Switch to workspace 1"
|
||||
msgstr "切换到工作区 1"
|
||||
|
||||
#: data/50-mutter-navigation.xml:117
|
||||
#: data/50-mutter-navigation.xml:111
|
||||
msgid "Switch to workspace 2"
|
||||
msgstr "切换到工作区 2"
|
||||
|
||||
#: data/50-mutter-navigation.xml:120
|
||||
#: data/50-mutter-navigation.xml:114
|
||||
msgid "Switch to workspace 3"
|
||||
msgstr "切换到工作区 3"
|
||||
|
||||
#: data/50-mutter-navigation.xml:123
|
||||
#: data/50-mutter-navigation.xml:117
|
||||
msgid "Switch to workspace 4"
|
||||
msgstr "切换到工作区 4"
|
||||
|
||||
#: data/50-mutter-navigation.xml:126
|
||||
#: data/50-mutter-navigation.xml:120
|
||||
msgid "Switch to last workspace"
|
||||
msgstr "切换到最后一个工作区"
|
||||
|
||||
#: data/50-mutter-navigation.xml:129
|
||||
msgid "Move to workspace left"
|
||||
msgstr "移动到左侧工作区"
|
||||
|
||||
#: data/50-mutter-navigation.xml:132
|
||||
msgid "Move to workspace right"
|
||||
msgstr "移动到右侧工作区"
|
||||
|
||||
#: data/50-mutter-navigation.xml:135
|
||||
#: data/50-mutter-navigation.xml:123
|
||||
msgid "Move to workspace above"
|
||||
msgstr "移动到上层工作区"
|
||||
|
||||
#: data/50-mutter-navigation.xml:138
|
||||
#: data/50-mutter-navigation.xml:126
|
||||
msgid "Move to workspace below"
|
||||
msgstr "移动到下层工作区"
|
||||
|
||||
#: data/50-mutter-system.xml:6
|
||||
#: data/50-mutter-system.xml:6 data/50-mutter-wayland.xml:6
|
||||
msgid "System"
|
||||
msgstr "系统"
|
||||
|
||||
@@ -190,7 +176,11 @@ msgstr "显示运行命令提示符"
|
||||
|
||||
#: data/50-mutter-system.xml:10
|
||||
msgid "Show the activities overview"
|
||||
msgstr "显示活动大纲"
|
||||
msgstr "显示活动视图"
|
||||
|
||||
#: data/50-mutter-wayland.xml:8
|
||||
msgid "Restore the keyboard shortcuts"
|
||||
msgstr "还原键盘快捷键"
|
||||
|
||||
#: data/50-mutter-windows.xml:6
|
||||
msgid "Windows"
|
||||
@@ -217,54 +207,50 @@ msgid "Restore window"
|
||||
msgstr "恢复窗口"
|
||||
|
||||
#: data/50-mutter-windows.xml:18
|
||||
msgid "Toggle shaded state"
|
||||
msgstr "切换卷起状态"
|
||||
|
||||
#: data/50-mutter-windows.xml:20
|
||||
msgid "Close window"
|
||||
msgstr "关闭窗口"
|
||||
|
||||
#: data/50-mutter-windows.xml:22
|
||||
#: data/50-mutter-windows.xml:20
|
||||
msgid "Hide window"
|
||||
msgstr "隐藏窗口"
|
||||
|
||||
#: data/50-mutter-windows.xml:24
|
||||
#: data/50-mutter-windows.xml:22
|
||||
msgid "Move window"
|
||||
msgstr "移动窗口"
|
||||
|
||||
#: data/50-mutter-windows.xml:26
|
||||
#: data/50-mutter-windows.xml:24
|
||||
msgid "Resize window"
|
||||
msgstr "改变窗口大小"
|
||||
|
||||
#: data/50-mutter-windows.xml:29
|
||||
#: data/50-mutter-windows.xml:27
|
||||
msgid "Toggle window on all workspaces or one"
|
||||
msgstr "在位于所有或仅一个工作区的窗口间切换"
|
||||
|
||||
#: data/50-mutter-windows.xml:31
|
||||
#: data/50-mutter-windows.xml:29
|
||||
msgid "Raise window if covered, otherwise lower it"
|
||||
msgstr "如果窗口被其他窗口遮盖,则提升它,否则降低它"
|
||||
|
||||
#: data/50-mutter-windows.xml:33
|
||||
#: data/50-mutter-windows.xml:31
|
||||
msgid "Raise window above other windows"
|
||||
msgstr "将窗口提升到其它窗口之上"
|
||||
|
||||
#: data/50-mutter-windows.xml:35
|
||||
#: data/50-mutter-windows.xml:33
|
||||
msgid "Lower window below other windows"
|
||||
msgstr "将窗口降低到其它窗口之下"
|
||||
|
||||
#: data/50-mutter-windows.xml:37
|
||||
#: data/50-mutter-windows.xml:35
|
||||
msgid "Maximize window vertically"
|
||||
msgstr "垂直最大化窗口"
|
||||
|
||||
#: data/50-mutter-windows.xml:39
|
||||
#: data/50-mutter-windows.xml:37
|
||||
msgid "Maximize window horizontally"
|
||||
msgstr "水平最大化窗口"
|
||||
|
||||
#: data/50-mutter-windows.xml:43
|
||||
#: data/50-mutter-windows.xml:41
|
||||
msgid "View split on left"
|
||||
msgstr "在左侧查看分割"
|
||||
|
||||
#: data/50-mutter-windows.xml:47
|
||||
#: data/50-mutter-windows.xml:45
|
||||
msgid "View split on right"
|
||||
msgstr "在右侧查看分割"
|
||||
|
||||
@@ -278,10 +264,10 @@ msgstr "用于修改窗口点击动作的修饰键 met"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:8
|
||||
msgid ""
|
||||
"This key will initiate the \"overlay\", which is a combination window "
|
||||
"overview and application launching system. The default is intended to be the "
|
||||
"\"Windows key\" on PC hardware. It's expected that this binding either the "
|
||||
"default or set to the empty string."
|
||||
"This key will initiate the “overlay”, which is a combination window overview "
|
||||
"and application launching system. The default is intended to be the “Windows "
|
||||
"key” on PC hardware. It’s expected that this binding either the default or "
|
||||
"set to the empty string."
|
||||
msgstr ""
|
||||
"这个键指出的“覆盖”是一种混合窗口概述和应用程序运行的系统。默认要求使用 "
|
||||
"“Super 键”。可能使用默认或者空白。"
|
||||
@@ -318,12 +304,12 @@ msgstr "动态管理工作区"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:41
|
||||
msgid ""
|
||||
"Determines whether workspaces are managed dynamically or whether there's a "
|
||||
"Determines whether workspaces are managed dynamically or whether there’s a "
|
||||
"static number of workspaces (determined by the num-workspaces key in org."
|
||||
"gnome.desktop.wm.preferences)."
|
||||
msgstr ""
|
||||
"决定工作区动态管理还是静态数量的工作区(由 org.gnome.desktop.wm.preferences 中"
|
||||
"的 num-workspaces 键确定)。"
|
||||
"决定工作区动态管理还是静态数量的工作区(由 org.gnome.desktop.wm.preferences "
|
||||
"中的 num-workspaces 键确定)。"
|
||||
|
||||
# 或者 只在主显示器上显示工作区
|
||||
#: data/org.gnome.mutter.gschema.xml.in:50
|
||||
@@ -353,9 +339,9 @@ msgstr "将焦点改变推迟到光标停止移动之后"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:69
|
||||
msgid ""
|
||||
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
|
||||
"the focus will not be changed immediately when entering a window, but only "
|
||||
"after the pointer stops moving."
|
||||
"If set to true, and the focus mode is either “sloppy” or “mouse” then the "
|
||||
"focus will not be changed immediately when entering a window, but only after "
|
||||
"the pointer stops moving."
|
||||
msgstr ""
|
||||
"如果为 true,而聚焦模式为“sloppy”或“mouse”,那么进入某个窗口时焦点将不会立即"
|
||||
"改变,而是等到光标停止移动之后。"
|
||||
@@ -366,7 +352,7 @@ msgstr "可拖拽的边界宽度"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:80
|
||||
msgid ""
|
||||
"The amount of total draggable borders. If the theme's visible borders are "
|
||||
"The amount of total draggable borders. If the theme’s visible borders are "
|
||||
"not enough, invisible borders will be added to meet this value."
|
||||
msgstr ""
|
||||
"可拖拽的边界总数。如果主题的可见边界不足,将添加不可见的边界来满足此值。"
|
||||
@@ -391,14 +377,50 @@ msgid ""
|
||||
"screen of the monitor."
|
||||
msgstr "为 true 时,新窗口将总是置于此显示器已激活屏幕的中央。"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:120
|
||||
#: data/org.gnome.mutter.gschema.xml.in:107
|
||||
msgid "Enable experimental features"
|
||||
msgstr "开启实验性特性"
|
||||
|
||||
#: 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. Don’t 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. • “remote-desktop” — "
|
||||
"enables remote desktop support. To support remote desktop with screen "
|
||||
"sharing, “screen-cast” must also be enabled. • “screen-cast” — enables "
|
||||
"screen cast support."
|
||||
msgstr ""
|
||||
"要启用实验性特性,请将如下特性关键字添加到列表中。特性是否要求重启合成器取决"
|
||||
"于特性本身。实验性特性不需启用即可配置和使用。请不要将实验性特性作为未来保障"
|
||||
"的基础。当前可用的关键字:• “monitor-config-manager” — 使用新的监视器配置系"
|
||||
"统,用于替代老的系统。启用此特性将打开一个上级配置 API 以用于配置应用程序,并"
|
||||
"可提供基于每屏幕的逻辑缩放功能。• “scale-monitor-framebuffer” — 让 Mutter 默"
|
||||
"认基于像素座标排布多屏幕,并同时缩放监视器帧缓冲器而不是窗口内容,以便管理 "
|
||||
"HiDPI 监视器。该特性不需要重启来生效。• “remote-desktop” — 启用远程桌面支持。"
|
||||
"要支持远程桌面共享,还需要设置“screen-cast”。 • “screen-cast” — 启用屏幕广播"
|
||||
"支持。"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:145
|
||||
msgid "Select window from tab popup"
|
||||
msgstr "从 Tab 轮换弹出界面选择窗口"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:125
|
||||
#: data/org.gnome.mutter.gschema.xml.in:150
|
||||
msgid "Cancel tab popup"
|
||||
msgstr "取消 Tab 轮换弹出"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:155
|
||||
msgid "Switch monitor configurations"
|
||||
msgstr "切换显示器配置"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:160
|
||||
msgid "Rotates the built-in monitor configuration"
|
||||
msgstr "旋转内置显示器配置"
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
|
||||
msgid "Switch to VT 1"
|
||||
msgstr "切换到 VT 1"
|
||||
@@ -447,127 +469,183 @@ msgstr "切换到 VT 11"
|
||||
msgid "Switch to VT 12"
|
||||
msgstr "切换到 VT 12"
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
|
||||
msgid "Re-enable shortcuts"
|
||||
msgstr "重新启用快捷键"
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:64
|
||||
msgid "Allow grabs with Xwayland"
|
||||
msgstr "允许用 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”."
|
||||
msgstr ""
|
||||
"允许考虑运行在 Xwayland 中的 X11 应用程序发起的键盘捕获。在 Wayland 下,为了"
|
||||
"将 X11 捕获考虑在内,客户端也必须发送一个指定的 X11 ClientMessage 到根窗口,"
|
||||
"或是包含进“xwayland-grab-access-rules”键成为其中一个白名单应用程序。"
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:77
|
||||
msgid "Xwayland applications allowed to issue keyboard grabs"
|
||||
msgstr "允许发起键盘捕获的 Xwayland 应用程序"
|
||||
|
||||
#: 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 "
|
||||
"resource class of a given X11 window can be obtained using the command "
|
||||
"“xprop WM_CLASS”. Wildcards “*” and jokers “?” in the values are supported. "
|
||||
"Values starting with “!” are blacklisted, which has precedence over the "
|
||||
"whitelist, to revoke applications from the default system list. The default "
|
||||
"system list includes the following applications: "
|
||||
"“@XWAYLAND_GRAB_DEFAULT_ACCESS_RULES@” Users can break an existing grab by "
|
||||
"using the specific keyboard shortcut defined by the keybinding key “restore-"
|
||||
"shortcuts”."
|
||||
msgstr ""
|
||||
"Xwayland 下允许或不允许发起 X11 键盘捕获的 X11 窗口,其资源名或资源类的列表。"
|
||||
"给定 X11 窗口的资源名或资源类可以使用“xprop WM_CLASS”命令获取。支持在键值中使"
|
||||
"用通配符“*”和“?”。以“!”开头的键值会列入黑名单,它们的优先级高于白名单,用来撤"
|
||||
"销默认系统列表中的应用程序。默认系统列表包含了下列应用程"
|
||||
"序:“@XWAYLAND_GRAB_DEFAULT_ACCESS_RULES@” 用户可以使用键绑定键“restore-"
|
||||
"shortcuts”定义的键盘快捷键来中断进行中的捕获。"
|
||||
|
||||
#. TRANSLATORS: This string refers to a button that switches between
|
||||
#. * different modes.
|
||||
#.
|
||||
#: src/backends/meta-input-settings.c:2260
|
||||
#, c-format
|
||||
msgid "Mode Switch (Group %d)"
|
||||
msgstr "模式切换(组别 %d)"
|
||||
|
||||
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
|
||||
#. * mapping through the available outputs.
|
||||
#.
|
||||
#: src/backends/meta-input-settings.c:1861
|
||||
#: src/backends/meta-input-settings.c:2283
|
||||
msgid "Switch monitor"
|
||||
msgstr "切换显示器"
|
||||
|
||||
#: src/backends/meta-input-settings.c:1863
|
||||
#: src/backends/meta-input-settings.c:2285
|
||||
msgid "Show on-screen help"
|
||||
msgstr "显示在屏帮助"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:515
|
||||
#: src/backends/meta-monitor-manager.c:900
|
||||
msgid "Built-in display"
|
||||
msgstr "内置显示器"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:538
|
||||
#: src/backends/meta-monitor-manager.c:923
|
||||
msgid "Unknown"
|
||||
msgstr "未知"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:540
|
||||
#: src/backends/meta-monitor-manager.c:925
|
||||
msgid "Unknown Display"
|
||||
msgstr "未知的 Display"
|
||||
|
||||
#. TRANSLATORS: this is a monitor vendor name, followed by a
|
||||
#. * size in inches, like 'Dell 15"'
|
||||
#.
|
||||
#: src/backends/meta-monitor-manager.c:548
|
||||
#: src/backends/meta-monitor-manager.c:933
|
||||
#, c-format
|
||||
msgid "%s %s"
|
||||
msgstr "%s %s"
|
||||
|
||||
#. 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:471
|
||||
#: src/compositor/compositor.c:481
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Another compositing manager is already running on screen %i on display \"%s"
|
||||
"\"."
|
||||
"Another compositing manager is already running on screen %i on display “%s”."
|
||||
msgstr "显示器 %2$s 的屏幕 %1$i 上已有另外一个混成窗口管理器正在运行。"
|
||||
|
||||
#: src/core/bell.c:194
|
||||
msgid "Bell event"
|
||||
msgstr "响铃事件"
|
||||
|
||||
#: src/core/delete.c:127
|
||||
#: src/core/display.c:608
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display “%s”\n"
|
||||
msgstr "无法打开 X Window System 显示器“%s”\n"
|
||||
|
||||
#: src/core/main.c:190
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "禁止连接到会话管理器"
|
||||
|
||||
#: src/core/main.c:196
|
||||
msgid "Replace the running window manager"
|
||||
msgstr "替换正在运行的窗口管理器"
|
||||
|
||||
#: src/core/main.c:202
|
||||
msgid "Specify session management ID"
|
||||
msgstr "指定会话管理 ID"
|
||||
|
||||
#: src/core/main.c:207
|
||||
msgid "X Display to use"
|
||||
msgstr "要使用的 X Display"
|
||||
|
||||
#: src/core/main.c:213
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "从保存文件中初始化会话"
|
||||
|
||||
#: src/core/main.c:219
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "使 X 调用同步"
|
||||
|
||||
#: src/core/main.c:226
|
||||
msgid "Run as a wayland compositor"
|
||||
msgstr "作为 wayland 混成管理器运行"
|
||||
|
||||
#: src/core/main.c:232
|
||||
msgid "Run as a nested compositor"
|
||||
msgstr "作为嵌套混成器运行"
|
||||
|
||||
#: src/core/main.c:240
|
||||
msgid "Run as a full display server, rather than nested"
|
||||
msgstr "以完整显示服务器方式运行,而不是以嵌套方式"
|
||||
|
||||
#: src/core/main.c:246
|
||||
msgid "Run with X11 backend"
|
||||
msgstr "以 X11 后端运行"
|
||||
|
||||
#. Translators: %s is a window title
|
||||
#: src/core/meta-close-dialog-default.c:147
|
||||
#, c-format
|
||||
msgid "“%s” is not responding."
|
||||
msgstr "“%s” 未响应。"
|
||||
|
||||
#: src/core/delete.c:129
|
||||
#: src/core/meta-close-dialog-default.c:149
|
||||
msgid "Application is not responding."
|
||||
msgstr "应用程序未响应。"
|
||||
|
||||
#: src/core/delete.c:134
|
||||
#: src/core/meta-close-dialog-default.c:154
|
||||
msgid ""
|
||||
"You may choose to wait a short while for it to continue or force the "
|
||||
"application to quit entirely."
|
||||
msgstr "您可以选择稍等一会儿,或者强制退出该应用程序。"
|
||||
|
||||
#: src/core/delete.c:141
|
||||
msgid "_Wait"
|
||||
msgstr "等待(_W)"
|
||||
|
||||
#: src/core/delete.c:141
|
||||
#: src/core/meta-close-dialog-default.c:161
|
||||
msgid "_Force Quit"
|
||||
msgstr "强制退出(_F)"
|
||||
|
||||
#: src/core/display.c:590
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "无法打开 X Window System 显示器“%s”\n"
|
||||
|
||||
#: src/core/main.c:182
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "禁止连接到会话管理器"
|
||||
|
||||
#: src/core/main.c:188
|
||||
msgid "Replace the running window manager"
|
||||
msgstr "替换正在运行的窗口管理器"
|
||||
|
||||
#: src/core/main.c:194
|
||||
msgid "Specify session management ID"
|
||||
msgstr "指定会话管理 ID"
|
||||
|
||||
#: src/core/main.c:199
|
||||
msgid "X Display to use"
|
||||
msgstr "要使用的 X Display"
|
||||
|
||||
#: src/core/main.c:205
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "从保存文件中初始化会话"
|
||||
|
||||
#: src/core/main.c:211
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "使 X 调用同步"
|
||||
|
||||
#: src/core/main.c:218
|
||||
msgid "Run as a wayland compositor"
|
||||
msgstr "作为 wayland 混成管理器运行"
|
||||
|
||||
#: src/core/main.c:224
|
||||
msgid "Run as a nested compositor"
|
||||
msgstr "作为嵌套混成器运行"
|
||||
|
||||
#: src/core/main.c:232
|
||||
msgid "Run as a full display server, rather than nested"
|
||||
msgstr "以完整显示服务器方式运行,而不是以嵌套方式"
|
||||
#: src/core/meta-close-dialog-default.c:161
|
||||
msgid "_Wait"
|
||||
msgstr "等待(_W)"
|
||||
|
||||
#: src/core/mutter.c:39
|
||||
#, c-format
|
||||
msgid ""
|
||||
"mutter %s\n"
|
||||
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
"This is free software; see the source for copying conditions.\n"
|
||||
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
|
||||
"PARTICULAR PURPOSE.\n"
|
||||
msgstr ""
|
||||
"mutter %s\n"
|
||||
"版权所有 (C) 2001-%d Havoc Pennington, Red Hat, Inc., 以及其他\n"
|
||||
"本软件为自由软件:版权条款请参见源码\n"
|
||||
"不存在任何保证:即便是对商业性或者特定目的的适应性也不作保证。\n"
|
||||
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., 以及其他\n"
|
||||
"本软件为自由软件;版权条款请参见源码\n"
|
||||
"不存在任何保证;即便是对商业性或者特定目的的适应性也不作保证。\n"
|
||||
|
||||
#: src/core/mutter.c:53
|
||||
msgid "Print version"
|
||||
@@ -582,41 +660,54 @@ msgstr "要使用的 Mutter 插件"
|
||||
msgid "Workspace %d"
|
||||
msgstr "工作区 %d"
|
||||
|
||||
#: src/core/screen.c:521
|
||||
#: src/core/screen.c:583
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Display \"%s\" already has a window manager; try using the --replace option "
|
||||
"to replace the current window manager."
|
||||
"Display “%s” already has a window manager; try using the --replace option to "
|
||||
"replace the current window manager."
|
||||
msgstr ""
|
||||
"Display“%s”已经有一个窗口管理器;请尝试使用 --replace 选项替换当前的窗口管理"
|
||||
"器。"
|
||||
|
||||
#: src/core/screen.c:606
|
||||
#: src/core/screen.c:668
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgid "Screen %d on display “%s” is invalid\n"
|
||||
msgstr "显示“%2$s”上的屏幕 %1$d 无效\n"
|
||||
|
||||
#: src/core/util.c:120
|
||||
msgid "Mutter was compiled without support for verbose mode\n"
|
||||
msgstr "Mutter 编译的时候没有加入详细模式的支持\n"
|
||||
|
||||
#: src/wayland/meta-wayland-tablet-pad.c:595
|
||||
#: src/wayland/meta-wayland-tablet-pad.c:567
|
||||
#, c-format
|
||||
msgid "Mode Switch: Mode %d"
|
||||
msgstr "模式切换:%d 模式"
|
||||
|
||||
#: src/x11/session.c:1815
|
||||
#: src/x11/session.c:1818
|
||||
msgid ""
|
||||
"These windows do not support "save current setup" and will have to "
|
||||
"be restarted manually next time you log in."
|
||||
msgstr ""
|
||||
"这些窗口不支持 "保存当前设置 " 您在下次登录时,必须手动重启动它"
|
||||
"们。"
|
||||
"These windows do not support “save current setup” and will have to be "
|
||||
"restarted manually next time you log in."
|
||||
msgstr "这些窗口不支持“保存当前设置”,并且在您下次登录时,必须手动重启它们。"
|
||||
|
||||
#: src/x11/window-props.c:548
|
||||
#: src/x11/window-props.c:559
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (于 %s)"
|
||||
msgstr "%s(于 %s)"
|
||||
|
||||
#~ msgid "Move window one workspace to the left"
|
||||
#~ msgstr "将窗口左移一个工作区"
|
||||
|
||||
#~ msgid "Move window one workspace to the right"
|
||||
#~ msgstr "将窗口右移一个工作区"
|
||||
|
||||
#~ msgid "Move to workspace left"
|
||||
#~ msgstr "移动到左侧工作区"
|
||||
|
||||
#~ msgid "Move to workspace right"
|
||||
#~ msgstr "移动到右侧工作区"
|
||||
|
||||
#~ msgid "Toggle shaded state"
|
||||
#~ msgstr "切换卷起状态"
|
||||
|
||||
#~ msgid "Failed to scan themes directory: %s\n"
|
||||
#~ msgstr "扫描主题目录失败:%s\n"
|
||||
|
31
po/zh_TW.po
31
po/zh_TW.po
@@ -9,8 +9,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity 3.3.4\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
|
||||
"POT-Creation-Date: 2018-03-01 18:57+0000\n"
|
||||
"PO-Revision-Date: 2018-03-03 15:20+0800\n"
|
||||
"POT-Creation-Date: 2018-06-07 13:00+0000\n"
|
||||
"PO-Revision-Date: 2018-06-09 11:26+0800\n"
|
||||
"Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"
|
||||
"Language-Team: Chinese (Taiwan) <zh-l10n@lists.linux.org.tw>\n"
|
||||
"Language: zh_TW\n"
|
||||
@@ -18,7 +18,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 2.0.6\n"
|
||||
"X-Generator: Poedit 2.0.8\n"
|
||||
|
||||
#: data/50-mutter-navigation.xml:6
|
||||
msgid "Navigation"
|
||||
@@ -379,32 +379,27 @@ 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. • “remote-desktop” — "
|
||||
"enables remote desktop support. To support remote desktop with screen "
|
||||
"sharing, “screen-cast” must also be enabled. • “screen-cast” — enables "
|
||||
"screen cast support."
|
||||
"manage HiDPI monitors. Does not require a restart."
|
||||
msgstr ""
|
||||
"若要啟用實驗性功能,請將功能關鍵字加入列表中。置於該功能是否須要重新啟動混成"
|
||||
"器則視給予的功能而定。任何實驗性功能不一定能用、或是可以調整設定。請不要預期"
|
||||
"在此設定中加入的任何東西未來都能存在。目前可用的關鍵字有: • “scale-monitor-"
|
||||
"framebuffer” — 讓 mutter 預設採用邏輯像素座標空間的配置邏輯螢幕,而縮放螢幕 "
|
||||
"framebuffer 則取代視窗內容以管理 HiDPI 螢幕。不須要重新啟動。 • “remote-"
|
||||
"desktop” — 啟用遠端桌面支援。若要支援遠端桌面的螢幕分享,則必須也啟用“screen-"
|
||||
"cast”。• “screen-cast” — 啟用螢幕投放支援。"
|
||||
"framebuffer 則取代視窗內容以管理 HiDPI 螢幕。不須要重新啟動。"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:145
|
||||
#: data/org.gnome.mutter.gschema.xml.in:141
|
||||
msgid "Select window from tab popup"
|
||||
msgstr "從分頁彈出項選擇視窗"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:150
|
||||
#: data/org.gnome.mutter.gschema.xml.in:146
|
||||
msgid "Cancel tab popup"
|
||||
msgstr "取消分頁彈出項"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:155
|
||||
#: data/org.gnome.mutter.gschema.xml.in:151
|
||||
msgid "Switch monitor configurations"
|
||||
msgstr "切換螢幕組態"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:160
|
||||
#: data/org.gnome.mutter.gschema.xml.in:156
|
||||
msgid "Rotates the built-in monitor configuration"
|
||||
msgstr "旋轉切換內建螢幕組態"
|
||||
|
||||
@@ -520,22 +515,22 @@ msgstr "切換螢幕"
|
||||
msgid "Show on-screen help"
|
||||
msgstr "顯示螢幕求助"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:900
|
||||
#: src/backends/meta-monitor-manager.c:903
|
||||
msgid "Built-in display"
|
||||
msgstr "內建顯示"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:923
|
||||
#: src/backends/meta-monitor-manager.c:926
|
||||
msgid "Unknown"
|
||||
msgstr "不明"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:925
|
||||
#: src/backends/meta-monitor-manager.c:928
|
||||
msgid "Unknown Display"
|
||||
msgstr "不明的顯示器"
|
||||
|
||||
#. TRANSLATORS: this is a monitor vendor name, followed by a
|
||||
#. * size in inches, like 'Dell 15"'
|
||||
#.
|
||||
#: src/backends/meta-monitor-manager.c:933
|
||||
#: src/backends/meta-monitor-manager.c:936
|
||||
#, c-format
|
||||
msgid "%s %s"
|
||||
msgstr "%s %s"
|
||||
|
@@ -14,13 +14,6 @@ stackingdir = $(pkgdatadir)/tests/stacking
|
||||
dist_stacking_DATA = \
|
||||
tests/stacking/basic-x11.metatest \
|
||||
tests/stacking/basic-wayland.metatest \
|
||||
tests/stacking/closed-transient.metatest \
|
||||
tests/stacking/closed-transient-no-input-no-take-focus-parent.metatest \
|
||||
tests/stacking/closed-transient-no-input-no-take-focus-parents.metatest \
|
||||
tests/stacking/closed-transient-no-input-parent.metatest \
|
||||
tests/stacking/closed-transient-no-input-parent-delayed-focus-default-cancelled.metatest \
|
||||
tests/stacking/closed-transient-no-input-parents.metatest \
|
||||
tests/stacking/closed-transient-no-input-parents-queued-default-focus-destroyed.metatest \
|
||||
tests/stacking/minimized.metatest \
|
||||
tests/stacking/mixed-windows.metatest \
|
||||
tests/stacking/set-parent.metatest \
|
||||
|
@@ -51,14 +51,6 @@
|
||||
#define META_TYPE_BACKEND (meta_backend_get_type ())
|
||||
G_DECLARE_DERIVABLE_TYPE (MetaBackend, meta_backend, META, BACKEND, GObject)
|
||||
|
||||
typedef enum _MetaSequenceState
|
||||
{
|
||||
META_SEQUENCE_NONE,
|
||||
META_SEQUENCE_ACCEPTED,
|
||||
META_SEQUENCE_REJECTED,
|
||||
META_SEQUENCE_PENDING_END
|
||||
} MetaSequenceState;
|
||||
|
||||
struct _MetaBackendClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
@@ -81,10 +73,6 @@ struct _MetaBackendClass
|
||||
int device_id,
|
||||
uint32_t timestamp);
|
||||
|
||||
void (* finish_touch_sequence) (MetaBackend *backend,
|
||||
ClutterEventSequence *sequence,
|
||||
MetaSequenceState state);
|
||||
|
||||
void (* warp_pointer) (MetaBackend *backend,
|
||||
int x,
|
||||
int y);
|
||||
@@ -146,10 +134,6 @@ gboolean meta_backend_ungrab_device (MetaBackend *backend,
|
||||
int device_id,
|
||||
uint32_t timestamp);
|
||||
|
||||
void meta_backend_finish_touch_sequence (MetaBackend *backend,
|
||||
ClutterEventSequence *sequence,
|
||||
MetaSequenceState state);
|
||||
|
||||
void meta_backend_warp_pointer (MetaBackend *backend,
|
||||
int x,
|
||||
int y);
|
||||
|
@@ -418,28 +418,6 @@ meta_backend_create_input_settings (MetaBackend *backend)
|
||||
return META_BACKEND_GET_CLASS (backend)->create_input_settings (backend);
|
||||
}
|
||||
|
||||
#ifdef HAVE_REMOTE_DESKTOP
|
||||
static gboolean
|
||||
is_screen_cast_enabled (MetaBackend *backend)
|
||||
{
|
||||
MetaSettings *settings = meta_backend_get_settings (backend);
|
||||
|
||||
return meta_settings_is_experimental_feature_enabled (
|
||||
settings,
|
||||
META_EXPERIMENTAL_FEATURE_SCREEN_CAST);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_remote_desktop_enabled (MetaBackend *backend)
|
||||
{
|
||||
MetaSettings *settings = meta_backend_get_settings (backend);
|
||||
|
||||
return meta_settings_is_experimental_feature_enabled (
|
||||
settings,
|
||||
META_EXPERIMENTAL_FEATURE_REMOTE_DESKTOP);
|
||||
}
|
||||
#endif /* HAVE_REMOTE_DESKTOP */
|
||||
|
||||
static void
|
||||
meta_backend_real_post_init (MetaBackend *backend)
|
||||
{
|
||||
@@ -473,10 +451,8 @@ meta_backend_real_post_init (MetaBackend *backend)
|
||||
|
||||
#ifdef HAVE_REMOTE_DESKTOP
|
||||
priv->dbus_session_watcher = g_object_new (META_TYPE_DBUS_SESSION_WATCHER, NULL);
|
||||
if (is_screen_cast_enabled (backend))
|
||||
priv->screen_cast = meta_screen_cast_new (priv->dbus_session_watcher);
|
||||
if (is_remote_desktop_enabled (backend))
|
||||
priv->remote_desktop = meta_remote_desktop_new (priv->dbus_session_watcher);
|
||||
priv->screen_cast = meta_screen_cast_new (priv->dbus_session_watcher);
|
||||
priv->remote_desktop = meta_remote_desktop_new (priv->dbus_session_watcher);
|
||||
#endif /* HAVE_REMOTE_DESKTOP */
|
||||
|
||||
if (!meta_monitor_manager_is_headless (priv->monitor_manager))
|
||||
@@ -568,26 +544,6 @@ meta_backend_class_init (MetaBackendClass *klass)
|
||||
stage_views_disabled = g_strcmp0 (mutter_stage_views, "0") == 0;
|
||||
}
|
||||
|
||||
static void
|
||||
experimental_features_changed (MetaSettings *settings,
|
||||
MetaExperimentalFeature old_experimental_features,
|
||||
MetaBackend *backend)
|
||||
{
|
||||
#ifdef HAVE_REMOTE_DESKTOP
|
||||
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
|
||||
|
||||
if (is_screen_cast_enabled (backend) && !priv->screen_cast)
|
||||
priv->screen_cast = meta_screen_cast_new (priv->dbus_session_watcher);
|
||||
else if (!is_screen_cast_enabled (backend))
|
||||
g_clear_object (&priv->screen_cast);
|
||||
|
||||
if (is_remote_desktop_enabled (backend) && !priv->remote_desktop)
|
||||
priv->remote_desktop = meta_remote_desktop_new (priv->dbus_session_watcher);
|
||||
else if (!is_remote_desktop_enabled (backend))
|
||||
g_clear_object (&priv->remote_desktop);
|
||||
#endif /* HAVE_REMOTE_DESKTOP */
|
||||
}
|
||||
|
||||
static MetaMonitorManager *
|
||||
meta_backend_create_monitor_manager (MetaBackend *backend,
|
||||
GError **error)
|
||||
@@ -670,9 +626,6 @@ meta_backend_initable_init (GInitable *initable,
|
||||
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
|
||||
|
||||
priv->settings = meta_settings_new (backend);
|
||||
g_signal_connect (priv->settings, "experimental-features-changed",
|
||||
G_CALLBACK (experimental_features_changed),
|
||||
backend);
|
||||
|
||||
priv->egl = g_object_new (META_TYPE_EGL, NULL);
|
||||
|
||||
@@ -846,20 +799,6 @@ meta_backend_ungrab_device (MetaBackend *backend,
|
||||
return META_BACKEND_GET_CLASS (backend)->ungrab_device (backend, device_id, timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_backend_finish_touch_sequence: (skip)
|
||||
*/
|
||||
void
|
||||
meta_backend_finish_touch_sequence (MetaBackend *backend,
|
||||
ClutterEventSequence *sequence,
|
||||
MetaSequenceState state)
|
||||
{
|
||||
if (META_BACKEND_GET_CLASS (backend)->finish_touch_sequence)
|
||||
META_BACKEND_GET_CLASS (backend)->finish_touch_sequence (backend,
|
||||
sequence,
|
||||
state);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_backend_warp_pointer: (skip)
|
||||
*/
|
||||
|
@@ -263,11 +263,8 @@ meta_idle_monitor_init (MetaIdleMonitor *monitor)
|
||||
|
||||
v = g_dbus_proxy_get_cached_property (monitor->session_proxy,
|
||||
"InhibitedActions");
|
||||
if (v)
|
||||
{
|
||||
monitor->inhibited = g_variant_get_uint32 (v) & GSM_INHIBITOR_FLAG_IDLE;
|
||||
g_variant_unref (v);
|
||||
}
|
||||
monitor->inhibited = g_variant_get_uint32 (v) & GSM_INHIBITOR_FLAG_IDLE;
|
||||
g_variant_unref (v);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -100,12 +100,11 @@ static MetaMonitorTransform
|
||||
derive_monitor_transform (MetaMonitor *monitor)
|
||||
{
|
||||
MetaOutput *main_output;
|
||||
MetaMonitorTransform transform;
|
||||
|
||||
main_output = meta_monitor_get_main_output (monitor);
|
||||
transform = meta_output_get_assigned_crtc (main_output)->transform;
|
||||
|
||||
return meta_monitor_crtc_to_logical_transform (monitor, transform);
|
||||
return meta_monitor_crtc_to_logical_transform (monitor,
|
||||
main_output->crtc->transform);
|
||||
}
|
||||
|
||||
MetaLogicalMonitor *
|
||||
@@ -146,7 +145,7 @@ meta_logical_monitor_add_monitor (MetaLogicalMonitor *logical_monitor,
|
||||
|
||||
is_presentation = logical_monitor->is_presentation;
|
||||
logical_monitor->monitors = g_list_append (logical_monitor->monitors,
|
||||
g_object_ref (monitor));
|
||||
monitor);
|
||||
|
||||
for (l = logical_monitor->monitors; l; l = l->next)
|
||||
{
|
||||
@@ -158,12 +157,10 @@ meta_logical_monitor_add_monitor (MetaLogicalMonitor *logical_monitor,
|
||||
for (l_output = outputs; l_output; l_output = l_output->next)
|
||||
{
|
||||
MetaOutput *output = l_output->data;
|
||||
MetaCrtc *crtc;
|
||||
|
||||
is_presentation = is_presentation && output->is_presentation;
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
if (crtc)
|
||||
crtc->logical_monitor = logical_monitor;
|
||||
if (output->crtc)
|
||||
output->crtc->logical_monitor = logical_monitor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +220,7 @@ foreach_crtc (MetaMonitor *monitor,
|
||||
ForeachCrtcData *data = user_data;
|
||||
|
||||
data->func (data->logical_monitor,
|
||||
meta_output_get_assigned_crtc (monitor_crtc_mode->output),
|
||||
monitor_crtc_mode->output->crtc,
|
||||
data->user_data);
|
||||
|
||||
return TRUE;
|
||||
@@ -257,17 +254,13 @@ meta_logical_monitor_init (MetaLogicalMonitor *logical_monitor)
|
||||
}
|
||||
|
||||
static void
|
||||
meta_logical_monitor_dispose (GObject *object)
|
||||
meta_logical_monitor_finalize (GObject *object)
|
||||
{
|
||||
MetaLogicalMonitor *logical_monitor = META_LOGICAL_MONITOR (object);
|
||||
|
||||
if (logical_monitor->monitors)
|
||||
{
|
||||
g_list_free_full (logical_monitor->monitors, g_object_unref);
|
||||
logical_monitor->monitors = NULL;
|
||||
}
|
||||
g_list_free (logical_monitor->monitors);
|
||||
|
||||
G_OBJECT_CLASS (meta_logical_monitor_parent_class)->dispose (object);
|
||||
G_OBJECT_CLASS (meta_logical_monitor_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -275,7 +268,7 @@ meta_logical_monitor_class_init (MetaLogicalMonitorClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->dispose = meta_logical_monitor_dispose;
|
||||
object_class->finalize = meta_logical_monitor_finalize;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@@ -330,35 +330,23 @@ MetaMonitorsConfigKey *
|
||||
meta_create_monitors_config_key_for_current_state (MetaMonitorManager *monitor_manager)
|
||||
{
|
||||
MetaMonitorsConfigKey *config_key;
|
||||
MetaMonitorSpec *laptop_monitor_spec;
|
||||
GList *l;
|
||||
GList *monitor_specs;
|
||||
|
||||
laptop_monitor_spec = NULL;
|
||||
monitor_specs = NULL;
|
||||
for (l = monitor_manager->monitors; l; l = l->next)
|
||||
{
|
||||
MetaMonitor *monitor = l->data;
|
||||
MetaMonitorSpec *monitor_spec;
|
||||
|
||||
if (meta_monitor_is_laptop_panel (monitor))
|
||||
{
|
||||
laptop_monitor_spec = meta_monitor_get_spec (monitor);
|
||||
|
||||
if (meta_monitor_manager_is_lid_closed (monitor_manager))
|
||||
continue;
|
||||
}
|
||||
if (meta_monitor_is_laptop_panel (monitor) &&
|
||||
meta_monitor_manager_is_lid_closed (monitor_manager))
|
||||
continue;
|
||||
|
||||
monitor_spec = meta_monitor_spec_clone (meta_monitor_get_spec (monitor));
|
||||
monitor_specs = g_list_prepend (monitor_specs, monitor_spec);
|
||||
}
|
||||
|
||||
if (!monitor_specs && laptop_monitor_spec)
|
||||
{
|
||||
monitor_specs =
|
||||
g_list_prepend (NULL, meta_monitor_spec_clone (laptop_monitor_spec));
|
||||
}
|
||||
|
||||
if (!monitor_specs)
|
||||
return NULL;
|
||||
|
||||
@@ -1019,7 +1007,6 @@ meta_monitor_config_manager_create_for_switch_config (MetaMonitorConfigManager
|
||||
MetaMonitorSwitchConfigType config_type)
|
||||
{
|
||||
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
|
||||
MetaMonitorsConfig *config;
|
||||
|
||||
if (!meta_monitor_manager_can_switch_config (monitor_manager))
|
||||
return NULL;
|
||||
@@ -1027,27 +1014,18 @@ meta_monitor_config_manager_create_for_switch_config (MetaMonitorConfigManager
|
||||
switch (config_type)
|
||||
{
|
||||
case META_MONITOR_SWITCH_CONFIG_ALL_MIRROR:
|
||||
config = create_for_switch_config_all_mirror (config_manager);
|
||||
break;
|
||||
return create_for_switch_config_all_mirror (config_manager);
|
||||
case META_MONITOR_SWITCH_CONFIG_ALL_LINEAR:
|
||||
config = meta_monitor_config_manager_create_linear (config_manager);
|
||||
break;
|
||||
return meta_monitor_config_manager_create_linear (config_manager);
|
||||
case META_MONITOR_SWITCH_CONFIG_EXTERNAL:
|
||||
config = create_for_switch_config_external (config_manager);
|
||||
break;
|
||||
return create_for_switch_config_external (config_manager);
|
||||
case META_MONITOR_SWITCH_CONFIG_BUILTIN:
|
||||
config = create_for_switch_config_builtin (config_manager);
|
||||
break;
|
||||
return create_for_switch_config_builtin (config_manager);
|
||||
case META_MONITOR_SWITCH_CONFIG_UNKNOWN:
|
||||
default:
|
||||
g_warn_if_reached ();
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (config)
|
||||
meta_monitors_config_set_switch_config (config, config_type);
|
||||
|
||||
return config;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1239,19 +1217,6 @@ meta_monitors_config_key_equal (gconstpointer data_a,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MetaMonitorSwitchConfigType
|
||||
meta_monitors_config_get_switch_config (MetaMonitorsConfig *config)
|
||||
{
|
||||
return config->switch_config;
|
||||
}
|
||||
|
||||
void
|
||||
meta_monitors_config_set_switch_config (MetaMonitorsConfig *config,
|
||||
MetaMonitorSwitchConfigType switch_config)
|
||||
{
|
||||
config->switch_config = switch_config;
|
||||
}
|
||||
|
||||
MetaMonitorsConfig *
|
||||
meta_monitors_config_new_full (GList *logical_monitor_configs,
|
||||
GList *disabled_monitor_specs,
|
||||
@@ -1267,7 +1232,6 @@ meta_monitors_config_new_full (GList *logical_monitor_con
|
||||
disabled_monitor_specs);
|
||||
config->layout_mode = layout_mode;
|
||||
config->flags = flags;
|
||||
config->switch_config = META_MONITOR_SWITCH_CONFIG_UNKNOWN;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
@@ -69,8 +69,6 @@ struct _MetaMonitorsConfig
|
||||
MetaMonitorsConfigFlag flags;
|
||||
|
||||
MetaLogicalMonitorLayoutMode layout_mode;
|
||||
|
||||
MetaMonitorSwitchConfigType switch_config;
|
||||
};
|
||||
|
||||
#define META_TYPE_MONITORS_CONFIG (meta_monitors_config_get_type ())
|
||||
@@ -126,11 +124,6 @@ MetaMonitorsConfig * meta_monitors_config_new (MetaMonitorManager *mon
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitorsConfigFlag flags);
|
||||
|
||||
MetaMonitorSwitchConfigType meta_monitors_config_get_switch_config (MetaMonitorsConfig *config);
|
||||
|
||||
void meta_monitors_config_set_switch_config (MetaMonitorsConfig *config,
|
||||
MetaMonitorSwitchConfigType switch_config);
|
||||
|
||||
unsigned int meta_monitors_config_key_hash (gconstpointer config_key);
|
||||
|
||||
gboolean meta_monitors_config_key_equal (gconstpointer config_key_a,
|
||||
|
@@ -486,7 +486,7 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
||||
output = ((MetaOutput**)crtc_info->outputs->pdata)[j];
|
||||
|
||||
output->is_dirty = TRUE;
|
||||
meta_output_assign_crtc (output, crtc);
|
||||
output->crtc = crtc;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -531,7 +531,7 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
||||
continue;
|
||||
}
|
||||
|
||||
meta_output_unassign_crtc (output);
|
||||
output->crtc = NULL;
|
||||
output->is_primary = FALSE;
|
||||
}
|
||||
}
|
||||
|
@@ -181,7 +181,6 @@ struct _MetaMonitorManager
|
||||
|
||||
GnomePnpIds *pnp_ids;
|
||||
UpClient *up_client;
|
||||
gboolean lid_is_closed;
|
||||
|
||||
gulong experimental_features_changed_handler_id;
|
||||
|
||||
|
@@ -351,13 +351,7 @@ lid_is_closed_changed (UpClient *client,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaMonitorManager *manager = user_data;
|
||||
gboolean lid_is_closed;
|
||||
|
||||
lid_is_closed = up_client_get_lid_is_closed (manager->up_client);
|
||||
if (lid_is_closed == manager->lid_is_closed)
|
||||
return;
|
||||
|
||||
manager->lid_is_closed = lid_is_closed;
|
||||
meta_monitor_manager_lid_is_closed_changed (manager);
|
||||
}
|
||||
|
||||
@@ -367,7 +361,7 @@ meta_monitor_manager_real_is_lid_closed (MetaMonitorManager *manager)
|
||||
if (!manager->up_client)
|
||||
return FALSE;
|
||||
|
||||
return manager->lid_is_closed;
|
||||
return up_client_get_lid_is_closed (manager->up_client);
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -591,8 +585,6 @@ meta_monitor_manager_ensure_configured (MetaMonitorManager *manager)
|
||||
&error))
|
||||
{
|
||||
g_clear_object (&config);
|
||||
g_warning ("Failed to use linear monitor configuration: %s",
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
else
|
||||
@@ -610,8 +602,6 @@ meta_monitor_manager_ensure_configured (MetaMonitorManager *manager)
|
||||
&error))
|
||||
{
|
||||
g_clear_object (&config);
|
||||
g_warning ("Failed to use fallback monitor configuration: %s",
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
else
|
||||
@@ -739,12 +729,8 @@ meta_monitor_manager_constructed (GObject *object)
|
||||
if (manager_class->is_lid_closed == meta_monitor_manager_real_is_lid_closed)
|
||||
{
|
||||
manager->up_client = up_client_new ();
|
||||
if (manager->up_client)
|
||||
{
|
||||
g_signal_connect_object (manager->up_client, "notify::lid-is-closed",
|
||||
G_CALLBACK (lid_is_closed_changed), manager, 0);
|
||||
manager->lid_is_closed = up_client_get_lid_is_closed (manager->up_client);
|
||||
}
|
||||
g_signal_connect_object (manager->up_client, "notify::lid-is-closed",
|
||||
G_CALLBACK (lid_is_closed_changed), manager, 0);
|
||||
}
|
||||
|
||||
g_signal_connect_object (manager, "notify::power-save-mode",
|
||||
@@ -1055,7 +1041,6 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
|
||||
GVariantBuilder crtcs, modes, clones, properties;
|
||||
GBytes *edid;
|
||||
char *edid_file;
|
||||
MetaCrtc *crtc;
|
||||
int crtc_index;
|
||||
|
||||
g_variant_builder_init (&crtcs, G_VARIANT_TYPE ("au"));
|
||||
@@ -1149,8 +1134,8 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
|
||||
output->tile_info.tile_h));
|
||||
}
|
||||
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
crtc_index = crtc ? g_list_index (combined_crtcs, crtc) : -1;
|
||||
crtc_index = output->crtc ? g_list_index (combined_crtcs, output->crtc)
|
||||
: -1;
|
||||
g_variant_builder_add (&output_builder, "(uxiausauaua{sv})",
|
||||
i, /* ID */
|
||||
(gint64)output->winsys_id,
|
||||
@@ -1333,13 +1318,9 @@ meta_monitor_manager_handle_get_current_state (MetaDBusDisplayConfig *skeleton,
|
||||
GVariantBuilder mode_properties_builder;
|
||||
MetaCrtcModeFlag mode_flags;
|
||||
|
||||
if (!meta_monitor_mode_should_be_advertised (monitor_mode))
|
||||
continue;
|
||||
|
||||
mode_id = meta_monitor_mode_get_id (monitor_mode);
|
||||
meta_monitor_mode_get_resolution (monitor_mode,
|
||||
&mode_width, &mode_height);
|
||||
|
||||
refresh_rate = meta_monitor_mode_get_refresh_rate (monitor_mode);
|
||||
|
||||
preferred_scale =
|
||||
@@ -2652,6 +2633,8 @@ meta_monitor_manager_read_current_state (MetaMonitorManager *manager)
|
||||
static void
|
||||
meta_monitor_manager_notify_monitors_changed (MetaMonitorManager *manager)
|
||||
{
|
||||
manager->current_switch_config = META_MONITOR_SWITCH_CONFIG_UNKNOWN;
|
||||
|
||||
meta_backend_monitors_changed (manager->backend);
|
||||
|
||||
g_signal_emit (manager, signals[MONITORS_CHANGED_INTERNAL], 0);
|
||||
@@ -2708,17 +2691,10 @@ meta_monitor_manager_update_logical_state (MetaMonitorManager *manager,
|
||||
MetaMonitorsConfig *config)
|
||||
{
|
||||
if (config)
|
||||
{
|
||||
manager->layout_mode = config->layout_mode;
|
||||
manager->current_switch_config =
|
||||
meta_monitors_config_get_switch_config (config);
|
||||
}
|
||||
manager->layout_mode = config->layout_mode;
|
||||
else
|
||||
{
|
||||
manager->layout_mode =
|
||||
meta_monitor_manager_get_default_layout_mode (manager);
|
||||
manager->current_switch_config = META_MONITOR_SWITCH_CONFIG_UNKNOWN;
|
||||
}
|
||||
manager->layout_mode =
|
||||
meta_monitor_manager_get_default_layout_mode (manager);
|
||||
|
||||
meta_monitor_manager_rebuild_logical_monitors (manager, config);
|
||||
}
|
||||
@@ -2760,12 +2736,6 @@ void
|
||||
meta_monitor_manager_update_logical_state_derived (MetaMonitorManager *manager,
|
||||
MetaMonitorsConfig *config)
|
||||
{
|
||||
if (config)
|
||||
manager->current_switch_config =
|
||||
meta_monitors_config_get_switch_config (config);
|
||||
else
|
||||
manager->current_switch_config = META_MONITOR_SWITCH_CONFIG_UNKNOWN;
|
||||
|
||||
manager->layout_mode = META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL;
|
||||
|
||||
meta_monitor_manager_rebuild_logical_monitors_derived (manager, config);
|
||||
@@ -2933,7 +2903,11 @@ meta_monitor_manager_get_monitor_for_connector (MetaMonitorManager *manager,
|
||||
|
||||
if (meta_monitor_is_active (monitor) &&
|
||||
g_str_equal (connector, meta_monitor_get_connector (monitor)))
|
||||
return meta_monitor_get_logical_monitor (monitor)->number;
|
||||
{
|
||||
MetaOutput *main_output = meta_monitor_get_main_output (monitor);
|
||||
|
||||
return main_output->crtc->logical_monitor->number;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
@@ -203,9 +203,11 @@ meta_monitor_get_main_output (MetaMonitor *monitor)
|
||||
gboolean
|
||||
meta_monitor_is_active (MetaMonitor *monitor)
|
||||
{
|
||||
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
|
||||
MetaOutput *output;
|
||||
|
||||
return !!priv->current_mode;
|
||||
output = meta_monitor_get_main_output (monitor);
|
||||
|
||||
return output->crtc && output->crtc->current_mode;
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -383,21 +385,6 @@ meta_monitor_crtc_to_logical_transform (MetaMonitor *monitor,
|
||||
return new_transform;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_monitor_dispose (GObject *object)
|
||||
{
|
||||
MetaMonitor *monitor = META_MONITOR (object);
|
||||
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
|
||||
|
||||
if (priv->outputs)
|
||||
{
|
||||
g_list_free_full (priv->outputs, g_object_unref);
|
||||
priv->outputs = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (meta_monitor_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_monitor_finalize (GObject *object)
|
||||
{
|
||||
@@ -406,6 +393,7 @@ meta_monitor_finalize (GObject *object)
|
||||
|
||||
g_hash_table_destroy (priv->mode_ids);
|
||||
g_list_free_full (priv->modes, (GDestroyNotify) meta_monitor_mode_free);
|
||||
g_clear_pointer (&priv->outputs, g_list_free);
|
||||
meta_monitor_spec_free (priv->spec);
|
||||
|
||||
G_OBJECT_CLASS (meta_monitor_parent_class)->finalize (object);
|
||||
@@ -424,7 +412,6 @@ meta_monitor_class_init (MetaMonitorClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->dispose = meta_monitor_dispose;
|
||||
object_class->finalize = meta_monitor_finalize;
|
||||
}
|
||||
|
||||
@@ -506,7 +493,6 @@ meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
|
||||
for (i = 0; i < output->n_modes; i++)
|
||||
{
|
||||
MetaCrtcMode *crtc_mode = output->modes[i];
|
||||
MetaCrtc *crtc;
|
||||
MetaMonitorMode *mode;
|
||||
gboolean replace;
|
||||
|
||||
@@ -540,9 +526,7 @@ meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
|
||||
|
||||
if (crtc_mode == output->preferred_mode)
|
||||
monitor_priv->preferred_mode = mode;
|
||||
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
if (crtc && crtc_mode == crtc->current_mode)
|
||||
if (output->crtc && crtc_mode == output->crtc->current_mode)
|
||||
monitor_priv->current_mode = mode;
|
||||
}
|
||||
}
|
||||
@@ -561,7 +545,7 @@ meta_monitor_normal_new (MetaGpu *gpu,
|
||||
|
||||
monitor_priv->gpu = gpu;
|
||||
|
||||
monitor_priv->outputs = g_list_append (NULL, g_object_ref (output));
|
||||
monitor_priv->outputs = g_list_append (NULL, output);
|
||||
monitor_priv->winsys_id = output->winsys_id;
|
||||
meta_monitor_generate_spec (monitor);
|
||||
|
||||
@@ -584,15 +568,13 @@ meta_monitor_normal_derive_layout (MetaMonitor *monitor,
|
||||
MetaRectangle *layout)
|
||||
{
|
||||
MetaOutput *output;
|
||||
MetaCrtc *crtc;
|
||||
|
||||
output = meta_monitor_get_main_output (monitor);
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
*layout = (MetaRectangle) {
|
||||
.x = crtc->rect.x,
|
||||
.y = crtc->rect.y,
|
||||
.width = crtc->rect.width,
|
||||
.height = crtc->rect.height
|
||||
.x = output->crtc->rect.x,
|
||||
.y = output->crtc->rect.y,
|
||||
.width = output->crtc->rect.width,
|
||||
.height = output->crtc->rect.height
|
||||
};
|
||||
}
|
||||
|
||||
@@ -676,8 +658,7 @@ add_tiled_monitor_outputs (MetaGpu *gpu,
|
||||
g_warn_if_fail (output->subpixel_order ==
|
||||
monitor_tiled->origin_output->subpixel_order);
|
||||
|
||||
monitor_priv->outputs = g_list_append (monitor_priv->outputs,
|
||||
g_object_ref (output));
|
||||
monitor_priv->outputs = g_list_append (monitor_priv->outputs, output);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -783,13 +764,12 @@ is_monitor_mode_assigned (MetaMonitor *monitor,
|
||||
{
|
||||
MetaOutput *output = l->data;
|
||||
MetaMonitorCrtcMode *monitor_crtc_mode = &mode->crtc_modes[i];
|
||||
MetaCrtc *crtc;
|
||||
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
if (monitor_crtc_mode->crtc_mode &&
|
||||
(!crtc || crtc->current_mode != monitor_crtc_mode->crtc_mode))
|
||||
(!output->crtc ||
|
||||
output->crtc->current_mode != monitor_crtc_mode->crtc_mode))
|
||||
return FALSE;
|
||||
else if (!monitor_crtc_mode->crtc_mode && crtc)
|
||||
else if (!monitor_crtc_mode->crtc_mode && output->crtc)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1237,16 +1217,14 @@ meta_monitor_tiled_derive_layout (MetaMonitor *monitor,
|
||||
for (l = monitor_priv->outputs; l; l = l->next)
|
||||
{
|
||||
MetaOutput *output = l->data;
|
||||
MetaCrtc *crtc;
|
||||
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
if (!crtc)
|
||||
if (!output->crtc)
|
||||
continue;
|
||||
|
||||
min_x = MIN (crtc->rect.x, min_x);
|
||||
min_y = MIN (crtc->rect.y, min_y);
|
||||
max_x = MAX (crtc->rect.x + crtc->rect.width, max_x);
|
||||
max_y = MAX (crtc->rect.y + crtc->rect.height, max_y);
|
||||
min_x = MIN (output->crtc->rect.x, min_x);
|
||||
min_y = MIN (output->crtc->rect.y, min_y);
|
||||
max_x = MAX (output->crtc->rect.x + output->crtc->rect.width, max_x);
|
||||
max_y = MAX (output->crtc->rect.y + output->crtc->rect.height, max_y);
|
||||
}
|
||||
|
||||
*layout = (MetaRectangle) {
|
||||
@@ -1340,14 +1318,10 @@ meta_monitor_get_spec (MetaMonitor *monitor)
|
||||
MetaLogicalMonitor *
|
||||
meta_monitor_get_logical_monitor (MetaMonitor *monitor)
|
||||
{
|
||||
MetaOutput *output;
|
||||
MetaCrtc *crtc;
|
||||
MetaOutput *output = meta_monitor_get_main_output (monitor);
|
||||
|
||||
output = meta_monitor_get_main_output (monitor);
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
|
||||
if (crtc)
|
||||
return crtc->logical_monitor;
|
||||
if (output->crtc)
|
||||
return output->crtc->logical_monitor;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@@ -1407,18 +1381,6 @@ meta_monitor_get_current_mode (MetaMonitor *monitor)
|
||||
return priv->current_mode;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_current_mode_known (MetaMonitor *monitor)
|
||||
{
|
||||
MetaOutput *output;
|
||||
MetaCrtc *crtc;
|
||||
|
||||
output = meta_monitor_get_main_output (monitor);
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
|
||||
return meta_monitor_is_active (monitor) == (crtc && crtc->current_mode);
|
||||
}
|
||||
|
||||
void
|
||||
meta_monitor_derive_current_mode (MetaMonitor *monitor)
|
||||
{
|
||||
@@ -1438,8 +1400,6 @@ meta_monitor_derive_current_mode (MetaMonitor *monitor)
|
||||
}
|
||||
|
||||
priv->current_mode = current_mode;
|
||||
|
||||
g_warn_if_fail (is_current_mode_known (monitor));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1563,22 +1523,6 @@ meta_monitor_calculate_mode_scale (MetaMonitor *monitor,
|
||||
return calculate_scale (monitor, monitor_mode);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_logical_size_large_enough (gint width, gint height)
|
||||
{
|
||||
return width >= MINIMUM_LOGICAL_WIDTH &&
|
||||
height >= MINIMUM_LOGICAL_HEIGHT;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_monitor_mode_should_be_advertised (MetaMonitorMode *monitor_mode)
|
||||
{
|
||||
g_return_val_if_fail (monitor_mode != NULL, FALSE);
|
||||
|
||||
return is_logical_size_large_enough (monitor_mode->spec.width,
|
||||
monitor_mode->spec.height);
|
||||
}
|
||||
|
||||
static float
|
||||
get_closest_scale_factor_for_resolution (float width,
|
||||
float height,
|
||||
@@ -1599,7 +1543,8 @@ get_closest_scale_factor_for_resolution (float width,
|
||||
|
||||
if (scale < MINIMUM_SCALE_FACTOR ||
|
||||
scale > MAXIMUM_SCALE_FACTOR ||
|
||||
!is_logical_size_large_enough (floorf (scaled_w), floorf (scaled_h)))
|
||||
floorf (scaled_w) < MINIMUM_LOGICAL_WIDTH ||
|
||||
floorf (scaled_h) < MINIMUM_LOGICAL_HEIGHT)
|
||||
goto out;
|
||||
|
||||
if (floorf (scaled_w) == scaled_w && floorf (scaled_h) == scaled_h)
|
||||
|
@@ -219,8 +219,6 @@ gboolean meta_monitor_mode_foreach_output (MetaMonitor *monitor,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
gboolean meta_monitor_mode_should_be_advertised (MetaMonitorMode *monitor_mode);
|
||||
|
||||
MetaMonitorSpec * meta_monitor_spec_clone (MetaMonitorSpec *monitor_id);
|
||||
|
||||
gboolean meta_monitor_spec_equals (MetaMonitorSpec *monitor_id,
|
||||
|
@@ -21,13 +21,7 @@
|
||||
|
||||
#include "backends/meta-output.h"
|
||||
|
||||
typedef struct _MetaOutputPrivate
|
||||
{
|
||||
/* The CRTC driving this output, NULL if the output is not enabled */
|
||||
MetaCrtc *crtc;
|
||||
} MetaOutputPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (MetaOutput, meta_output, G_TYPE_OBJECT)
|
||||
G_DEFINE_TYPE (MetaOutput, meta_output, G_TYPE_OBJECT)
|
||||
|
||||
MetaGpu *
|
||||
meta_output_get_gpu (MetaOutput *output)
|
||||
@@ -35,44 +29,6 @@ meta_output_get_gpu (MetaOutput *output)
|
||||
return output->gpu;
|
||||
}
|
||||
|
||||
void
|
||||
meta_output_assign_crtc (MetaOutput *output,
|
||||
MetaCrtc *crtc)
|
||||
{
|
||||
MetaOutputPrivate *priv = meta_output_get_instance_private (output);
|
||||
|
||||
g_assert (crtc);
|
||||
|
||||
g_set_object (&priv->crtc, crtc);
|
||||
}
|
||||
|
||||
void
|
||||
meta_output_unassign_crtc (MetaOutput *output)
|
||||
{
|
||||
MetaOutputPrivate *priv = meta_output_get_instance_private (output);
|
||||
|
||||
g_clear_object (&priv->crtc);
|
||||
}
|
||||
|
||||
MetaCrtc *
|
||||
meta_output_get_assigned_crtc (MetaOutput *output)
|
||||
{
|
||||
MetaOutputPrivate *priv = meta_output_get_instance_private (output);
|
||||
|
||||
return priv->crtc;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_output_dispose (GObject *object)
|
||||
{
|
||||
MetaOutput *output = META_OUTPUT (object);
|
||||
MetaOutputPrivate *priv = meta_output_get_instance_private (output);
|
||||
|
||||
g_clear_object (&priv->crtc);
|
||||
|
||||
G_OBJECT_CLASS (meta_output_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_output_finalize (GObject *object)
|
||||
{
|
||||
@@ -102,6 +58,5 @@ meta_output_class_init (MetaOutputClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->dispose = meta_output_dispose;
|
||||
object_class->finalize = meta_output_finalize;
|
||||
}
|
||||
|
@@ -64,6 +64,9 @@ struct _MetaOutput
|
||||
|
||||
MetaGpu *gpu;
|
||||
|
||||
/* The CRTC driving this output, NULL if the output is not enabled */
|
||||
MetaCrtc *crtc;
|
||||
|
||||
/* The low-level ID of this output, used to apply back configuration */
|
||||
glong winsys_id;
|
||||
char *name;
|
||||
@@ -119,11 +122,4 @@ G_DECLARE_FINAL_TYPE (MetaOutput, meta_output, META, OUTPUT, GObject)
|
||||
|
||||
MetaGpu * meta_output_get_gpu (MetaOutput *output);
|
||||
|
||||
void meta_output_assign_crtc (MetaOutput *output,
|
||||
MetaCrtc *crtc);
|
||||
|
||||
void meta_output_unassign_crtc (MetaOutput *output);
|
||||
|
||||
MetaCrtc * meta_output_get_assigned_crtc (MetaOutput *output);
|
||||
|
||||
#endif /* META_OUTPUT_H */
|
||||
|
@@ -360,9 +360,9 @@ create_pipewire_stream (MetaScreenCastStreamSrc *src,
|
||||
":", spa_type->format_video.format, "I", spa_type->video_format.BGRx,
|
||||
":", spa_type->format_video.size, "R", &SPA_RECTANGLE (width, height),
|
||||
":", spa_type->format_video.framerate, "F", &SPA_FRACTION (0, 1),
|
||||
":", spa_type->format_video.max_framerate, "Fru", &max_framerate,
|
||||
PROP_RANGE (&min_framerate,
|
||||
&max_framerate));
|
||||
":", spa_type->format_video.max_framerate, "Fr", &max_framerate,
|
||||
PROP_RANGE (&min_framerate,
|
||||
&max_framerate));
|
||||
|
||||
pw_stream_add_listener (pipewire_stream,
|
||||
&priv->pipewire_stream_listener,
|
||||
|
@@ -31,9 +31,7 @@ typedef enum _MetaExperimentalFeature
|
||||
{
|
||||
META_EXPERIMENTAL_FEATURE_NONE = 0,
|
||||
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
|
||||
META_EXPERIMENTAL_FEATURE_SCREEN_CAST = (1 << 1),
|
||||
META_EXPERIMENTAL_FEATURE_REMOTE_DESKTOP = (1 << 2),
|
||||
META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 3),
|
||||
META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1),
|
||||
} MetaExperimentalFeature;
|
||||
|
||||
#define META_TYPE_SETTINGS (meta_settings_get_type ())
|
||||
|
@@ -260,13 +260,8 @@ experimental_features_handler (GVariant *features_variant,
|
||||
g_variant_iter_init (&features_iter, features_variant);
|
||||
while (g_variant_iter_loop (&features_iter, "s", &feature))
|
||||
{
|
||||
/* So far no experimental features defined. */
|
||||
if (g_str_equal (feature, "scale-monitor-framebuffer"))
|
||||
features |= META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER;
|
||||
else if (g_str_equal (feature, "screen-cast"))
|
||||
features |= META_EXPERIMENTAL_FEATURE_SCREEN_CAST;
|
||||
else if (g_str_equal (feature, "remote-desktop"))
|
||||
features |= META_EXPERIMENTAL_FEATURE_REMOTE_DESKTOP;
|
||||
else if (g_str_equal (feature, "kms-modifiers"))
|
||||
features |= META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS;
|
||||
else
|
||||
|
@@ -291,7 +291,6 @@ update_monitor_crtc_cursor (MetaMonitor *monitor,
|
||||
data->in_cursor_renderer_native;
|
||||
MetaCursorRendererNativePrivate *priv =
|
||||
meta_cursor_renderer_native_get_instance_private (cursor_renderer_native);
|
||||
MetaCrtc *crtc;
|
||||
MetaMonitorTransform transform;
|
||||
ClutterRect scaled_crtc_rect;
|
||||
float scale;
|
||||
@@ -331,8 +330,6 @@ update_monitor_crtc_cursor (MetaMonitor *monitor,
|
||||
},
|
||||
};
|
||||
|
||||
crtc = meta_output_get_assigned_crtc (monitor_crtc_mode->output);
|
||||
|
||||
if (priv->has_hw_cursor &&
|
||||
clutter_rect_intersection (&scaled_crtc_rect,
|
||||
&data->in_local_cursor_rect,
|
||||
@@ -343,7 +340,7 @@ update_monitor_crtc_cursor (MetaMonitor *monitor,
|
||||
float crtc_cursor_x, crtc_cursor_y;
|
||||
|
||||
set_crtc_cursor (data->in_cursor_renderer_native,
|
||||
crtc,
|
||||
monitor_crtc_mode->output->crtc,
|
||||
data->in_cursor_sprite);
|
||||
|
||||
gpu_kms = META_GPU_KMS (meta_monitor_get_gpu (monitor));
|
||||
@@ -353,7 +350,7 @@ update_monitor_crtc_cursor (MetaMonitor *monitor,
|
||||
crtc_cursor_y = (data->in_local_cursor_rect.origin.y -
|
||||
scaled_crtc_rect.origin.y) * scale;
|
||||
drmModeMoveCursor (kms_fd,
|
||||
crtc->crtc_id,
|
||||
monitor_crtc_mode->output->crtc->crtc_id,
|
||||
roundf (crtc_cursor_x),
|
||||
roundf (crtc_cursor_y));
|
||||
|
||||
@@ -361,7 +358,8 @@ update_monitor_crtc_cursor (MetaMonitor *monitor,
|
||||
}
|
||||
else
|
||||
{
|
||||
set_crtc_cursor (data->in_cursor_renderer_native, crtc, NULL);
|
||||
set_crtc_cursor (data->in_cursor_renderer_native,
|
||||
monitor_crtc_mode->output->crtc, NULL);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -710,7 +708,6 @@ static void
|
||||
cursor_priv_free (MetaCursorNativePrivate *cursor_priv)
|
||||
{
|
||||
g_hash_table_destroy (cursor_priv->gpu_states);
|
||||
g_free (cursor_priv);
|
||||
}
|
||||
|
||||
static MetaCursorNativePrivate *
|
||||
|
@@ -68,11 +68,8 @@ struct _MetaGpuKms
|
||||
int max_buffer_height;
|
||||
|
||||
gboolean page_flips_not_supported;
|
||||
|
||||
gboolean resources_init_failed_before;
|
||||
};
|
||||
|
||||
G_DEFINE_QUARK (MetaGpuKmsError, meta_gpu_kms_error)
|
||||
G_DEFINE_TYPE (MetaGpuKms, meta_gpu_kms, META_TYPE_GPU)
|
||||
|
||||
static gboolean
|
||||
@@ -113,10 +110,8 @@ get_crtc_drm_connectors (MetaGpu *gpu,
|
||||
for (l = meta_gpu_get_outputs (gpu); l; l = l->next)
|
||||
{
|
||||
MetaOutput *output = l->data;
|
||||
MetaCrtc *assigned_crtc;
|
||||
|
||||
assigned_crtc = meta_output_get_assigned_crtc (output);
|
||||
if (assigned_crtc == crtc)
|
||||
if (output->crtc == crtc)
|
||||
g_array_append_val (connectors_array, output->winsys_id);
|
||||
}
|
||||
|
||||
@@ -151,10 +146,7 @@ meta_gpu_kms_apply_crtc_mode (MetaGpuKms *gpu_kms,
|
||||
connectors, n_connectors,
|
||||
mode) != 0)
|
||||
{
|
||||
if (mode)
|
||||
g_warning ("Failed to set CRTC mode %s: %m", crtc->current_mode->name);
|
||||
else
|
||||
g_warning ("Failed to disable CRTC");
|
||||
g_warning ("Failed to set CRTC mode %s: %m", crtc->current_mode->name);
|
||||
g_free (connectors);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -199,10 +191,8 @@ meta_gpu_kms_is_crtc_active (MetaGpuKms *gpu_kms,
|
||||
for (l = meta_gpu_get_outputs (gpu); l; l = l->next)
|
||||
{
|
||||
MetaOutput *output = l->data;
|
||||
MetaCrtc *assigned_crtc;
|
||||
|
||||
assigned_crtc = meta_output_get_assigned_crtc (output);
|
||||
if (assigned_crtc == crtc)
|
||||
if (output->crtc == crtc)
|
||||
{
|
||||
connected_crtc_found = TRUE;
|
||||
break;
|
||||
@@ -729,34 +719,20 @@ init_outputs (MetaGpuKms *gpu_kms,
|
||||
setup_output_clones (gpu);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_kms_resources_init (MetaKmsResources *resources,
|
||||
int fd,
|
||||
GError **error)
|
||||
|
||||
static void
|
||||
meta_kms_resources_init (MetaKmsResources *resources,
|
||||
int fd)
|
||||
{
|
||||
drmModeRes *drm_resources;
|
||||
unsigned int i;
|
||||
|
||||
drm_resources = drmModeGetResources (fd);
|
||||
|
||||
if (!drm_resources)
|
||||
{
|
||||
g_set_error (error,
|
||||
G_IO_ERROR,
|
||||
G_IO_ERROR_FAILED,
|
||||
"Calling drmModeGetResources() failed");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
resources->resources = drm_resources;
|
||||
|
||||
resources->n_encoders = (unsigned int) drm_resources->count_encoders;
|
||||
resources->encoders = g_new (drmModeEncoder *, resources->n_encoders);
|
||||
for (i = 0; i < resources->n_encoders; i++)
|
||||
resources->encoders[i] = drmModeGetEncoder (fd, drm_resources->encoders[i]);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -768,7 +744,7 @@ meta_kms_resources_release (MetaKmsResources *resources)
|
||||
drmModeFreeEncoder (resources->encoders[i]);
|
||||
g_free (resources->encoders);
|
||||
|
||||
g_clear_pointer (&resources->resources, drmModeFreeResources);
|
||||
drmModeFreeResources (resources->resources);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -779,18 +755,8 @@ meta_gpu_kms_read_current (MetaGpu *gpu,
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_gpu_get_monitor_manager (gpu);
|
||||
MetaKmsResources resources;
|
||||
g_autoptr (GError) local_error = NULL;
|
||||
|
||||
if (!meta_kms_resources_init (&resources, gpu_kms->fd, &local_error))
|
||||
{
|
||||
if (!gpu_kms->resources_init_failed_before)
|
||||
{
|
||||
g_warning ("meta_kms_resources_init failed: %s, assuming we have no outputs",
|
||||
local_error->message);
|
||||
gpu_kms->resources_init_failed_before = TRUE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
meta_kms_resources_init (&resources, gpu_kms->fd);
|
||||
|
||||
gpu_kms->max_buffer_width = resources.resources->max_width;
|
||||
gpu_kms->max_buffer_height = resources.resources->max_height;
|
||||
@@ -803,8 +769,6 @@ meta_gpu_kms_read_current (MetaGpu *gpu,
|
||||
are freed by the platform-independent layer. */
|
||||
free_resources (gpu_kms);
|
||||
|
||||
g_assert (resources.resources->count_connectors > 0);
|
||||
|
||||
init_connectors (gpu_kms, resources.resources);
|
||||
init_modes (gpu_kms, resources.resources);
|
||||
init_crtcs (gpu_kms, &resources);
|
||||
@@ -815,12 +779,6 @@ meta_gpu_kms_read_current (MetaGpu *gpu,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_gpu_kms_can_have_outputs (MetaGpuKms *gpu_kms)
|
||||
{
|
||||
return gpu_kms->n_connectors > 0;
|
||||
}
|
||||
|
||||
MetaGpuKms *
|
||||
meta_gpu_kms_new (MetaMonitorManagerKms *monitor_manager_kms,
|
||||
const char *kms_file_path,
|
||||
@@ -834,47 +792,12 @@ meta_gpu_kms_new (MetaMonitorManagerKms *monitor_manager_kms,
|
||||
GSource *source;
|
||||
MetaKmsSource *kms_source;
|
||||
MetaGpuKms *gpu_kms;
|
||||
drmModeRes *drm_resources;
|
||||
guint n_connectors;
|
||||
int kms_fd;
|
||||
|
||||
kms_fd = meta_launcher_open_restricted (launcher, kms_file_path, error);
|
||||
if (kms_fd == -1)
|
||||
return NULL;
|
||||
|
||||
/* Some GPUs might have no connectors, for example dedicated GPUs on PRIME (hybrid) laptops.
|
||||
* These GPUs cannot render anything on separate screens, and they are aggressively switched
|
||||
* off by the kernel.
|
||||
*
|
||||
* If we add these PRIME GPUs to the GPU list anyway, Mutter keeps awakening the secondary GPU,
|
||||
* and doing this causes a considerable stuttering. These GPUs are usually put to sleep again
|
||||
* after ~2s without a workload.
|
||||
*
|
||||
* For now, to avoid this situation, only create the MetaGpuKms when the GPU has any connectors.
|
||||
*/
|
||||
drm_resources = drmModeGetResources (kms_fd);
|
||||
|
||||
if (!drm_resources)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "No resources");
|
||||
meta_launcher_close_restricted (launcher, kms_fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
n_connectors = drm_resources->count_connectors;
|
||||
|
||||
drmModeFreeResources (drm_resources);
|
||||
|
||||
if (n_connectors == 0)
|
||||
{
|
||||
g_set_error (error,
|
||||
META_GPU_KMS_ERROR,
|
||||
META_GPU_KMS_ERROR_NO_CONNECTORS,
|
||||
"No connectors available in this GPU. This is probably a dedicated GPU in a hybrid setup.");
|
||||
meta_launcher_close_restricted (launcher, kms_fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gpu_kms = g_object_new (META_TYPE_GPU_KMS,
|
||||
"monitor-manager", monitor_manager_kms,
|
||||
NULL);
|
||||
@@ -884,8 +807,6 @@ meta_gpu_kms_new (MetaMonitorManagerKms *monitor_manager_kms,
|
||||
|
||||
drmSetClientCap (gpu_kms->fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
|
||||
|
||||
meta_gpu_kms_read_current (META_GPU (gpu_kms), NULL);
|
||||
|
||||
source = g_source_new (&kms_event_funcs, sizeof (MetaKmsSource));
|
||||
kms_source = (MetaKmsSource *) source;
|
||||
kms_source->fd_tag = g_source_add_unix_fd (source,
|
||||
|
@@ -29,14 +29,6 @@
|
||||
#include "backends/meta-gpu.h"
|
||||
#include "backends/native/meta-monitor-manager-kms.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_GPU_KMS_ERROR_NO_CONNECTORS,
|
||||
} MetaGpuKmsError;
|
||||
|
||||
#define META_GPU_KMS_ERROR (meta_gpu_kms_error_quark ())
|
||||
GQuark meta_gpu_kms_error_quark (void);
|
||||
|
||||
#define META_TYPE_GPU_KMS (meta_gpu_kms_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (MetaGpuKms, meta_gpu_kms, META, GPU_KMS, MetaGpu)
|
||||
|
||||
@@ -61,8 +53,6 @@ gboolean meta_gpu_kms_apply_crtc_mode (MetaGpuKms *gpu_kms,
|
||||
int y,
|
||||
uint32_t fb_id);
|
||||
|
||||
gboolean meta_gpu_kms_can_have_outputs (MetaGpuKms *gpu_kms);
|
||||
|
||||
gboolean meta_gpu_kms_is_crtc_active (MetaGpuKms *gpu_kms,
|
||||
MetaCrtc *crtc);
|
||||
|
||||
|
@@ -188,7 +188,7 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
||||
MetaOutput *output = g_ptr_array_index (crtc_info->outputs, j);
|
||||
|
||||
output->is_dirty = TRUE;
|
||||
meta_output_assign_crtc (output, crtc);
|
||||
output->crtc = crtc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
||||
continue;
|
||||
}
|
||||
|
||||
meta_output_unassign_crtc (output);
|
||||
output->crtc = NULL;
|
||||
output->is_primary = FALSE;
|
||||
}
|
||||
}
|
||||
@@ -642,12 +642,10 @@ meta_monitor_manager_kms_initable_init (GInitable *initable,
|
||||
GError **error)
|
||||
{
|
||||
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (initable);
|
||||
MetaMonitorManager *manager = META_MONITOR_MANAGER (manager_kms);
|
||||
const char *subsystems[2] = { "drm", NULL };
|
||||
GList *gpu_paths;
|
||||
g_autofree char *primary_gpu_path = NULL;
|
||||
GList *l;
|
||||
gboolean can_have_outputs;
|
||||
|
||||
manager_kms->udev = g_udev_client_new (subsystems);
|
||||
|
||||
@@ -683,11 +681,8 @@ meta_monitor_manager_kms_initable_init (GInitable *initable,
|
||||
gpu_kms = meta_gpu_kms_new (manager_kms, gpu_path, &secondary_error);
|
||||
if (!gpu_kms)
|
||||
{
|
||||
if (g_error_matches (secondary_error, META_GPU_KMS_ERROR, META_GPU_KMS_ERROR_NO_CONNECTORS))
|
||||
g_message ("Ignoring GPU %s due to the lack of connectors", gpu_path);
|
||||
else
|
||||
g_warning ("Failed to open secondary gpu '%s': %s", gpu_path, secondary_error->message);
|
||||
|
||||
g_warning ("Failed to open secondary gpu '%s': %s",
|
||||
gpu_path, secondary_error->message);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -696,24 +691,6 @@ meta_monitor_manager_kms_initable_init (GInitable *initable,
|
||||
}
|
||||
g_list_free_full (gpu_paths, g_free);
|
||||
|
||||
can_have_outputs = FALSE;
|
||||
for (l = meta_monitor_manager_get_gpus (manager); l; l = l->next)
|
||||
{
|
||||
MetaGpuKms *gpu_kms = l->data;
|
||||
|
||||
if (meta_gpu_kms_can_have_outputs (gpu_kms))
|
||||
{
|
||||
can_have_outputs = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!can_have_outputs)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
|
||||
"No GPUs with outputs found");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -64,13 +64,11 @@ typedef struct _MetaOutputKms
|
||||
void
|
||||
meta_output_kms_set_underscan (MetaOutput *output)
|
||||
{
|
||||
MetaCrtc *crtc;
|
||||
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
if (!crtc)
|
||||
if (!output->crtc)
|
||||
return;
|
||||
|
||||
meta_crtc_kms_set_underscan (crtc, output->is_underscanning);
|
||||
meta_crtc_kms_set_underscan (output->crtc,
|
||||
output->is_underscanning);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -602,14 +600,14 @@ meta_create_kms_output (MetaGpuKms *gpu_kms,
|
||||
|
||||
if (crtc->crtc_id == output_kms->current_encoder->crtc_id)
|
||||
{
|
||||
meta_output_assign_crtc (output, crtc);
|
||||
output->crtc = crtc;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_output_unassign_crtc (output);
|
||||
output->crtc = NULL;
|
||||
}
|
||||
|
||||
if (old_output)
|
||||
|
@@ -993,29 +993,14 @@ meta_renderer_native_choose_egl_config (CoglDisplay *cogl_display,
|
||||
CoglRendererEGL *cogl_renderer_egl = cogl_renderer->winsys;
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaEgl *egl = meta_backend_get_egl (backend);
|
||||
MetaRendererNativeGpuData *renderer_gpu_data = cogl_renderer_egl->platform;
|
||||
EGLDisplay egl_display = cogl_renderer_egl->edpy;
|
||||
|
||||
switch (renderer_gpu_data->mode)
|
||||
{
|
||||
case META_RENDERER_NATIVE_MODE_GBM:
|
||||
return choose_egl_config_from_gbm_format (egl,
|
||||
egl_display,
|
||||
attributes,
|
||||
GBM_FORMAT_XRGB8888,
|
||||
out_config,
|
||||
error);
|
||||
#ifdef HAVE_EGL_DEVICE
|
||||
case META_RENDERER_NATIVE_MODE_EGL_DEVICE:
|
||||
return meta_egl_choose_first_config (egl,
|
||||
egl_display,
|
||||
attributes,
|
||||
out_config,
|
||||
error);
|
||||
#endif
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return choose_egl_config_from_gbm_format (egl,
|
||||
egl_display,
|
||||
attributes,
|
||||
GBM_FORMAT_XRGB8888,
|
||||
out_config,
|
||||
error);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1627,23 +1612,12 @@ gbm_get_next_fb_id (MetaGpuKms *gpu_kms,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (gbm_bo_get_handle_for_plane (next_bo, 0).s32 == -1)
|
||||
for (i = 0; i < gbm_bo_get_plane_count (next_bo); i++)
|
||||
{
|
||||
/* Failed to fetch handle to plane, falling back to old method */
|
||||
strides[0] = gbm_bo_get_stride (next_bo);
|
||||
handles[0] = gbm_bo_get_handle (next_bo).u32;
|
||||
offsets[0] = 0;
|
||||
modifiers[0] = DRM_FORMAT_MOD_INVALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < gbm_bo_get_plane_count (next_bo); i++)
|
||||
{
|
||||
strides[i] = gbm_bo_get_stride_for_plane (next_bo, i);
|
||||
handles[i] = gbm_bo_get_handle_for_plane (next_bo, i).u32;
|
||||
offsets[i] = gbm_bo_get_offset (next_bo, i);
|
||||
modifiers[i] = gbm_bo_get_modifier (next_bo);
|
||||
}
|
||||
strides[i] = gbm_bo_get_stride_for_plane (next_bo, i);
|
||||
handles[i] = gbm_bo_get_handle_for_plane (next_bo, i).u32;
|
||||
offsets[i] = gbm_bo_get_offset (next_bo, i);
|
||||
modifiers[i] = gbm_bo_get_modifier (next_bo);
|
||||
}
|
||||
|
||||
kms_fd = meta_gpu_kms_get_fd (gpu_kms);
|
||||
@@ -2120,7 +2094,6 @@ meta_renderer_native_create_surface_egl_device (CoglOnscreen *onscreen,
|
||||
EGLDisplay egl_display = renderer_gpu_data->egl_display;
|
||||
MetaMonitor *monitor;
|
||||
MetaOutput *output;
|
||||
MetaCrtc *crtc;
|
||||
EGLConfig egl_config;
|
||||
EGLStreamKHR egl_stream;
|
||||
EGLSurface egl_surface;
|
||||
@@ -2144,7 +2117,6 @@ meta_renderer_native_create_surface_egl_device (CoglOnscreen *onscreen,
|
||||
|
||||
monitor = meta_logical_monitor_get_monitors (logical_monitor)->data;
|
||||
output = meta_monitor_get_main_output (monitor);
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
|
||||
/*
|
||||
* An "logical_monitor" may have multiple outputs/crtcs in case its tiled,
|
||||
@@ -2152,7 +2124,7 @@ meta_renderer_native_create_surface_egl_device (CoglOnscreen *onscreen,
|
||||
* lets pass the first one.
|
||||
*/
|
||||
output_attribs[0] = EGL_DRM_CRTC_EXT;
|
||||
output_attribs[1] = crtc->crtc_id;
|
||||
output_attribs[1] = output->crtc->crtc_id;
|
||||
output_attribs[2] = EGL_NONE;
|
||||
|
||||
if (!meta_egl_get_output_layers (egl, egl_display,
|
||||
@@ -2750,12 +2722,9 @@ calculate_view_transform (MetaMonitorManager *monitor_manager,
|
||||
{
|
||||
MetaMonitor *main_monitor;
|
||||
MetaOutput *main_output;
|
||||
MetaCrtc *crtc;
|
||||
MetaMonitorTransform crtc_transform;
|
||||
|
||||
main_monitor = meta_logical_monitor_get_monitors (logical_monitor)->data;
|
||||
main_output = meta_monitor_get_main_output (main_monitor);
|
||||
crtc = meta_output_get_assigned_crtc (main_output);
|
||||
crtc_transform =
|
||||
meta_monitor_logical_to_crtc_transform (main_monitor,
|
||||
logical_monitor->transform);
|
||||
@@ -2766,7 +2735,7 @@ calculate_view_transform (MetaMonitorManager *monitor_manager,
|
||||
*/
|
||||
|
||||
if (meta_monitor_manager_is_transform_handled (monitor_manager,
|
||||
crtc,
|
||||
main_output->crtc,
|
||||
crtc_transform))
|
||||
return META_MONITOR_TRANSFORM_NORMAL;
|
||||
else
|
||||
@@ -2943,11 +2912,10 @@ meta_renderer_native_set_property (GObject *object,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
create_secondary_egl_config (MetaEgl *egl,
|
||||
MetaRendererNativeMode mode,
|
||||
EGLDisplay egl_display,
|
||||
EGLConfig *egl_config,
|
||||
GError **error)
|
||||
create_secondary_egl_config (MetaEgl *egl,
|
||||
EGLDisplay egl_display,
|
||||
EGLConfig *egl_config,
|
||||
GError **error)
|
||||
{
|
||||
EGLint attributes[] = {
|
||||
EGL_RED_SIZE, 1,
|
||||
@@ -2960,26 +2928,12 @@ create_secondary_egl_config (MetaEgl *egl,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case META_RENDERER_NATIVE_MODE_GBM:
|
||||
return choose_egl_config_from_gbm_format (egl,
|
||||
egl_display,
|
||||
attributes,
|
||||
GBM_FORMAT_XRGB8888,
|
||||
egl_config,
|
||||
error);
|
||||
#ifdef HAVE_EGL_DEVICE
|
||||
case META_RENDERER_NATIVE_MODE_EGL_DEVICE:
|
||||
return meta_egl_choose_first_config (egl,
|
||||
egl_display,
|
||||
attributes,
|
||||
egl_config,
|
||||
error);
|
||||
#endif
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return choose_egl_config_from_gbm_format (egl,
|
||||
egl_display,
|
||||
attributes,
|
||||
GBM_FORMAT_XRGB8888,
|
||||
egl_config,
|
||||
error);
|
||||
}
|
||||
|
||||
static EGLContext
|
||||
@@ -3023,8 +2977,7 @@ init_secondary_gpu_data_gpu (MetaRendererNativeGpuData *renderer_gpu_data,
|
||||
EGLContext egl_context;
|
||||
char **missing_gl_extensions;
|
||||
|
||||
if (!create_secondary_egl_config (egl, renderer_gpu_data->mode, egl_display,
|
||||
&egl_config, error))
|
||||
if (!create_secondary_egl_config (egl,egl_display, &egl_config, error))
|
||||
return FALSE;
|
||||
|
||||
egl_context = create_secondary_egl_context (egl, egl_display, egl_config, error);
|
||||
|
@@ -60,10 +60,6 @@ struct _MetaBackendX11Private
|
||||
XSyncAlarm user_active_alarm;
|
||||
XSyncCounter counter;
|
||||
|
||||
int current_touch_replay_sync_serial;
|
||||
int pending_touch_replay_sync_serial;
|
||||
Atom touch_replay_sync_atom;
|
||||
|
||||
int xinput_opcode;
|
||||
int xinput_event_base;
|
||||
int xinput_error_base;
|
||||
@@ -172,26 +168,6 @@ meta_backend_x11_translate_device_event (MetaBackendX11 *x11,
|
||||
backend_x11_class->translate_device_event (x11, device_event);
|
||||
}
|
||||
|
||||
static void
|
||||
maybe_translate_touch_replay_pointer_event (MetaBackendX11 *x11,
|
||||
XIDeviceEvent *device_event)
|
||||
{
|
||||
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
|
||||
|
||||
if (!device_event->send_event &&
|
||||
device_event->time != CurrentTime &&
|
||||
priv->current_touch_replay_sync_serial !=
|
||||
priv->pending_touch_replay_sync_serial &&
|
||||
XSERVER_TIME_IS_BEFORE (device_event->time, priv->latest_evtime))
|
||||
{
|
||||
/* Emulated pointer events received after XIRejectTouch is received
|
||||
* on a passive touch grab will contain older timestamps, update those
|
||||
* so we dont get InvalidTime at grabs.
|
||||
*/
|
||||
device_event->time = priv->latest_evtime;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
translate_device_event (MetaBackendX11 *x11,
|
||||
XIDeviceEvent *device_event)
|
||||
@@ -201,7 +177,19 @@ translate_device_event (MetaBackendX11 *x11,
|
||||
meta_backend_x11_translate_device_event (x11, device_event);
|
||||
|
||||
if (!device_event->send_event && device_event->time != CurrentTime)
|
||||
priv->latest_evtime = device_event->time;
|
||||
{
|
||||
if (XSERVER_TIME_IS_BEFORE (device_event->time, priv->latest_evtime))
|
||||
{
|
||||
/* Emulated pointer events received after XIRejectTouch is received
|
||||
* on a passive touch grab will contain older timestamps, update those
|
||||
* so we dont get InvalidTime at grabs.
|
||||
*/
|
||||
device_event->time = priv->latest_evtime;
|
||||
}
|
||||
|
||||
/* Update the internal latest evtime, for any possible later use */
|
||||
priv->latest_evtime = device_event->time;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -266,9 +254,6 @@ maybe_spoof_event_as_stage_event (MetaBackendX11 *x11,
|
||||
case XI_Motion:
|
||||
case XI_ButtonPress:
|
||||
case XI_ButtonRelease:
|
||||
maybe_translate_touch_replay_pointer_event (x11,
|
||||
(XIDeviceEvent *) input_event);
|
||||
/* Intentional fall-through */
|
||||
case XI_KeyPress:
|
||||
case XI_KeyRelease:
|
||||
case XI_TouchBegin:
|
||||
@@ -336,17 +321,6 @@ handle_host_xevent (MetaBackend *backend,
|
||||
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
|
||||
gboolean bypass_clutter = FALSE;
|
||||
|
||||
switch (event->type)
|
||||
{
|
||||
case ClientMessage:
|
||||
if (event->xclient.window == meta_backend_x11_get_xwindow (x11) &&
|
||||
event->xclient.message_type == priv->touch_replay_sync_atom)
|
||||
priv->current_touch_replay_sync_serial = event->xclient.data.l[0];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
XGetEventData (priv->xdisplay, &event->xcookie);
|
||||
|
||||
{
|
||||
@@ -554,10 +528,6 @@ meta_backend_x11_post_init (MetaBackend *backend)
|
||||
monitor_manager = meta_backend_get_monitor_manager (backend);
|
||||
g_signal_connect (monitor_manager, "monitors-changed-internal",
|
||||
G_CALLBACK (on_monitors_changed), backend);
|
||||
|
||||
priv->touch_replay_sync_atom = XInternAtom (priv->xdisplay,
|
||||
"_MUTTER_TOUCH_SEQUENCE_SYNC",
|
||||
False);
|
||||
}
|
||||
|
||||
static ClutterBackend *
|
||||
@@ -577,9 +547,8 @@ meta_backend_x11_grab_device (MetaBackend *backend,
|
||||
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
|
||||
int ret;
|
||||
|
||||
if (timestamp != CurrentTime &&
|
||||
XSERVER_TIME_IS_BEFORE (timestamp, priv->latest_evtime))
|
||||
timestamp = priv->latest_evtime;
|
||||
if (timestamp != CurrentTime)
|
||||
timestamp = MAX (timestamp, priv->latest_evtime);
|
||||
|
||||
XISetMask (mask.mask, XI_ButtonPress);
|
||||
XISetMask (mask.mask, XI_ButtonRelease);
|
||||
@@ -614,43 +583,6 @@ meta_backend_x11_ungrab_device (MetaBackend *backend,
|
||||
return (ret == Success);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_backend_x11_finish_touch_sequence (MetaBackend *backend,
|
||||
ClutterEventSequence *sequence,
|
||||
MetaSequenceState state)
|
||||
{
|
||||
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
|
||||
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
|
||||
int event_mode;
|
||||
|
||||
if (state == META_SEQUENCE_ACCEPTED)
|
||||
event_mode = XIAcceptTouch;
|
||||
else if (state == META_SEQUENCE_REJECTED)
|
||||
event_mode = XIRejectTouch;
|
||||
else
|
||||
g_return_if_reached ();
|
||||
|
||||
XIAllowTouchEvents (priv->xdisplay,
|
||||
META_VIRTUAL_CORE_POINTER_ID,
|
||||
clutter_x11_event_sequence_get_touch_detail (sequence),
|
||||
DefaultRootWindow (priv->xdisplay), event_mode);
|
||||
|
||||
if (state == META_SEQUENCE_REJECTED)
|
||||
{
|
||||
XClientMessageEvent ev;
|
||||
|
||||
ev = (XClientMessageEvent) {
|
||||
.type = ClientMessage,
|
||||
.window = meta_backend_x11_get_xwindow (x11),
|
||||
.message_type = priv->touch_replay_sync_atom,
|
||||
.format = 32,
|
||||
.data.l[0] = ++priv->pending_touch_replay_sync_serial,
|
||||
};
|
||||
XSendEvent (priv->xdisplay, meta_backend_x11_get_xwindow (x11),
|
||||
False, 0, (XEvent *) &ev);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_backend_x11_warp_pointer (MetaBackend *backend,
|
||||
int x,
|
||||
@@ -836,7 +768,6 @@ meta_backend_x11_class_init (MetaBackendX11Class *klass)
|
||||
backend_class->post_init = meta_backend_x11_post_init;
|
||||
backend_class->grab_device = meta_backend_x11_grab_device;
|
||||
backend_class->ungrab_device = meta_backend_x11_ungrab_device;
|
||||
backend_class->finish_touch_sequence = meta_backend_x11_finish_touch_sequence;
|
||||
backend_class->warp_pointer = meta_backend_x11_warp_pointer;
|
||||
backend_class->get_current_logical_monitor = meta_backend_x11_get_current_logical_monitor;
|
||||
backend_class->get_keymap = meta_backend_x11_get_keymap;
|
||||
|
@@ -225,10 +225,8 @@ is_crtc_assignment_changed (MetaCrtc *crtc,
|
||||
for (j = 0; j < crtc_info->outputs->len; j++)
|
||||
{
|
||||
MetaOutput *output = ((MetaOutput**) crtc_info->outputs->pdata)[j];
|
||||
MetaCrtc *assigned_crtc;
|
||||
|
||||
assigned_crtc = meta_output_get_assigned_crtc (output);
|
||||
if (assigned_crtc != crtc)
|
||||
if (output->crtc != crtc)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -245,7 +243,6 @@ is_output_assignment_changed (MetaOutput *output,
|
||||
MetaOutputInfo **output_infos,
|
||||
unsigned int n_output_infos)
|
||||
{
|
||||
MetaCrtc *assigned_crtc;
|
||||
gboolean output_is_found = FALSE;
|
||||
unsigned int i;
|
||||
|
||||
@@ -268,10 +265,8 @@ is_output_assignment_changed (MetaOutput *output,
|
||||
output_is_found = TRUE;
|
||||
}
|
||||
|
||||
assigned_crtc = meta_output_get_assigned_crtc (output);
|
||||
|
||||
if (!output_is_found)
|
||||
return assigned_crtc != NULL;
|
||||
return output->crtc != NULL;
|
||||
|
||||
for (i = 0; i < n_crtc_infos; i++)
|
||||
{
|
||||
@@ -284,7 +279,7 @@ is_output_assignment_changed (MetaOutput *output,
|
||||
((MetaOutput**) crtc_info->outputs->pdata)[j];
|
||||
|
||||
if (crtc_info_output == output &&
|
||||
crtc_info->crtc == assigned_crtc)
|
||||
crtc_info->crtc == output->crtc)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -460,7 +455,7 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
||||
output = ((MetaOutput**)crtc_info->outputs->pdata)[j];
|
||||
|
||||
output->is_dirty = TRUE;
|
||||
meta_output_assign_crtc (output, crtc);
|
||||
output->crtc = crtc;
|
||||
|
||||
output_ids[j] = output->winsys_id;
|
||||
}
|
||||
@@ -526,7 +521,7 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
||||
continue;
|
||||
}
|
||||
|
||||
meta_output_unassign_crtc (output);
|
||||
output->crtc = NULL;
|
||||
output->is_primary = FALSE;
|
||||
}
|
||||
|
||||
|
@@ -97,13 +97,10 @@ output_set_underscanning_xrandr (MetaOutput *output,
|
||||
* make the border configurable. */
|
||||
if (underscanning)
|
||||
{
|
||||
MetaCrtc *crtc;
|
||||
uint32_t border_value;
|
||||
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
|
||||
prop = XInternAtom (xdisplay, "underscan hborder", False);
|
||||
border_value = crtc->current_mode->width * 0.05;
|
||||
border_value = output->crtc->current_mode->width * 0.05;
|
||||
|
||||
xcb_randr_change_output_property (XGetXCBConnection (xdisplay),
|
||||
(XID) output->winsys_id,
|
||||
@@ -112,7 +109,7 @@ output_set_underscanning_xrandr (MetaOutput *output,
|
||||
1, &border_value);
|
||||
|
||||
prop = XInternAtom (xdisplay, "underscan vborder", False);
|
||||
border_value = crtc->current_mode->height * 0.05;
|
||||
border_value = output->crtc->current_mode->height * 0.05;
|
||||
|
||||
xcb_randr_change_output_property (XGetXCBConnection (xdisplay),
|
||||
(XID) output->winsys_id,
|
||||
@@ -740,14 +737,14 @@ output_get_crtcs (MetaOutput *output,
|
||||
}
|
||||
output->n_possible_crtcs = n_actual_crtcs;
|
||||
|
||||
meta_output_unassign_crtc (output);
|
||||
output->crtc = NULL;
|
||||
for (l = meta_gpu_get_crtcs (gpu); l; l = l->next)
|
||||
{
|
||||
MetaCrtc *crtc = l->data;
|
||||
|
||||
if ((XID) crtc->crtc_id == xrandr_output->crtc)
|
||||
{
|
||||
meta_output_assign_crtc (output, crtc);
|
||||
output->crtc = crtc;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -113,7 +113,7 @@ draw_crtc (MetaMonitor *monitor,
|
||||
CoglTexture *texture = data->texture;
|
||||
MetaLogicalMonitor *logical_monitor = data->logical_monitor;
|
||||
MetaOutput *output = monitor_crtc_mode->output;
|
||||
MetaCrtc *crtc;
|
||||
MetaCrtc *crtc = output->crtc;
|
||||
MetaRendererView *renderer_view = META_RENDERER_VIEW (data->view);
|
||||
MetaMonitorTransform view_transform;
|
||||
MetaMonitorTransform layout_transform = META_MONITOR_TRANSFORM_NORMAL;
|
||||
@@ -129,8 +129,6 @@ draw_crtc (MetaMonitor *monitor,
|
||||
texture_width = cogl_texture_get_width (texture);
|
||||
texture_height = cogl_texture_get_height (texture);
|
||||
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
|
||||
clutter_stage_view_get_layout (data->view, &view_layout);
|
||||
sample_x = crtc->rect.x - view_layout.x;
|
||||
sample_y = crtc->rect.y - view_layout.y;
|
||||
|
@@ -50,22 +50,20 @@ calculate_view_transform (MetaMonitorManager *monitor_manager,
|
||||
{
|
||||
MetaMonitor *main_monitor;
|
||||
MetaOutput *main_output;
|
||||
MetaCrtc *crtc;
|
||||
MetaMonitorTransform crtc_transform;
|
||||
|
||||
main_monitor = meta_logical_monitor_get_monitors (logical_monitor)->data;
|
||||
main_output = meta_monitor_get_main_output (main_monitor);
|
||||
crtc = meta_output_get_assigned_crtc (main_output);
|
||||
crtc_transform =
|
||||
meta_monitor_logical_to_crtc_transform (main_monitor,
|
||||
logical_monitor->transform);
|
||||
|
||||
/*
|
||||
* Pick any monitor and output and check; all CRTCs of a logical monitor will
|
||||
* always have the same transform assigned to them.
|
||||
*/
|
||||
|
||||
if (meta_monitor_manager_is_transform_handled (monitor_manager,
|
||||
crtc,
|
||||
main_output->crtc,
|
||||
crtc_transform))
|
||||
return META_MONITOR_TRANSFORM_NORMAL;
|
||||
else
|
||||
|
@@ -18,9 +18,6 @@ struct _MetaCompositor
|
||||
guint pre_paint_func_id;
|
||||
guint post_paint_func_id;
|
||||
|
||||
guint stage_presented_id;
|
||||
guint stage_after_paint_id;
|
||||
|
||||
gint64 server_time_query_time;
|
||||
gint64 server_time_offset;
|
||||
|
||||
@@ -73,6 +70,4 @@ MetaCloseDialog * meta_compositor_create_close_dialog (MetaCompositor *composito
|
||||
MetaInhibitShortcutsDialog * meta_compositor_create_inhibit_shortcuts_dialog (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
|
||||
void meta_compositor_unmanage_window_actors (MetaCompositor *compositor);
|
||||
|
||||
#endif /* META_COMPOSITOR_PRIVATE_H */
|
||||
|
@@ -90,10 +90,6 @@ on_presented (ClutterStage *stage,
|
||||
ClutterFrameInfo *frame_info,
|
||||
MetaCompositor *compositor);
|
||||
|
||||
static void
|
||||
on_top_window_actor_destroyed (MetaWindowActor *window_actor,
|
||||
MetaCompositor *compositor);
|
||||
|
||||
static gboolean
|
||||
is_modal (MetaDisplay *display)
|
||||
{
|
||||
@@ -133,15 +129,6 @@ meta_switch_workspace_completed (MetaCompositor *compositor)
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor)
|
||||
{
|
||||
g_signal_handler_disconnect (compositor->stage,
|
||||
compositor->stage_after_paint_id);
|
||||
g_signal_handler_disconnect (compositor->stage,
|
||||
compositor->stage_presented_id);
|
||||
|
||||
compositor->stage_after_paint_id = 0;
|
||||
compositor->stage_presented_id = 0;
|
||||
compositor->stage = NULL;
|
||||
|
||||
clutter_threads_remove_repaint_func (compositor->pre_paint_func_id);
|
||||
clutter_threads_remove_repaint_func (compositor->post_paint_func_id);
|
||||
|
||||
@@ -512,10 +499,9 @@ meta_compositor_manage (MetaCompositor *compositor)
|
||||
|
||||
compositor->stage = meta_backend_get_stage (backend);
|
||||
|
||||
compositor->stage_presented_id =
|
||||
g_signal_connect (compositor->stage, "presented",
|
||||
G_CALLBACK (on_presented),
|
||||
compositor);
|
||||
g_signal_connect (compositor->stage, "presented",
|
||||
G_CALLBACK (on_presented),
|
||||
compositor);
|
||||
|
||||
/* We use connect_after() here to accomodate code in GNOME Shell that,
|
||||
* when benchmarking drawing performance, connects to ::after-paint
|
||||
@@ -525,9 +511,8 @@ meta_compositor_manage (MetaCompositor *compositor)
|
||||
* connections to ::after-paint, connect() vs. connect_after() doesn't
|
||||
* matter.
|
||||
*/
|
||||
compositor->stage_after_paint_id =
|
||||
g_signal_connect_after (compositor->stage, "after-paint",
|
||||
G_CALLBACK (after_stage_paint), compositor);
|
||||
g_signal_connect_after (CLUTTER_STAGE (compositor->stage), "after-paint",
|
||||
G_CALLBACK (after_stage_paint), compositor);
|
||||
|
||||
clutter_stage_set_sync_delay (CLUTTER_STAGE (compositor->stage), META_SYNC_DELAY);
|
||||
|
||||
@@ -597,23 +582,6 @@ meta_compositor_unmanage (MetaCompositor *compositor)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_unmanage_window_actors (MetaCompositor *compositor)
|
||||
{
|
||||
if (compositor->top_window_actor)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (compositor->top_window_actor,
|
||||
on_top_window_actor_destroyed,
|
||||
compositor);
|
||||
compositor->top_window_actor = NULL;
|
||||
}
|
||||
|
||||
g_clear_pointer (&compositor->window_group, clutter_actor_destroy);
|
||||
g_clear_pointer (&compositor->top_window_group, clutter_actor_destroy);
|
||||
g_clear_pointer (&compositor->feedback_group, clutter_actor_destroy);
|
||||
g_clear_pointer (&compositor->windows, g_list_free);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shape_cow_for_window:
|
||||
* @compositor: A #MetaCompositor
|
||||
@@ -830,7 +798,6 @@ meta_compositor_hide_window (MetaCompositor *compositor,
|
||||
{
|
||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||
meta_window_actor_hide (window_actor, effect);
|
||||
meta_stack_tracker_queue_sync_stack (compositor->display->screen->stack_tracker);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -977,9 +944,6 @@ get_top_visible_window_actor (MetaCompositor *compositor)
|
||||
MetaWindow *window = meta_window_actor_get_meta_window (window_actor);
|
||||
MetaRectangle buffer_rect;
|
||||
|
||||
if (!window->visible_to_compositor)
|
||||
continue;
|
||||
|
||||
meta_window_get_buffer_rect (window, &buffer_rect);
|
||||
|
||||
if (meta_rectangle_overlap (&compositor->display->screen->rect,
|
||||
|
@@ -220,7 +220,9 @@ meta_shadow_paint (MetaShadow *shadow,
|
||||
int dest_x[4];
|
||||
int dest_y[4];
|
||||
int n_x, n_y;
|
||||
gboolean source_updated = FALSE;
|
||||
|
||||
cogl_pipeline_set_color4ub (shadow->pipeline,
|
||||
opacity, opacity, opacity, opacity);
|
||||
|
||||
cogl_set_source (shadow->pipeline);
|
||||
|
||||
@@ -298,17 +300,6 @@ meta_shadow_paint (MetaShadow *shadow,
|
||||
else
|
||||
overlap = CAIRO_REGION_OVERLAP_IN;
|
||||
|
||||
if (overlap == CAIRO_REGION_OVERLAP_OUT)
|
||||
continue;
|
||||
|
||||
if (!source_updated)
|
||||
{
|
||||
cogl_pipeline_set_color4ub (shadow->pipeline,
|
||||
opacity, opacity, opacity, opacity);
|
||||
cogl_set_source (shadow->pipeline);
|
||||
source_updated = TRUE;
|
||||
}
|
||||
|
||||
/* There's quite a bit of overhead from allocating a new
|
||||
* region in order to find an exact intersection and
|
||||
* generating more geometry - we make the assumption that
|
||||
|
@@ -694,11 +694,46 @@ effective_unobscured_region (MetaShapedTexture *self)
|
||||
return priv->unobscured_region;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
get_unobscured_bounds (MetaShapedTexture *self,
|
||||
cairo_rectangle_int_t *unobscured_bounds)
|
||||
{
|
||||
cairo_region_t *unobscured_region = effective_unobscured_region (self);
|
||||
|
||||
if (unobscured_region)
|
||||
{
|
||||
cairo_region_get_extents (unobscured_region, unobscured_bounds);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_shaped_texture_get_paint_volume (ClutterActor *actor,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
return clutter_paint_volume_set_from_allocation (volume, actor);
|
||||
MetaShapedTexture *self = META_SHAPED_TEXTURE (actor);
|
||||
ClutterActorBox box;
|
||||
cairo_rectangle_int_t unobscured_bounds;
|
||||
|
||||
if (!clutter_actor_has_allocation (actor))
|
||||
return FALSE;
|
||||
|
||||
clutter_actor_get_allocation_box (actor, &box);
|
||||
|
||||
if (get_unobscured_bounds (self, &unobscured_bounds))
|
||||
{
|
||||
box.x1 = MAX (unobscured_bounds.x, box.x1);
|
||||
box.x2 = MIN (unobscured_bounds.x + unobscured_bounds.width, box.x2);
|
||||
box.y1 = MAX (unobscured_bounds.y, box.y1);
|
||||
box.y2 = MIN (unobscured_bounds.y + unobscured_bounds.height, box.y2);
|
||||
}
|
||||
box.x2 = MAX (box.x2, box.x1);
|
||||
box.y2 = MAX (box.y2, box.y1);
|
||||
|
||||
clutter_paint_volume_union_box (volume, &box);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -101,13 +101,6 @@ meta_surface_actor_pick (ClutterActor *actor,
|
||||
clutter_actor_paint (child);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_surface_actor_get_paint_volume (ClutterActor *actor,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
return clutter_paint_volume_set_from_allocation (volume, actor);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_surface_actor_dispose (GObject *object)
|
||||
{
|
||||
@@ -127,7 +120,6 @@ meta_surface_actor_class_init (MetaSurfaceActorClass *klass)
|
||||
|
||||
object_class->dispose = meta_surface_actor_dispose;
|
||||
actor_class->pick = meta_surface_actor_pick;
|
||||
actor_class->get_paint_volume = meta_surface_actor_get_paint_volume;
|
||||
|
||||
signals[REPAINT_SCHEDULED] = g_signal_new ("repaint-scheduled",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
|
@@ -450,7 +450,7 @@ meta_window_actor_update_surface (MetaWindowActor *self)
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (window->surface)
|
||||
surface_actor = window->surface->surface_actor;
|
||||
surface_actor = meta_wayland_surface_get_actor (window->surface);
|
||||
else
|
||||
#endif
|
||||
if (!meta_is_wayland_compositor ())
|
||||
|
@@ -886,8 +886,7 @@ constrain_modal_dialog (MetaWindow *window,
|
||||
MetaRectangle child_rect, parent_rect;
|
||||
gboolean constraint_already_satisfied;
|
||||
|
||||
if (!parent ||
|
||||
!meta_window_is_attached_dialog (window) ||
|
||||
if (!meta_window_is_attached_dialog (window) ||
|
||||
meta_window_get_placement_rule (window))
|
||||
return TRUE;
|
||||
|
||||
|
@@ -55,7 +55,6 @@
|
||||
#include "backends/x11/meta-backend-x11.h"
|
||||
#include "backends/meta-stage-private.h"
|
||||
#include "backends/meta-input-settings-private.h"
|
||||
#include "backends/meta-backend-private.h"
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
|
||||
#ifdef HAVE_RANDR
|
||||
@@ -534,23 +533,27 @@ gesture_tracker_state_changed (MetaGestureTracker *tracker,
|
||||
MetaSequenceState state,
|
||||
MetaDisplay *display)
|
||||
{
|
||||
switch (state)
|
||||
if (meta_is_wayland_compositor ())
|
||||
{
|
||||
case META_SEQUENCE_NONE:
|
||||
case META_SEQUENCE_PENDING_END:
|
||||
return;
|
||||
case META_SEQUENCE_ACCEPTED:
|
||||
meta_display_cancel_touch (display);
|
||||
if (state == META_SEQUENCE_ACCEPTED)
|
||||
meta_display_cancel_touch (display);
|
||||
}
|
||||
else
|
||||
{
|
||||
MetaBackendX11 *backend = META_BACKEND_X11 (meta_get_backend ());
|
||||
int event_mode;
|
||||
|
||||
/* Intentional fall-through */
|
||||
case META_SEQUENCE_REJECTED:
|
||||
{
|
||||
MetaBackend *backend;
|
||||
if (state == META_SEQUENCE_ACCEPTED)
|
||||
event_mode = XIAcceptTouch;
|
||||
else if (state == META_SEQUENCE_REJECTED)
|
||||
event_mode = XIRejectTouch;
|
||||
else
|
||||
return;
|
||||
|
||||
backend = meta_get_backend ();
|
||||
meta_backend_finish_touch_sequence (backend, sequence, state);
|
||||
break;
|
||||
}
|
||||
XIAllowTouchEvents (meta_backend_x11_get_xdisplay (backend),
|
||||
META_VIRTUAL_CORE_POINTER_ID,
|
||||
clutter_x11_event_sequence_get_touch_detail (sequence),
|
||||
DefaultRootWindow (display->xdisplay), event_mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -105,12 +105,6 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
/* FIXME handle this error */
|
||||
meta_error_trap_pop (window->display);
|
||||
|
||||
/* Ensure focus is restored after the unmap/map events triggered
|
||||
* by XReparentWindow().
|
||||
*/
|
||||
if (meta_window_has_focus (window))
|
||||
window->restore_focus_on_map = TRUE;
|
||||
|
||||
/* stick frame to the window */
|
||||
window->frame = frame;
|
||||
|
||||
@@ -200,12 +194,6 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
|
||||
meta_ui_frame_unmanage (frame->ui_frame);
|
||||
|
||||
/* Ensure focus is restored after the unmap/map events triggered
|
||||
* by XReparentWindow().
|
||||
*/
|
||||
if (meta_window_has_focus (window))
|
||||
window->restore_focus_on_map = TRUE;
|
||||
|
||||
meta_display_unregister_x_window (window->display,
|
||||
frame->xwindow);
|
||||
|
||||
|
@@ -417,7 +417,7 @@ check_for_wayland_session_type (void)
|
||||
*
|
||||
* If no flag is passed that forces the compositor type, the compositor type
|
||||
* is determined first from the logind session type, or if that fails, from the
|
||||
* XDG_SESSION_TYPE enviornment variable.
|
||||
* XDG_SESSION_TYPE environment variable.
|
||||
*
|
||||
* If no flag is passed that forces the backend type, the backend type is
|
||||
* determined given the compositor type. If the compositor is a Wayland
|
||||
|
@@ -38,7 +38,12 @@
|
||||
typedef struct _MetaGestureTracker MetaGestureTracker;
|
||||
typedef struct _MetaGestureTrackerClass MetaGestureTrackerClass;
|
||||
|
||||
typedef enum _MetaSequenceState MetaSequenceState;
|
||||
typedef enum {
|
||||
META_SEQUENCE_NONE,
|
||||
META_SEQUENCE_ACCEPTED,
|
||||
META_SEQUENCE_REJECTED,
|
||||
META_SEQUENCE_PENDING_END
|
||||
} MetaSequenceState;
|
||||
|
||||
struct _MetaGestureTracker
|
||||
{
|
||||
|
@@ -31,7 +31,6 @@
|
||||
#include "config.h"
|
||||
#include "meta-gesture-tracker-private.h"
|
||||
#include "meta-surface-actor.h"
|
||||
#include "meta-backend-private.h"
|
||||
|
||||
#define DISTANCE_THRESHOLD 30
|
||||
|
||||
|
@@ -41,7 +41,6 @@
|
||||
#include "stack.h"
|
||||
#include <meta/compositor.h>
|
||||
#include <meta/meta-enum-types.h>
|
||||
#include "compositor-private.h"
|
||||
#include "core.h"
|
||||
#include "meta-cursor-tracker-private.h"
|
||||
#include "boxes-private.h"
|
||||
@@ -836,7 +835,6 @@ meta_screen_free (MetaScreen *screen,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
GList *l;
|
||||
|
||||
display = screen->display;
|
||||
|
||||
@@ -846,8 +844,6 @@ meta_screen_free (MetaScreen *screen,
|
||||
|
||||
meta_display_unmanage_windows_for_screen (display, screen, timestamp);
|
||||
|
||||
meta_compositor_unmanage_window_actors (display->compositor);
|
||||
|
||||
meta_prefs_remove_listener (prefs_changed_callback, screen);
|
||||
|
||||
meta_screen_ungrab_keys (screen);
|
||||
@@ -878,16 +874,6 @@ meta_screen_free (MetaScreen *screen,
|
||||
|
||||
g_free (screen->screen_name);
|
||||
|
||||
screen->active_workspace = NULL;
|
||||
|
||||
for (l = screen->workspaces; l;)
|
||||
{
|
||||
MetaWorkspace *workspace = l->data;
|
||||
l = l->next;
|
||||
|
||||
meta_workspace_remove (workspace);
|
||||
}
|
||||
|
||||
g_object_unref (screen);
|
||||
}
|
||||
|
||||
@@ -1408,9 +1394,7 @@ meta_screen_update_cursor (MetaScreen *screen)
|
||||
|
||||
XDefineCursor (display->xdisplay, screen->xroot, xcursor);
|
||||
XFlush (display->xdisplay);
|
||||
|
||||
if (xcursor)
|
||||
XFreeCursor (display->xdisplay, xcursor);
|
||||
XFreeCursor (display->xdisplay, xcursor);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -1176,27 +1176,6 @@ window_contains_point (MetaWindow *window,
|
||||
return POINT_IN_RECT (root_x, root_y, rect);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
window_can_get_default_focus (MetaWindow *window)
|
||||
{
|
||||
if (window->unmaps_pending > 0)
|
||||
return FALSE;
|
||||
|
||||
if (window->unmanaging)
|
||||
return FALSE;
|
||||
|
||||
if (!(window->input || window->take_focus))
|
||||
return FALSE;
|
||||
|
||||
if (!meta_window_should_be_showing (window))
|
||||
return FALSE;
|
||||
|
||||
if (window->type == META_WINDOW_DOCK)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static MetaWindow*
|
||||
get_default_focus_window (MetaStack *stack,
|
||||
MetaWorkspace *workspace,
|
||||
@@ -1224,12 +1203,24 @@ get_default_focus_window (MetaStack *stack,
|
||||
if (window == not_this_one)
|
||||
continue;
|
||||
|
||||
if (!window_can_get_default_focus (window))
|
||||
if (window->unmaps_pending > 0)
|
||||
continue;
|
||||
|
||||
if (window->unmanaging)
|
||||
continue;
|
||||
|
||||
if (!(window->input || window->take_focus))
|
||||
continue;
|
||||
|
||||
if (!meta_window_should_be_showing (window))
|
||||
continue;
|
||||
|
||||
if (must_be_at_point && !window_contains_point (window, root_x, root_y))
|
||||
continue;
|
||||
|
||||
if (window->type == META_WINDOW_DOCK)
|
||||
continue;
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -1284,26 +1275,6 @@ meta_stack_list_windows (MetaStack *stack,
|
||||
return workspace_windows;
|
||||
}
|
||||
|
||||
GList *
|
||||
meta_stack_get_default_focus_candidates (MetaStack *stack,
|
||||
MetaWorkspace *workspace)
|
||||
{
|
||||
GList *windows = meta_stack_list_windows (stack, workspace);
|
||||
GList *l;
|
||||
|
||||
for (l = windows; l;)
|
||||
{
|
||||
GList *next = l->next;
|
||||
|
||||
if (!window_can_get_default_focus (l->data))
|
||||
windows = g_list_delete_link (windows, l);
|
||||
|
||||
l = next;
|
||||
}
|
||||
|
||||
return windows;
|
||||
}
|
||||
|
||||
int
|
||||
meta_stack_windows_cmp (MetaStack *stack,
|
||||
MetaWindow *window_a,
|
||||
|
@@ -337,21 +337,6 @@ MetaWindow* meta_stack_get_default_focus_window_at_point (MetaStack *stack,
|
||||
int root_x,
|
||||
int root_y);
|
||||
|
||||
/**
|
||||
* meta_stack_get_default_focus_candidates:
|
||||
* @stack: The stack to examine.
|
||||
* @workspace: If not %NULL, only windows on this workspace will be
|
||||
* returned; otherwise all windows in the stack will be
|
||||
* returned.
|
||||
*
|
||||
* Returns all the focus candidate windows in the stack, in order.
|
||||
*
|
||||
* Returns: (transfer container) (element-type Meta.Window):
|
||||
* A #GList of #MetaWindow, in stacking order, honouring layers.
|
||||
*/
|
||||
GList * meta_stack_get_default_focus_candidates (MetaStack *stack,
|
||||
MetaWorkspace *workspace);
|
||||
|
||||
/**
|
||||
* meta_stack_list_windows:
|
||||
* @stack: The stack to examine.
|
||||
|
@@ -82,7 +82,6 @@ typedef enum
|
||||
META_MOVE_RESIZE_UNMAXIMIZE = 1 << 6,
|
||||
META_MOVE_RESIZE_FORCE_MOVE = 1 << 7,
|
||||
META_MOVE_RESIZE_WAYLAND_STATE_CHANGED = 1 << 8,
|
||||
META_MOVE_RESIZE_FORCE_UPDATE_MONITOR = 1 << 9,
|
||||
} MetaMoveResizeFlags;
|
||||
|
||||
typedef enum
|
||||
@@ -122,13 +121,6 @@ typedef enum
|
||||
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 1 << 5,
|
||||
} MetaPlacementConstraintAdjustment;
|
||||
|
||||
typedef enum _MetaWindowUpdateMonitorFlags
|
||||
{
|
||||
META_WINDOW_UPDATE_MONITOR_FLAGS_NONE = 0,
|
||||
META_WINDOW_UPDATE_MONITOR_FLAGS_USER_OP = 1 << 0,
|
||||
META_WINDOW_UPDATE_MONITOR_FLAGS_FORCE = 1 << 1,
|
||||
} MetaWindowUpdateMonitorFlags;
|
||||
|
||||
typedef struct _MetaPlacementRule
|
||||
{
|
||||
MetaRectangle anchor_rect;
|
||||
@@ -417,9 +409,6 @@ struct _MetaWindow
|
||||
/* whether or not the window is from a program running on another machine */
|
||||
guint is_remote : 1;
|
||||
|
||||
/* whether focus should be restored on map */
|
||||
guint restore_focus_on_map : 1;
|
||||
|
||||
/* if non-NULL, the bounds of the window frame */
|
||||
cairo_region_t *frame_bounds;
|
||||
|
||||
@@ -560,8 +549,8 @@ struct _MetaWindowClass
|
||||
cairo_surface_t **icon,
|
||||
cairo_surface_t **mini_icon);
|
||||
uint32_t (*get_client_pid) (MetaWindow *window);
|
||||
void (*update_main_monitor) (MetaWindow *window,
|
||||
MetaWindowUpdateMonitorFlags flags);
|
||||
void (*update_main_monitor) (MetaWindow *window,
|
||||
gboolean user_op);
|
||||
void (*main_monitor_changed) (MetaWindow *window,
|
||||
const MetaLogicalMonitor *old);
|
||||
void (*force_restore_shortcuts) (MetaWindow *window,
|
||||
@@ -779,8 +768,8 @@ void meta_window_activate_full (MetaWindow *window,
|
||||
MetaLogicalMonitor * meta_window_calculate_main_logical_monitor (MetaWindow *window);
|
||||
|
||||
MetaLogicalMonitor * meta_window_get_main_logical_monitor (MetaWindow *window);
|
||||
void meta_window_update_monitor (MetaWindow *window,
|
||||
MetaWindowUpdateMonitorFlags flags);
|
||||
void meta_window_update_monitor (MetaWindow *window,
|
||||
gboolean user_op);
|
||||
|
||||
void meta_window_set_urgent (MetaWindow *window,
|
||||
gboolean urgent);
|
||||
|
@@ -119,7 +119,6 @@ static gboolean queue_calc_showing_func (MetaWindow *window,
|
||||
void *data);
|
||||
|
||||
static void meta_window_move_between_rects (MetaWindow *window,
|
||||
MetaMoveResizeFlags move_resize_flags,
|
||||
const MetaRectangle *old_area,
|
||||
const MetaRectangle *new_area);
|
||||
|
||||
@@ -1032,6 +1031,7 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
window->tab_unminimized = FALSE;
|
||||
window->iconic = FALSE;
|
||||
window->mapped = attrs->map_state != IsUnmapped;
|
||||
window->hidden = FALSE;
|
||||
window->known_to_compositor = FALSE;
|
||||
window->visible_to_compositor = FALSE;
|
||||
window->pending_compositor_effect = effect;
|
||||
@@ -1070,17 +1070,10 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
window->mwm_has_move_func = TRUE;
|
||||
window->mwm_has_resize_func = TRUE;
|
||||
|
||||
switch (client_type)
|
||||
{
|
||||
case META_WINDOW_CLIENT_TYPE_X11:
|
||||
window->decorated = TRUE;
|
||||
window->hidden = FALSE;
|
||||
break;
|
||||
case META_WINDOW_CLIENT_TYPE_WAYLAND:
|
||||
window->decorated = FALSE;
|
||||
window->hidden = TRUE;
|
||||
break;
|
||||
}
|
||||
if (client_type == META_WINDOW_CLIENT_TYPE_X11)
|
||||
window->decorated = TRUE;
|
||||
else
|
||||
window->decorated = FALSE;
|
||||
|
||||
window->has_close_func = TRUE;
|
||||
window->has_minimize_func = TRUE;
|
||||
@@ -1272,10 +1265,11 @@ _meta_window_shared_new (MetaDisplay *display,
|
||||
window->desc, window->transient_for->desc);
|
||||
|
||||
set_workspace_state (window,
|
||||
window->transient_for->on_all_workspaces,
|
||||
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",
|
||||
@@ -1475,9 +1469,7 @@ meta_window_unmanage (MetaWindow *window,
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing default window since we're unmanaging %s\n",
|
||||
window->desc);
|
||||
meta_workspace_focus_default_window (window->screen->active_workspace,
|
||||
window,
|
||||
timestamp);
|
||||
meta_workspace_focus_default_window (window->screen->active_workspace, NULL, timestamp);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3621,13 +3613,6 @@ meta_window_activate_full (MetaWindow *window,
|
||||
MetaWorkspace *workspace)
|
||||
{
|
||||
gboolean allow_workspace_switch;
|
||||
|
||||
if (window->unmanaging)
|
||||
{
|
||||
g_warning ("Trying to activate unmanaged window '%s'", window->desc);
|
||||
return;
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"_NET_ACTIVE_WINDOW message sent for %s at time %u "
|
||||
"by client type %u.\n",
|
||||
@@ -3765,15 +3750,11 @@ maybe_move_attached_dialog (MetaWindow *window,
|
||||
*
|
||||
* Gets index of the monitor that this window is on.
|
||||
*
|
||||
* Return Value: The index of the monitor in the screens monitor list, or -1
|
||||
* if the window has been recently unmanaged and does not have a monitor.
|
||||
* Return Value: The index of the monitor in the screens monitor list
|
||||
*/
|
||||
int
|
||||
meta_window_get_monitor (MetaWindow *window)
|
||||
{
|
||||
if (!window->monitor)
|
||||
return -1;
|
||||
|
||||
return window->monitor->number;
|
||||
}
|
||||
|
||||
@@ -3821,8 +3802,7 @@ meta_window_update_for_monitors_changed (MetaWindow *window)
|
||||
|
||||
if (window->override_redirect || window->type == META_WINDOW_DESKTOP)
|
||||
{
|
||||
meta_window_update_monitor (window,
|
||||
META_WINDOW_UPDATE_MONITOR_FLAGS_FORCE);
|
||||
meta_window_update_monitor (window, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3852,25 +3832,23 @@ meta_window_update_for_monitors_changed (MetaWindow *window)
|
||||
* monitors changed and the same index could be refereing
|
||||
* to a different monitor. */
|
||||
meta_window_move_between_rects (window,
|
||||
META_MOVE_RESIZE_FORCE_UPDATE_MONITOR,
|
||||
&old->rect,
|
||||
&new->rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_window_update_monitor (window,
|
||||
META_WINDOW_UPDATE_MONITOR_FLAGS_FORCE);
|
||||
meta_window_update_monitor (window, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_update_monitor (MetaWindow *window,
|
||||
MetaWindowUpdateMonitorFlags flags)
|
||||
meta_window_update_monitor (MetaWindow *window,
|
||||
gboolean user_op)
|
||||
{
|
||||
const MetaLogicalMonitor *old;
|
||||
|
||||
old = window->monitor;
|
||||
META_WINDOW_GET_CLASS (window)->update_main_monitor (window, flags);
|
||||
META_WINDOW_GET_CLASS (window)->update_main_monitor (window, user_op);
|
||||
if (old != window->monitor)
|
||||
{
|
||||
meta_window_on_all_workspaces_changed (window);
|
||||
@@ -3884,8 +3862,7 @@ meta_window_update_monitor (MetaWindow *window,
|
||||
* That should be handled by explicitly moving the window before changing the
|
||||
* workspace.
|
||||
*/
|
||||
if (meta_prefs_get_workspaces_only_on_primary () &&
|
||||
flags & META_WINDOW_UPDATE_MONITOR_FLAGS_USER_OP &&
|
||||
if (meta_prefs_get_workspaces_only_on_primary () && user_op &&
|
||||
meta_window_is_on_primary_monitor (window) &&
|
||||
window->screen->active_workspace != window->workspace)
|
||||
meta_window_change_workspace (window, window->screen->active_workspace);
|
||||
@@ -3928,7 +3905,6 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
MetaRectangle constrained_rect;
|
||||
MetaMoveResizeResultFlags result = 0;
|
||||
gboolean moved_or_resized = FALSE;
|
||||
MetaWindowUpdateMonitorFlags update_monitor_flags;
|
||||
|
||||
g_return_if_fail (!window->override_redirect);
|
||||
|
||||
@@ -4029,19 +4005,13 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
did_placement);
|
||||
}
|
||||
|
||||
update_monitor_flags = META_WINDOW_UPDATE_MONITOR_FLAGS_NONE;
|
||||
if (flags & META_MOVE_RESIZE_USER_ACTION)
|
||||
update_monitor_flags |= META_WINDOW_UPDATE_MONITOR_FLAGS_USER_OP;
|
||||
if (flags & META_MOVE_RESIZE_FORCE_UPDATE_MONITOR)
|
||||
update_monitor_flags |= META_WINDOW_UPDATE_MONITOR_FLAGS_FORCE;
|
||||
|
||||
if (window->monitor)
|
||||
{
|
||||
guint old_output_winsys_id;
|
||||
|
||||
old_output_winsys_id = window->monitor->winsys_id;
|
||||
|
||||
meta_window_update_monitor (window, update_monitor_flags);
|
||||
meta_window_update_monitor (window, flags & META_MOVE_RESIZE_USER_ACTION);
|
||||
|
||||
if (old_output_winsys_id != window->monitor->winsys_id &&
|
||||
flags & META_MOVE_RESIZE_MOVE_ACTION && flags & META_MOVE_RESIZE_USER_ACTION)
|
||||
@@ -4049,7 +4019,7 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_window_update_monitor (window, update_monitor_flags);
|
||||
meta_window_update_monitor (window, flags & META_MOVE_RESIZE_USER_ACTION);
|
||||
}
|
||||
|
||||
if ((result & META_MOVE_RESIZE_RESULT_FRAME_SHAPE_CHANGED) && window->frame_bounds)
|
||||
@@ -4093,7 +4063,6 @@ meta_window_move_frame (MetaWindow *window,
|
||||
|
||||
static void
|
||||
meta_window_move_between_rects (MetaWindow *window,
|
||||
MetaMoveResizeFlags move_resize_flags,
|
||||
const MetaRectangle *old_area,
|
||||
const MetaRectangle *new_area)
|
||||
{
|
||||
@@ -4117,12 +4086,7 @@ meta_window_move_between_rects (MetaWindow *window,
|
||||
window->saved_rect.x = window->unconstrained_rect.x;
|
||||
window->saved_rect.y = window->unconstrained_rect.y;
|
||||
|
||||
meta_window_move_resize_internal (window,
|
||||
move_resize_flags |
|
||||
META_MOVE_RESIZE_MOVE_ACTION |
|
||||
META_MOVE_RESIZE_RESIZE_ACTION,
|
||||
NorthWestGravity,
|
||||
window->unconstrained_rect);
|
||||
meta_window_move_resize_now (window);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4183,14 +4147,14 @@ meta_window_move_to_monitor (MetaWindow *window,
|
||||
window->unconstrained_rect.height == 0 ||
|
||||
!meta_rectangle_overlap (&window->unconstrained_rect, &old_area))
|
||||
{
|
||||
meta_window_move_between_rects (window, 0, NULL, &new_area);
|
||||
meta_window_move_between_rects (window, NULL, &new_area);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (monitor == window->monitor->number)
|
||||
return;
|
||||
|
||||
meta_window_move_between_rects (window, 0, &old_area, &new_area);
|
||||
meta_window_move_between_rects (window, &old_area, &new_area);
|
||||
}
|
||||
|
||||
window->preferred_output_winsys_id = window->monitor->winsys_id;
|
||||
@@ -4651,15 +4615,11 @@ meta_window_focus (MetaWindow *window,
|
||||
|
||||
g_return_if_fail (!window->override_redirect);
|
||||
|
||||
/* This is a oneshot flag */
|
||||
window->restore_focus_on_map = FALSE;
|
||||
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Setting input focus to window %s, input: %d take_focus: %d\n",
|
||||
window->desc, window->input, window->take_focus);
|
||||
|
||||
if (window->display->grab_window &&
|
||||
window->display->grab_window != window &&
|
||||
window->display->grab_window->all_keys_grabbed &&
|
||||
!window->display->grab_window->unmanaging)
|
||||
{
|
||||
@@ -4774,7 +4734,7 @@ set_workspace_state (MetaWindow *window,
|
||||
/* queue a move_resize since changing workspaces may change
|
||||
* the relevant struts
|
||||
*/
|
||||
if (!window->override_redirect)
|
||||
if (!window->override_redirect && window != window->display->grab_window)
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
meta_window_queue (window, META_QUEUE_CALC_SHOWING);
|
||||
meta_window_current_workspace_changed (window);
|
||||
@@ -7967,15 +7927,7 @@ meta_window_set_transient_for (MetaWindow *window,
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (window->attached && parent == NULL)
|
||||
{
|
||||
guint32 timestamp;
|
||||
|
||||
timestamp =
|
||||
meta_display_get_current_time_roundtrip (window->display);
|
||||
meta_window_unmanage (window, timestamp);
|
||||
return;
|
||||
}
|
||||
/* We know this won't create a reference cycle because we check for loops */
|
||||
g_clear_object (&window->transient_for);
|
||||
window->transient_for = parent ? g_object_ref (parent) : NULL;
|
||||
|
@@ -85,12 +85,6 @@ typedef struct _MetaWorkspaceLogicalMonitorData
|
||||
MetaRectangle logical_monitor_work_area;
|
||||
} MetaWorkspaceLogicalMonitorData;
|
||||
|
||||
typedef struct _MetaWorkspaceFocusableAncestorData
|
||||
{
|
||||
MetaWorkspace *workspace;
|
||||
MetaWindow *out_window;
|
||||
} MetaWorkspaceFocusableAncestorData;
|
||||
|
||||
static MetaWorkspaceLogicalMonitorData *
|
||||
meta_workspace_get_logical_monitor_data (MetaWorkspace *workspace,
|
||||
MetaLogicalMonitor *logical_monitor)
|
||||
@@ -1325,20 +1319,13 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
find_focusable_ancestor (MetaWindow *window,
|
||||
gpointer user_data)
|
||||
record_ancestor (MetaWindow *window,
|
||||
void *data)
|
||||
{
|
||||
MetaWorkspaceFocusableAncestorData *data = user_data;
|
||||
MetaWindow **result = data;
|
||||
|
||||
if (!window->unmanaging && (window->input || window->take_focus) &&
|
||||
meta_window_located_on_workspace (window, data->workspace) &&
|
||||
meta_window_showing_on_its_workspace (window))
|
||||
{
|
||||
data->out_window = window;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
*result = window;
|
||||
return FALSE; /* quit with the first ancestor we find */
|
||||
}
|
||||
|
||||
/* Focus ancestor of not_this_one if there is one */
|
||||
@@ -1360,15 +1347,11 @@ focus_ancestor_or_top_window (MetaWorkspace *workspace,
|
||||
if (not_this_one)
|
||||
{
|
||||
MetaWindow *ancestor;
|
||||
MetaWorkspaceFocusableAncestorData data;
|
||||
|
||||
data = (MetaWorkspaceFocusableAncestorData) {
|
||||
.workspace = workspace,
|
||||
};
|
||||
meta_window_foreach_ancestor (not_this_one, find_focusable_ancestor, &data);
|
||||
ancestor = data.out_window;
|
||||
|
||||
if (ancestor)
|
||||
ancestor = NULL;
|
||||
meta_window_foreach_ancestor (not_this_one, record_ancestor, &ancestor);
|
||||
if (ancestor != NULL &&
|
||||
meta_window_located_on_workspace (ancestor, workspace) &&
|
||||
meta_window_showing_on_its_workspace (ancestor))
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing %s, ancestor of %s\n",
|
||||
|
@@ -209,7 +209,7 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
||||
output = ((MetaOutput**)crtc_info->outputs->pdata)[j];
|
||||
|
||||
output->is_dirty = TRUE;
|
||||
meta_output_assign_crtc (output, crtc);
|
||||
output->crtc = crtc;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -255,7 +255,7 @@ apply_crtc_assignments (MetaMonitorManager *manager,
|
||||
continue;
|
||||
}
|
||||
|
||||
meta_output_unassign_crtc (output);
|
||||
output->crtc = NULL;
|
||||
output->is_primary = FALSE;
|
||||
}
|
||||
}
|
||||
|
@@ -449,24 +449,22 @@ check_current_monitor_mode (MetaMonitor *monitor,
|
||||
CheckMonitorModeData *data = user_data;
|
||||
MetaMonitorManager *monitor_manager = data->monitor_manager;
|
||||
MetaOutput *output;
|
||||
MetaCrtc *crtc;
|
||||
|
||||
output = output_from_winsys_id (monitor_manager,
|
||||
data->expect_crtc_mode_iter->output);
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
|
||||
if (data->expect_crtc_mode_iter->crtc_mode == -1)
|
||||
{
|
||||
g_assert_null (crtc);
|
||||
g_assert_null (output->crtc);
|
||||
}
|
||||
else
|
||||
{
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
|
||||
g_assert_nonnull (crtc);
|
||||
g_assert (monitor_crtc_mode->crtc_mode == crtc->current_mode);
|
||||
g_assert_nonnull (output->crtc);
|
||||
g_assert (monitor_crtc_mode->crtc_mode == output->crtc->current_mode);
|
||||
|
||||
logical_monitor = crtc->logical_monitor;
|
||||
logical_monitor = output->crtc->logical_monitor;
|
||||
g_assert_nonnull (logical_monitor);
|
||||
}
|
||||
|
||||
@@ -555,7 +553,6 @@ check_logical_monitor (MonitorTestCase *test_case,
|
||||
for (l_output = outputs; l_output; l_output = l_output->next)
|
||||
{
|
||||
MetaOutput *output = l_output->data;
|
||||
MetaCrtc *crtc;
|
||||
|
||||
if (output->is_primary)
|
||||
{
|
||||
@@ -563,8 +560,8 @@ check_logical_monitor (MonitorTestCase *test_case,
|
||||
primary_output = output;
|
||||
}
|
||||
|
||||
crtc = meta_output_get_assigned_crtc (output);
|
||||
g_assert (!crtc || crtc->logical_monitor == logical_monitor);
|
||||
g_assert (!output->crtc ||
|
||||
output->crtc->logical_monitor == logical_monitor);
|
||||
g_assert_cmpint (logical_monitor->is_presentation,
|
||||
==,
|
||||
output->is_presentation);
|
||||
@@ -986,8 +983,7 @@ create_monitor_test_setup (MonitorTestCase *test_case,
|
||||
|
||||
output = g_object_new (META_TYPE_OUTPUT, NULL);
|
||||
|
||||
if (crtc)
|
||||
meta_output_assign_crtc (output, crtc);
|
||||
output->crtc = crtc;
|
||||
output->winsys_id = i;
|
||||
output->name = (is_laptop_panel ? g_strdup_printf ("eDP-%d",
|
||||
++n_laptop_panels)
|
||||
|
@@ -1,23 +0,0 @@
|
||||
new_client 1 x11
|
||||
create 1/1
|
||||
show 1/1
|
||||
|
||||
create 1/2 csd
|
||||
set_parent 1/2 1
|
||||
can_take_focus 1/2 false
|
||||
accept_focus 1/2 false
|
||||
show 1/2
|
||||
|
||||
create 1/3 csd
|
||||
set_parent 1/3 2
|
||||
show 1/3
|
||||
|
||||
wait
|
||||
assert_focused 1/3
|
||||
assert_stacking 1/1 1/2 1/3
|
||||
|
||||
destroy 1/3
|
||||
|
||||
wait
|
||||
assert_focused 1/1
|
||||
assert_stacking 1/1 1/2
|
@@ -1,30 +0,0 @@
|
||||
new_client 2 x11
|
||||
create 2/1
|
||||
show 2/1
|
||||
wait
|
||||
|
||||
new_client 1 x11
|
||||
create 1/1
|
||||
accept_focus 1/1 false
|
||||
can_take_focus 1/1 false
|
||||
show 1/1
|
||||
|
||||
create 1/2 csd
|
||||
set_parent 1/2 1
|
||||
can_take_focus 1/2 false
|
||||
accept_focus 1/2 false
|
||||
show 1/2
|
||||
|
||||
create 1/3 csd
|
||||
set_parent 1/3 2
|
||||
show 1/3
|
||||
|
||||
wait
|
||||
assert_focused 1/3
|
||||
assert_stacking 2/1 1/1 1/2 1/3
|
||||
|
||||
destroy 1/3
|
||||
|
||||
wait
|
||||
assert_stacking 1/1 1/2 2/1
|
||||
assert_focused 2/1
|
@@ -1,36 +0,0 @@
|
||||
new_client 2 x11
|
||||
create 2/1
|
||||
show 2/1
|
||||
|
||||
new_client 1 x11
|
||||
create 1/1
|
||||
show 1/1
|
||||
|
||||
create 1/2 csd
|
||||
set_parent 1/2 1
|
||||
accept_focus 1/2 false
|
||||
show 1/2
|
||||
|
||||
create 1/3 csd
|
||||
set_parent 1/3 2
|
||||
show 1/3
|
||||
|
||||
wait
|
||||
assert_focused 1/3
|
||||
assert_stacking 2/1 1/1 1/2 1/3
|
||||
|
||||
destroy 1/3
|
||||
sleep 10
|
||||
|
||||
assert_focused none
|
||||
assert_stacking 2/1 1/1 1/2
|
||||
|
||||
activate 2/1
|
||||
wait
|
||||
|
||||
assert_focused 2/1
|
||||
assert_stacking 1/1 1/2 2/1
|
||||
|
||||
sleep 250
|
||||
assert_focused 2/1
|
||||
assert_stacking 1/1 1/2 2/1
|
@@ -1,30 +0,0 @@
|
||||
new_client 2 x11
|
||||
create 2/1
|
||||
show 2/1
|
||||
|
||||
new_client 1 x11
|
||||
create 1/1
|
||||
show 1/1
|
||||
|
||||
create 1/2 csd
|
||||
set_parent 1/2 1
|
||||
accept_focus 1/2 false
|
||||
show 1/2
|
||||
|
||||
create 1/3 csd
|
||||
set_parent 1/3 2
|
||||
show 1/3
|
||||
|
||||
wait
|
||||
assert_focused 1/3
|
||||
assert_stacking 2/1 1/1 1/2 1/3
|
||||
|
||||
destroy 1/3
|
||||
dispatch
|
||||
|
||||
assert_focused none
|
||||
assert_stacking 2/1 1/1 1/2
|
||||
|
||||
sleep 150
|
||||
assert_focused 1/1
|
||||
assert_stacking 2/1 1/1 1/2
|
@@ -1,43 +0,0 @@
|
||||
new_client 0 x11
|
||||
create 0/1
|
||||
show 0/1
|
||||
|
||||
new_client 1 x11
|
||||
create 1/1
|
||||
show 1/1
|
||||
|
||||
create 1/2 csd
|
||||
set_parent 1/2 1
|
||||
accept_focus 1/2 false
|
||||
show 1/2
|
||||
|
||||
create 1/3 csd
|
||||
set_parent 1/3 2
|
||||
accept_focus 1/3 false
|
||||
show 1/3
|
||||
|
||||
create 1/4 csd
|
||||
set_parent 1/4 3
|
||||
accept_focus 1/4 false
|
||||
show 1/4
|
||||
|
||||
create 1/5 csd
|
||||
set_parent 1/5 3
|
||||
show 1/5
|
||||
|
||||
wait
|
||||
assert_focused 1/5
|
||||
assert_stacking 0/1 1/1 1/2 1/3 1/4 1/5
|
||||
|
||||
destroy 1/5
|
||||
dispatch
|
||||
|
||||
assert_focused none
|
||||
assert_stacking 0/1 1/1 1/2 1/3 1/4
|
||||
|
||||
destroy 1/2
|
||||
dispatch
|
||||
|
||||
sleep 450
|
||||
assert_focused 1/1
|
||||
assert_stacking 0/1 1/1 1/3 1/4
|
@@ -1,46 +0,0 @@
|
||||
new_client 0 x11
|
||||
create 0/1
|
||||
show 0/1
|
||||
|
||||
new_client 1 x11
|
||||
create 1/1
|
||||
show 1/1
|
||||
|
||||
create 1/2 csd
|
||||
set_parent 1/2 1
|
||||
accept_focus 1/2 false
|
||||
show 1/2
|
||||
|
||||
create 1/3 csd
|
||||
set_parent 1/3 2
|
||||
accept_focus 1/3 false
|
||||
show 1/3
|
||||
|
||||
create 1/4 csd
|
||||
set_parent 1/4 3
|
||||
accept_focus 1/4 false
|
||||
show 1/4
|
||||
|
||||
create 1/5 csd
|
||||
set_parent 1/5 3
|
||||
show 1/5
|
||||
|
||||
wait
|
||||
assert_focused 1/5
|
||||
assert_stacking 0/1 1/1 1/2 1/3 1/4 1/5
|
||||
|
||||
destroy 1/5
|
||||
dispatch
|
||||
|
||||
assert_focused none
|
||||
assert_stacking 0/1 1/1 1/2 1/3 1/4
|
||||
|
||||
sleep 600
|
||||
assert_focused 1/1
|
||||
assert_stacking 0/1 1/1 1/2 1/3 1/4
|
||||
|
||||
destroy 1/3
|
||||
wait
|
||||
|
||||
assert_focused 1/1
|
||||
assert_stacking 0/1 1/1 1/2 1/4
|
@@ -1,19 +0,0 @@
|
||||
new_client 1 wayland
|
||||
create 1/1
|
||||
show 1/1
|
||||
|
||||
new_client 2 wayland
|
||||
create 2/1
|
||||
show 2/1
|
||||
|
||||
create 1/2
|
||||
show 1/2
|
||||
set_parent 1/2 1
|
||||
|
||||
wait
|
||||
assert_stacking 1/1 2/1 1/2
|
||||
|
||||
destroy 1/2
|
||||
|
||||
wait
|
||||
assert_stacking 2/1 1/1
|
@@ -161,74 +161,6 @@ process_line (const char *line)
|
||||
gtk_window_set_transient_for (GTK_WINDOW (window),
|
||||
GTK_WINDOW (parent_window));
|
||||
}
|
||||
else if (strcmp (argv[0], "accept_focus") == 0)
|
||||
{
|
||||
if (argc != 3)
|
||||
{
|
||||
g_print ("usage: %s <window-id> [true|false]", argv[0]);
|
||||
goto out;
|
||||
}
|
||||
|
||||
GtkWidget *window = lookup_window (argv[1]);
|
||||
if (!window)
|
||||
{
|
||||
g_print ("unknown window %s", argv[1]);
|
||||
goto out;
|
||||
}
|
||||
|
||||
gboolean enabled = g_ascii_strcasecmp (argv[2], "true") == 0;
|
||||
gtk_window_set_accept_focus (GTK_WINDOW (window), enabled);
|
||||
}
|
||||
else if (strcmp (argv[0], "can_take_focus") == 0)
|
||||
{
|
||||
if (argc != 3)
|
||||
{
|
||||
g_print ("usage: %s <window-id> [true|false]", argv[0]);
|
||||
goto out;
|
||||
}
|
||||
|
||||
GtkWidget *window = lookup_window (argv[1]);
|
||||
if (!window)
|
||||
{
|
||||
g_print ("unknown window %s", argv[1]);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (wayland)
|
||||
{
|
||||
g_print ("%s not supported under wayland", argv[0]);
|
||||
goto out;
|
||||
}
|
||||
|
||||
GdkDisplay *display = gdk_display_get_default ();
|
||||
GdkWindow *gdkwindow = gtk_widget_get_window (window);
|
||||
Display *xdisplay = gdk_x11_display_get_xdisplay (display);
|
||||
Window xwindow = GDK_WINDOW_XID (gdkwindow);
|
||||
Atom wm_take_focus = gdk_x11_get_xatom_by_name_for_display (display, "WM_TAKE_FOCUS");
|
||||
gboolean add = g_ascii_strcasecmp(argv[2], "true") == 0;
|
||||
Atom *protocols = NULL;
|
||||
Atom *new_protocols;
|
||||
int n_protocols = 0;
|
||||
int i, n = 0;
|
||||
|
||||
gdk_display_sync (display);
|
||||
XGetWMProtocols (xdisplay, xwindow, &protocols, &n_protocols);
|
||||
new_protocols = g_new0 (Atom, n_protocols + (add ? 1 : 0));
|
||||
|
||||
for (i = 0; i < n_protocols; ++i)
|
||||
{
|
||||
if (protocols[i] != wm_take_focus)
|
||||
new_protocols[n++] = protocols[i];
|
||||
}
|
||||
|
||||
if (add)
|
||||
new_protocols[n++] = wm_take_focus;
|
||||
|
||||
XSetWMProtocols (xdisplay, xwindow, new_protocols, n);
|
||||
|
||||
XFree (new_protocols);
|
||||
XFree (protocols);
|
||||
}
|
||||
else if (strcmp (argv[0], "show") == 0)
|
||||
{
|
||||
if (argc != 2)
|
||||
|
@@ -113,7 +113,7 @@ test_case_new (void)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
test_case_loop_quit (gpointer data)
|
||||
test_case_before_redraw (gpointer data)
|
||||
{
|
||||
TestCase *test = data;
|
||||
|
||||
@@ -122,24 +122,6 @@ test_case_loop_quit (gpointer data)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
test_case_dispatch (TestCase *test,
|
||||
GError **error)
|
||||
{
|
||||
/* Wait until we've done any outstanding queued up work.
|
||||
* Though we add this as BEFORE_REDRAW, the iteration that runs the
|
||||
* BEFORE_REDRAW idles will proceed on and do the redraw, so we're
|
||||
* waiting until after *all* frame processing.
|
||||
*/
|
||||
meta_later_add (META_LATER_BEFORE_REDRAW,
|
||||
test_case_loop_quit,
|
||||
test,
|
||||
NULL);
|
||||
g_main_loop_run (test->loop);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
test_case_wait (TestCase *test,
|
||||
GError **error)
|
||||
@@ -156,8 +138,16 @@ test_case_wait (TestCase *test,
|
||||
if (!test_client_wait (value, error))
|
||||
return FALSE;
|
||||
|
||||
/* Then wait until we've done any outstanding queued up work. */
|
||||
test_case_dispatch (test, error);
|
||||
/* Then wait until we've done any outstanding queued up work.
|
||||
* Though we add this as BEFORE_REDRAW, the iteration that runs the
|
||||
* BEFORE_REDRAW idles will proceed on and do the redraw, so we're
|
||||
* waiting until after *all* frame processing.
|
||||
*/
|
||||
meta_later_add (META_LATER_BEFORE_REDRAW,
|
||||
test_case_before_redraw,
|
||||
test,
|
||||
NULL);
|
||||
g_main_loop_run (test->loop);
|
||||
|
||||
/* Then set an XSync counter ourselves and and wait until
|
||||
* we receive the resulting event - this makes sure that we've
|
||||
@@ -167,17 +157,6 @@ test_case_wait (TestCase *test,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
test_case_sleep (TestCase *test,
|
||||
guint32 interval,
|
||||
GError **error)
|
||||
{
|
||||
g_timeout_add_full (G_PRIORITY_LOW, interval, test_case_loop_quit, test, NULL);
|
||||
g_main_loop_run (test->loop);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define BAD_COMMAND(...) \
|
||||
G_STMT_START { \
|
||||
g_set_error (error, \
|
||||
@@ -294,37 +273,6 @@ test_case_assert_stacking (TestCase *test,
|
||||
return *error == NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
test_case_assert_focused (TestCase *test,
|
||||
const char *expected_window,
|
||||
GError **error)
|
||||
{
|
||||
MetaDisplay *display = meta_get_display ();
|
||||
|
||||
if (!display->focus_window)
|
||||
{
|
||||
if (g_strcmp0 (expected_window, "none") != 0)
|
||||
{
|
||||
g_set_error (error, TEST_RUNNER_ERROR, TEST_RUNNER_ERROR_ASSERTION_FAILED,
|
||||
"focus: expected='%s', actual='none'", expected_window);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *focused = display->focus_window->title;
|
||||
|
||||
if (g_str_has_prefix (focused, "test/"))
|
||||
focused += 5;
|
||||
|
||||
if (g_strcmp0 (focused, expected_window) != 0)
|
||||
g_set_error (error, TEST_RUNNER_ERROR, TEST_RUNNER_ERROR_ASSERTION_FAILED,
|
||||
"focus: expected='%s', actual='%s'",
|
||||
expected_window, focused);
|
||||
}
|
||||
|
||||
return *error == NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
test_case_check_xserver_stacking (TestCase *test,
|
||||
GError **error)
|
||||
@@ -458,44 +406,6 @@ test_case_do (TestCase *test,
|
||||
NULL))
|
||||
return FALSE;
|
||||
}
|
||||
else if (strcmp (argv[0], "accept_focus") == 0)
|
||||
{
|
||||
if (argc != 3 ||
|
||||
(g_ascii_strcasecmp (argv[2], "true") != 0 &&
|
||||
g_ascii_strcasecmp (argv[2], "false") != 0))
|
||||
BAD_COMMAND("usage: %s <client-id>/<window-id> [true|false]",
|
||||
argv[0]);
|
||||
|
||||
TestClient *client;
|
||||
const char *window_id;
|
||||
if (!test_case_parse_window_id (test, argv[1], &client, &window_id, error))
|
||||
return FALSE;
|
||||
|
||||
if (!test_client_do (client, error,
|
||||
argv[0], window_id,
|
||||
argv[2],
|
||||
NULL))
|
||||
return FALSE;
|
||||
}
|
||||
else if (strcmp (argv[0], "can_take_focus") == 0)
|
||||
{
|
||||
if (argc != 3 ||
|
||||
(g_ascii_strcasecmp (argv[2], "true") != 0 &&
|
||||
g_ascii_strcasecmp (argv[2], "false") != 0))
|
||||
BAD_COMMAND("usage: %s <client-id>/<window-id> [true|false]",
|
||||
argv[0]);
|
||||
|
||||
TestClient *client;
|
||||
const char *window_id;
|
||||
if (!test_case_parse_window_id (test, argv[1], &client, &window_id, error))
|
||||
return FALSE;
|
||||
|
||||
if (!test_client_do (client, error,
|
||||
argv[0], window_id,
|
||||
argv[2],
|
||||
NULL))
|
||||
return FALSE;
|
||||
}
|
||||
else if (strcmp (argv[0], "show") == 0 ||
|
||||
strcmp (argv[0], "hide") == 0 ||
|
||||
strcmp (argv[0], "activate") == 0 ||
|
||||
@@ -540,28 +450,6 @@ test_case_do (TestCase *test,
|
||||
if (!test_case_wait (test, error))
|
||||
return FALSE;
|
||||
}
|
||||
else if (strcmp (argv[0], "dispatch") == 0)
|
||||
{
|
||||
if (argc != 1)
|
||||
BAD_COMMAND("usage: %s", argv[0]);
|
||||
|
||||
if (!test_case_dispatch (test, error))
|
||||
return FALSE;
|
||||
}
|
||||
else if (strcmp (argv[0], "sleep") == 0)
|
||||
{
|
||||
guint64 interval;
|
||||
|
||||
if (argc != 2)
|
||||
BAD_COMMAND("usage: %s <milliseconds>", argv[0]);
|
||||
|
||||
if (!g_ascii_string_to_unsigned (argv[1], 10, 0, G_MAXUINT32,
|
||||
&interval, error))
|
||||
return FALSE;
|
||||
|
||||
if (!test_case_sleep (test, (guint32) interval, error))
|
||||
return FALSE;
|
||||
}
|
||||
else if (strcmp (argv[0], "assert_stacking") == 0)
|
||||
{
|
||||
if (!test_case_assert_stacking (test, argv + 1, argc - 1, error))
|
||||
@@ -570,11 +458,6 @@ test_case_do (TestCase *test,
|
||||
if (!test_case_check_xserver_stacking (test, error))
|
||||
return FALSE;
|
||||
}
|
||||
else if (strcmp (argv[0], "assert_focused") == 0)
|
||||
{
|
||||
if (!test_case_assert_focused (test, argv[1], error))
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
BAD_COMMAND("Unknown command %s", argv[0]);
|
||||
|
@@ -664,17 +664,8 @@ meta_pointer_confinement_wayland_maybe_warp (MetaPointerConfinementWayland *self
|
||||
}
|
||||
|
||||
static void
|
||||
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaPointerConfinementWayland *self)
|
||||
{
|
||||
meta_pointer_confinement_wayland_maybe_warp (self);
|
||||
}
|
||||
|
||||
static void
|
||||
surface_actor_position_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaPointerConfinementWayland *self)
|
||||
surface_actor_geometry_changed (MetaSurfaceActorWayland *surface_actor,
|
||||
MetaPointerConfinementWayland *self)
|
||||
{
|
||||
meta_pointer_confinement_wayland_maybe_warp (self);
|
||||
}
|
||||
@@ -699,14 +690,9 @@ meta_pointer_confinement_wayland_new (MetaWaylandPointerConstraint *constraint)
|
||||
confinement->constraint = constraint;
|
||||
|
||||
surface = meta_wayland_pointer_constraint_get_surface (constraint);
|
||||
g_signal_connect_object (surface->surface_actor,
|
||||
"notify::allocation",
|
||||
G_CALLBACK (surface_actor_allocation_notify),
|
||||
confinement,
|
||||
0);
|
||||
g_signal_connect_object (surface->surface_actor,
|
||||
"notify::position",
|
||||
G_CALLBACK (surface_actor_position_notify),
|
||||
g_signal_connect_object (meta_wayland_surface_get_actor (surface),
|
||||
"geometry-changed",
|
||||
G_CALLBACK (surface_actor_geometry_changed),
|
||||
confinement,
|
||||
0);
|
||||
if (surface->window)
|
||||
|
@@ -30,34 +30,70 @@
|
||||
#include "wayland/meta-wayland-surface.h"
|
||||
#include "wayland/meta-window-wayland.h"
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (MetaWaylandActorSurface,
|
||||
meta_wayland_actor_surface,
|
||||
META_TYPE_WAYLAND_SURFACE_ROLE)
|
||||
typedef struct _MetaWaylandActorSurfacePrivate MetaWaylandActorSurfacePrivate;
|
||||
|
||||
struct _MetaWaylandActorSurfacePrivate
|
||||
{
|
||||
MetaSurfaceActor *actor;
|
||||
};
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (MetaWaylandActorSurface,
|
||||
meta_wayland_actor_surface,
|
||||
META_TYPE_WAYLAND_SURFACE_ROLE)
|
||||
|
||||
static void
|
||||
meta_wayland_actor_surface_constructed (GObject *object)
|
||||
{
|
||||
G_OBJECT_CLASS (meta_wayland_actor_surface_parent_class)->constructed (object);
|
||||
|
||||
meta_wayland_actor_surface_reset_actor (META_WAYLAND_ACTOR_SURFACE (object));
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_actor_surface_dispose (GObject *object)
|
||||
{
|
||||
MetaWaylandActorSurfacePrivate *priv =
|
||||
meta_wayland_actor_surface_get_instance_private (META_WAYLAND_ACTOR_SURFACE (object));
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (META_WAYLAND_SURFACE_ROLE (object));
|
||||
|
||||
if (priv->actor)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (priv->actor,
|
||||
meta_wayland_surface_notify_geometry_changed,
|
||||
surface);
|
||||
clutter_actor_set_reactive (CLUTTER_ACTOR (priv->actor), FALSE);
|
||||
g_clear_object (&priv->actor);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (meta_wayland_actor_surface_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_actor_surface_assigned (MetaWaylandSurfaceRole *surface_role)
|
||||
{
|
||||
MetaWaylandActorSurfacePrivate *priv =
|
||||
meta_wayland_actor_surface_get_instance_private (META_WAYLAND_ACTOR_SURFACE (surface_role));
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaSurfaceActorWayland *surface_actor =
|
||||
META_SURFACE_ACTOR_WAYLAND (surface->surface_actor);
|
||||
GList *l;
|
||||
|
||||
meta_surface_actor_wayland_add_frame_callbacks (surface_actor,
|
||||
meta_surface_actor_wayland_add_frame_callbacks (META_SURFACE_ACTOR_WAYLAND (priv->actor),
|
||||
&surface->pending_frame_callback_list);
|
||||
wl_list_init (&surface->pending_frame_callback_list);
|
||||
|
||||
for (l = surface->subsurfaces; l; l = l->next)
|
||||
{
|
||||
ClutterActor *subsurface_actor =
|
||||
CLUTTER_ACTOR (meta_wayland_surface_get_actor (l->data));
|
||||
clutter_actor_add_child (CLUTTER_ACTOR (priv->actor), subsurface_actor);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_actor_surface_queue_frame_callbacks (MetaWaylandActorSurface *actor_surface,
|
||||
MetaWaylandPendingState *pending)
|
||||
static void
|
||||
queue_surface_actor_frame_callbacks (MetaSurfaceActorWayland *surface_actor,
|
||||
MetaWaylandPendingState *pending)
|
||||
{
|
||||
MetaWaylandSurfaceRole *surface_role =
|
||||
META_WAYLAND_SURFACE_ROLE (actor_surface);
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaSurfaceActorWayland *surface_actor =
|
||||
META_SURFACE_ACTOR_WAYLAND (surface->surface_actor);
|
||||
|
||||
meta_surface_actor_wayland_add_frame_callbacks (surface_actor,
|
||||
&pending->frame_callback_list);
|
||||
wl_list_init (&pending->frame_callback_list);
|
||||
@@ -94,6 +130,8 @@ meta_wayland_actor_surface_calculate_scale (MetaWaylandActorSurface *actor_surfa
|
||||
static void
|
||||
meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor_surface)
|
||||
{
|
||||
MetaWaylandActorSurfacePrivate *priv =
|
||||
meta_wayland_actor_surface_get_instance_private (actor_surface);
|
||||
MetaWaylandSurfaceRole *surface_role =
|
||||
META_WAYLAND_SURFACE_ROLE (actor_surface);
|
||||
MetaWaylandSurface *surface =
|
||||
@@ -103,7 +141,7 @@ meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor
|
||||
double actor_scale;
|
||||
GList *l;
|
||||
|
||||
surface_actor = surface->surface_actor;
|
||||
surface_actor = priv->actor;
|
||||
stex = meta_surface_actor_get_texture (surface_actor);
|
||||
|
||||
actor_scale = meta_wayland_actor_surface_calculate_scale (actor_surface);
|
||||
@@ -165,13 +203,16 @@ static void
|
||||
meta_wayland_actor_surface_commit (MetaWaylandSurfaceRole *surface_role,
|
||||
MetaWaylandPendingState *pending)
|
||||
{
|
||||
MetaWaylandActorSurfacePrivate *priv =
|
||||
meta_wayland_actor_surface_get_instance_private (META_WAYLAND_ACTOR_SURFACE (surface_role));
|
||||
MetaWaylandActorSurface *actor_surface =
|
||||
META_WAYLAND_ACTOR_SURFACE (surface_role);
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaWaylandSurface *toplevel_surface;
|
||||
|
||||
meta_wayland_actor_surface_queue_frame_callbacks (actor_surface, pending);
|
||||
queue_surface_actor_frame_callbacks (META_SURFACE_ACTOR_WAYLAND (priv->actor),
|
||||
pending);
|
||||
|
||||
toplevel_surface = meta_wayland_surface_get_toplevel (surface);
|
||||
if (!toplevel_surface || !toplevel_surface->window)
|
||||
@@ -184,9 +225,9 @@ static gboolean
|
||||
meta_wayland_actor_surface_is_on_logical_monitor (MetaWaylandSurfaceRole *surface_role,
|
||||
MetaLogicalMonitor *logical_monitor)
|
||||
{
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
ClutterActor *actor = CLUTTER_ACTOR (surface->surface_actor);
|
||||
MetaWaylandActorSurfacePrivate *priv =
|
||||
meta_wayland_actor_surface_get_instance_private (META_WAYLAND_ACTOR_SURFACE (surface_role));
|
||||
ClutterActor *actor = CLUTTER_ACTOR (priv->actor);
|
||||
float x, y, width, height;
|
||||
cairo_rectangle_int_t actor_rect;
|
||||
cairo_region_t *region;
|
||||
@@ -230,6 +271,10 @@ meta_wayland_actor_surface_class_init (MetaWaylandActorSurfaceClass *klass)
|
||||
{
|
||||
MetaWaylandSurfaceRoleClass *surface_role_class =
|
||||
META_WAYLAND_SURFACE_ROLE_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->constructed = meta_wayland_actor_surface_constructed;
|
||||
object_class->dispose = meta_wayland_actor_surface_dispose;
|
||||
|
||||
surface_role_class->assigned = meta_wayland_actor_surface_assigned;
|
||||
surface_role_class->commit = meta_wayland_actor_surface_commit;
|
||||
@@ -238,3 +283,41 @@ meta_wayland_actor_surface_class_init (MetaWaylandActorSurfaceClass *klass)
|
||||
|
||||
klass->sync_actor_state = meta_wayland_actor_surface_real_sync_actor_state;
|
||||
}
|
||||
|
||||
MetaSurfaceActor *
|
||||
meta_wayland_actor_surface_get_actor (MetaWaylandActorSurface *actor_surface)
|
||||
{
|
||||
MetaWaylandActorSurfacePrivate *priv =
|
||||
meta_wayland_actor_surface_get_instance_private (actor_surface);
|
||||
|
||||
return priv->actor;
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_actor_surface_reset_actor (MetaWaylandActorSurface *actor_surface)
|
||||
{
|
||||
MetaWaylandActorSurfacePrivate *priv =
|
||||
meta_wayland_actor_surface_get_instance_private (actor_surface);
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (META_WAYLAND_SURFACE_ROLE (actor_surface));
|
||||
|
||||
if (priv->actor)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (priv->actor,
|
||||
meta_wayland_surface_notify_geometry_changed,
|
||||
surface);
|
||||
g_object_unref (priv->actor);
|
||||
}
|
||||
|
||||
priv->actor = g_object_ref_sink (meta_surface_actor_wayland_new (surface));
|
||||
|
||||
g_signal_connect_swapped (priv->actor, "notify::allocation",
|
||||
G_CALLBACK (meta_wayland_surface_notify_geometry_changed),
|
||||
surface);
|
||||
g_signal_connect_swapped (priv->actor, "notify::position",
|
||||
G_CALLBACK (meta_wayland_surface_notify_geometry_changed),
|
||||
surface);
|
||||
g_signal_connect_swapped (priv->actor, "notify::mapped",
|
||||
G_CALLBACK (meta_wayland_surface_notify_geometry_changed),
|
||||
surface);
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ void meta_wayland_actor_surface_sync_actor_state (MetaWaylandActorSurface *actor
|
||||
|
||||
double meta_wayland_actor_surface_calculate_scale (MetaWaylandActorSurface *actor_surface);
|
||||
|
||||
void meta_wayland_actor_surface_queue_frame_callbacks (MetaWaylandActorSurface *actor_surface,
|
||||
MetaWaylandPendingState *pending);
|
||||
MetaSurfaceActor * meta_wayland_actor_surface_get_actor (MetaWaylandActorSurface *actor_surface);
|
||||
void meta_wayland_actor_surface_reset_actor (MetaWaylandActorSurface *actor_surface);
|
||||
|
||||
#endif /* META_WAYLAND_ACTOR_SURFACE_H */
|
||||
|
@@ -88,13 +88,13 @@ meta_wayland_buffer_from_resource (struct wl_resource *resource)
|
||||
return buffer;
|
||||
}
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
meta_wayland_buffer_is_realized (MetaWaylandBuffer *buffer)
|
||||
{
|
||||
return buffer->type != META_WAYLAND_BUFFER_TYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
meta_wayland_buffer_realize (MetaWaylandBuffer *buffer)
|
||||
{
|
||||
EGLint format;
|
||||
@@ -123,17 +123,8 @@ meta_wayland_buffer_realize (MetaWaylandBuffer *buffer)
|
||||
stream = meta_wayland_egl_stream_new (buffer, NULL);
|
||||
if (stream)
|
||||
{
|
||||
CoglTexture2D *texture;
|
||||
|
||||
texture = meta_wayland_egl_stream_create_texture (stream, NULL);
|
||||
if (!texture)
|
||||
return FALSE;
|
||||
|
||||
buffer->egl_stream.stream = stream;
|
||||
buffer->type = META_WAYLAND_BUFFER_TYPE_EGL_STREAM;
|
||||
buffer->texture = COGL_TEXTURE (texture);
|
||||
buffer->is_y_inverted = meta_wayland_egl_stream_is_y_inverted (stream);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -323,6 +314,18 @@ egl_stream_buffer_attach (MetaWaylandBuffer *buffer,
|
||||
|
||||
g_assert (stream);
|
||||
|
||||
if (!buffer->texture)
|
||||
{
|
||||
CoglTexture2D *texture;
|
||||
|
||||
texture = meta_wayland_egl_stream_create_texture (stream, error);
|
||||
if (!texture)
|
||||
return FALSE;
|
||||
|
||||
buffer->texture = COGL_TEXTURE (texture);
|
||||
buffer->is_y_inverted = meta_wayland_egl_stream_is_y_inverted (stream);
|
||||
}
|
||||
|
||||
if (!meta_wayland_egl_stream_attach (stream, error))
|
||||
return FALSE;
|
||||
|
||||
@@ -337,11 +340,13 @@ meta_wayland_buffer_attach (MetaWaylandBuffer *buffer,
|
||||
|
||||
if (!meta_wayland_buffer_is_realized (buffer))
|
||||
{
|
||||
/* The buffer should have been realized at surface commit time */
|
||||
g_set_error (error, G_IO_ERROR,
|
||||
G_IO_ERROR_FAILED,
|
||||
"Unknown buffer type");
|
||||
return FALSE;
|
||||
if (!meta_wayland_buffer_realize (buffer))
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR,
|
||||
G_IO_ERROR_FAILED,
|
||||
"Unknown buffer type");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
switch (buffer->type)
|
||||
|
@@ -68,8 +68,6 @@ G_DECLARE_FINAL_TYPE (MetaWaylandBuffer, meta_wayland_buffer,
|
||||
META, WAYLAND_BUFFER, GObject);
|
||||
|
||||
MetaWaylandBuffer * meta_wayland_buffer_from_resource (struct wl_resource *resource);
|
||||
gboolean meta_wayland_buffer_is_realized (MetaWaylandBuffer *buffer);
|
||||
gboolean meta_wayland_buffer_realize (MetaWaylandBuffer *buffer);
|
||||
gboolean meta_wayland_buffer_attach (MetaWaylandBuffer *buffer,
|
||||
GError **error);
|
||||
CoglTexture * meta_wayland_buffer_get_texture (MetaWaylandBuffer *buffer);
|
||||
|
@@ -690,7 +690,6 @@ struct _MetaWaylandDragGrab {
|
||||
struct wl_client *drag_client;
|
||||
|
||||
MetaWaylandSurface *drag_focus;
|
||||
gulong drag_focus_destroy_handler_id;
|
||||
struct wl_resource *drag_focus_data_device;
|
||||
struct wl_listener drag_focus_listener;
|
||||
|
||||
@@ -716,17 +715,6 @@ destroy_drag_focus (struct wl_listener *listener, void *data)
|
||||
MetaWaylandDragGrab *grab = wl_container_of (listener, grab, drag_focus_listener);
|
||||
|
||||
grab->drag_focus_data_device = NULL;
|
||||
|
||||
g_signal_handler_disconnect (grab->drag_focus,
|
||||
grab->drag_focus_destroy_handler_id);
|
||||
grab->drag_focus = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
on_drag_focus_destroyed (MetaWaylandSurface *surface,
|
||||
MetaWaylandDragGrab *grab)
|
||||
{
|
||||
meta_wayland_surface_drag_dest_focus_out (grab->drag_focus);
|
||||
grab->drag_focus = NULL;
|
||||
}
|
||||
|
||||
@@ -789,8 +777,6 @@ meta_wayland_drag_grab_set_focus (MetaWaylandDragGrab *drag_grab,
|
||||
if (drag_grab->drag_focus)
|
||||
{
|
||||
meta_wayland_surface_drag_dest_focus_out (drag_grab->drag_focus);
|
||||
g_signal_handler_disconnect (drag_grab->drag_focus,
|
||||
drag_grab->drag_focus_destroy_handler_id);
|
||||
drag_grab->drag_focus = NULL;
|
||||
}
|
||||
|
||||
@@ -818,10 +804,6 @@ meta_wayland_drag_grab_set_focus (MetaWaylandDragGrab *drag_grab,
|
||||
offer = meta_wayland_data_source_send_offer (source, data_device_resource);
|
||||
|
||||
drag_grab->drag_focus = surface;
|
||||
drag_grab->drag_focus_destroy_handler_id =
|
||||
g_signal_connect (surface, "destroy",
|
||||
G_CALLBACK (on_drag_focus_destroyed),
|
||||
drag_grab);
|
||||
drag_grab->drag_focus_data_device = data_device_resource;
|
||||
|
||||
meta_wayland_surface_drag_dest_focus_in (drag_grab->drag_focus,
|
||||
@@ -1101,6 +1083,7 @@ meta_wayland_data_device_start_drag (MetaWaylandDataDevice *data
|
||||
MetaWaylandDragGrab *drag_grab;
|
||||
ClutterPoint pos, surface_pos;
|
||||
ClutterModifierType modifiers;
|
||||
MetaSurfaceActor *surface_actor;
|
||||
|
||||
data_device->current_grab = drag_grab = g_slice_new0 (MetaWaylandDragGrab);
|
||||
|
||||
@@ -1118,7 +1101,9 @@ meta_wayland_data_device_start_drag (MetaWaylandDataDevice *data
|
||||
wl_resource_add_destroy_listener (surface->resource,
|
||||
&drag_grab->drag_origin_listener);
|
||||
|
||||
clutter_actor_transform_stage_point (CLUTTER_ACTOR (meta_surface_actor_get_texture (surface->surface_actor)),
|
||||
surface_actor = meta_wayland_surface_get_actor (surface);
|
||||
|
||||
clutter_actor_transform_stage_point (CLUTTER_ACTOR (meta_surface_actor_get_texture (surface_actor)),
|
||||
seat->pointer->grab_x,
|
||||
seat->pointer->grab_y,
|
||||
&surface_pos.x, &surface_pos.y);
|
||||
@@ -1139,19 +1124,22 @@ meta_wayland_data_device_start_drag (MetaWaylandDataDevice *data
|
||||
|
||||
if (icon_surface)
|
||||
{
|
||||
ClutterActor *drag_origin_actor;
|
||||
|
||||
drag_grab->drag_surface = icon_surface;
|
||||
|
||||
drag_grab->drag_icon_listener.notify = destroy_data_device_icon;
|
||||
wl_resource_add_destroy_listener (icon_surface->resource,
|
||||
&drag_grab->drag_icon_listener);
|
||||
|
||||
drag_grab->feedback_actor = meta_dnd_actor_new (CLUTTER_ACTOR (drag_grab->drag_origin->surface_actor),
|
||||
drag_origin_actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (drag_grab->drag_origin));
|
||||
|
||||
drag_grab->feedback_actor = meta_dnd_actor_new (drag_origin_actor,
|
||||
drag_grab->drag_start_x,
|
||||
drag_grab->drag_start_y);
|
||||
meta_feedback_actor_set_anchor (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
|
||||
0, 0);
|
||||
clutter_actor_add_child (drag_grab->feedback_actor,
|
||||
CLUTTER_ACTOR (drag_grab->drag_surface->surface_actor));
|
||||
clutter_actor_add_child (drag_grab->feedback_actor, drag_origin_actor);
|
||||
|
||||
clutter_input_device_get_coords (seat->pointer->device, NULL, &pos);
|
||||
meta_feedback_actor_set_position (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
|
||||
|
@@ -365,7 +365,6 @@ buffer_params_create_common (struct wl_client *client,
|
||||
dma_buf, NULL);
|
||||
buffer = meta_wayland_buffer_from_resource (buffer_resource);
|
||||
|
||||
meta_wayland_buffer_realize (buffer);
|
||||
if (!meta_wayland_buffer_attach (buffer, &error))
|
||||
{
|
||||
if (buffer_id == 0)
|
||||
|
@@ -71,13 +71,15 @@ gtk_surface_set_dbus_properties (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandGtkSurface *gtk_surface = wl_resource_get_user_data (resource);
|
||||
MetaWaylandSurface *surface = gtk_surface->surface;
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
/* Broken client, let it die instead of us */
|
||||
if (!surface->window)
|
||||
{
|
||||
meta_warning ("meta-wayland-surface: set_dbus_properties called with invalid window!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
meta_window_set_gtk_dbus_properties (window,
|
||||
meta_window_set_gtk_dbus_properties (surface->window,
|
||||
application_id,
|
||||
unique_bus_name,
|
||||
app_menu_path,
|
||||
@@ -92,17 +94,12 @@ gtk_surface_set_modal (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandGtkSurface *gtk_surface = wl_resource_get_user_data (resource);
|
||||
MetaWaylandSurface *surface = gtk_surface->surface;
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (gtk_surface->is_modal)
|
||||
return;
|
||||
|
||||
gtk_surface->is_modal = TRUE;
|
||||
meta_window_set_type (window, META_WINDOW_MODAL_DIALOG);
|
||||
meta_window_set_type (surface->window, META_WINDOW_MODAL_DIALOG);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -111,17 +108,12 @@ gtk_surface_unset_modal (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandGtkSurface *gtk_surface = wl_resource_get_user_data (resource);
|
||||
MetaWaylandSurface *surface = gtk_surface->surface;
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!gtk_surface->is_modal)
|
||||
return;
|
||||
|
||||
gtk_surface->is_modal = FALSE;
|
||||
meta_window_set_type (window, META_WINDOW_NORMAL);
|
||||
meta_window_set_type (surface->window, META_WINDOW_NORMAL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -131,9 +123,8 @@ gtk_surface_present (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandGtkSurface *gtk_surface = wl_resource_get_user_data (resource);
|
||||
MetaWaylandSurface *surface = gtk_surface->surface;
|
||||
MetaWindow *window;
|
||||
MetaWindow *window = surface->window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
|
@@ -89,7 +89,7 @@ unbind_resource (struct wl_resource *resource)
|
||||
}
|
||||
|
||||
static int
|
||||
create_anonymous_file (off_t size,
|
||||
create_anonymous_file (off_t size,
|
||||
GError **error)
|
||||
{
|
||||
static const char template[] = "mutter-shared-XXXXXX";
|
||||
@@ -126,66 +126,35 @@ create_anonymous_file (off_t size,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
send_keymap (MetaWaylandKeyboard *keyboard,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandXkbInfo *xkb_info = &keyboard->xkb_info;
|
||||
GError *error = NULL;
|
||||
int fd;
|
||||
char *keymap_area;
|
||||
|
||||
if (!xkb_info->keymap_string)
|
||||
return;
|
||||
|
||||
fd = create_anonymous_file (xkb_info->keymap_size, &error);
|
||||
if (fd < 0)
|
||||
{
|
||||
g_warning ("Creating a keymap file for %lu bytes failed: %s",
|
||||
(unsigned long) xkb_info->keymap_size,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
keymap_area = mmap (NULL, xkb_info->keymap_size,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
if (keymap_area == MAP_FAILED)
|
||||
{
|
||||
g_warning ("Failed to mmap() %lu bytes\n",
|
||||
(unsigned long) xkb_info->keymap_size);
|
||||
close (fd);
|
||||
return;
|
||||
}
|
||||
|
||||
strcpy (keymap_area, xkb_info->keymap_string);
|
||||
|
||||
munmap (keymap_area, xkb_info->keymap_size);
|
||||
|
||||
wl_keyboard_send_keymap (resource,
|
||||
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
||||
fd,
|
||||
keyboard->xkb_info.keymap_size);
|
||||
close (fd);
|
||||
}
|
||||
|
||||
static void
|
||||
inform_clients_of_new_keymap (MetaWaylandKeyboard *keyboard)
|
||||
{
|
||||
struct wl_resource *keyboard_resource;
|
||||
|
||||
wl_resource_for_each (keyboard_resource, &keyboard->resource_list)
|
||||
send_keymap (keyboard, keyboard_resource);
|
||||
{
|
||||
wl_keyboard_send_keymap (keyboard_resource,
|
||||
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
||||
keyboard->xkb_info.keymap_fd,
|
||||
keyboard->xkb_info.keymap_size);
|
||||
}
|
||||
wl_resource_for_each (keyboard_resource, &keyboard->focus_resource_list)
|
||||
send_keymap (keyboard, keyboard_resource);
|
||||
{
|
||||
wl_keyboard_send_keymap (keyboard_resource,
|
||||
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
||||
keyboard->xkb_info.keymap_fd,
|
||||
keyboard->xkb_info.keymap_size);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_keyboard_take_keymap (MetaWaylandKeyboard *keyboard,
|
||||
struct xkb_keymap *keymap)
|
||||
{
|
||||
MetaWaylandXkbInfo *xkb_info = &keyboard->xkb_info;
|
||||
MetaWaylandXkbInfo *xkb_info = &keyboard->xkb_info;
|
||||
GError *error = NULL;
|
||||
char *keymap_str;
|
||||
size_t previous_size;
|
||||
|
||||
if (keymap == NULL)
|
||||
{
|
||||
@@ -193,24 +162,60 @@ meta_wayland_keyboard_take_keymap (MetaWaylandKeyboard *keyboard,
|
||||
return;
|
||||
}
|
||||
|
||||
g_clear_pointer (&xkb_info->keymap_string, g_free);
|
||||
xkb_keymap_unref (xkb_info->keymap);
|
||||
xkb_info->keymap = xkb_keymap_ref (keymap);
|
||||
|
||||
meta_wayland_keyboard_update_xkb_state (keyboard);
|
||||
|
||||
xkb_info->keymap_string =
|
||||
xkb_keymap_get_as_string (xkb_info->keymap, XKB_KEYMAP_FORMAT_TEXT_V1);
|
||||
if (!xkb_info->keymap_string)
|
||||
keymap_str = xkb_map_get_as_string (xkb_info->keymap);
|
||||
if (keymap_str == NULL)
|
||||
{
|
||||
g_warning ("Failed to get string version of keymap");
|
||||
g_warning ("failed to get string version of keymap");
|
||||
return;
|
||||
}
|
||||
xkb_info->keymap_size = strlen (xkb_info->keymap_string) + 1;
|
||||
previous_size = xkb_info->keymap_size;
|
||||
xkb_info->keymap_size = strlen (keymap_str) + 1;
|
||||
|
||||
if (xkb_info->keymap_fd >= 0)
|
||||
close (xkb_info->keymap_fd);
|
||||
|
||||
xkb_info->keymap_fd = create_anonymous_file (xkb_info->keymap_size, &error);
|
||||
if (xkb_info->keymap_fd < 0)
|
||||
{
|
||||
g_warning ("creating a keymap file for %lu bytes failed: %s",
|
||||
(unsigned long) xkb_info->keymap_size,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
goto err_keymap_str;
|
||||
}
|
||||
|
||||
if (xkb_info->keymap_area)
|
||||
munmap (xkb_info->keymap_area, previous_size);
|
||||
|
||||
xkb_info->keymap_area = mmap (NULL, xkb_info->keymap_size,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED, xkb_info->keymap_fd, 0);
|
||||
if (xkb_info->keymap_area == MAP_FAILED)
|
||||
{
|
||||
g_warning ("failed to mmap() %lu bytes\n",
|
||||
(unsigned long) xkb_info->keymap_size);
|
||||
goto err_dev_zero;
|
||||
}
|
||||
strcpy (xkb_info->keymap_area, keymap_str);
|
||||
free (keymap_str);
|
||||
|
||||
inform_clients_of_new_keymap (keyboard);
|
||||
|
||||
notify_modifiers (keyboard);
|
||||
|
||||
return;
|
||||
|
||||
err_dev_zero:
|
||||
close (xkb_info->keymap_fd);
|
||||
xkb_info->keymap_fd = -1;
|
||||
err_keymap_str:
|
||||
free (keymap_str);
|
||||
return;
|
||||
}
|
||||
|
||||
static xkb_mod_mask_t
|
||||
@@ -702,12 +707,28 @@ meta_wayland_keyboard_enable (MetaWaylandKeyboard *keyboard)
|
||||
maybe_restore_numlock_state (keyboard);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_xkb_info_init (MetaWaylandXkbInfo *xkb_info)
|
||||
{
|
||||
xkb_info->keymap_fd = -1;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_xkb_info_destroy (MetaWaylandXkbInfo *xkb_info)
|
||||
{
|
||||
g_clear_pointer (&xkb_info->keymap, xkb_keymap_unref);
|
||||
g_clear_pointer (&xkb_info->state, xkb_state_unref);
|
||||
g_clear_pointer (&xkb_info->keymap_string, g_free);
|
||||
|
||||
if (xkb_info->keymap_area)
|
||||
{
|
||||
munmap (xkb_info->keymap_area, xkb_info->keymap_size);
|
||||
xkb_info->keymap_area = NULL;
|
||||
}
|
||||
if (xkb_info->keymap_fd >= 0)
|
||||
{
|
||||
close (xkb_info->keymap_fd);
|
||||
xkb_info->keymap_fd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -980,7 +1001,10 @@ meta_wayland_keyboard_create_new_resource (MetaWaylandKeyboard *keyboard,
|
||||
wl_resource_set_implementation (resource, &keyboard_interface,
|
||||
keyboard, unbind_resource);
|
||||
|
||||
send_keymap (keyboard, resource);
|
||||
wl_keyboard_send_keymap (resource,
|
||||
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
||||
keyboard->xkb_info.keymap_fd,
|
||||
keyboard->xkb_info.keymap_size);
|
||||
|
||||
notify_key_repeat_for_resource (keyboard, resource);
|
||||
|
||||
@@ -1026,6 +1050,8 @@ meta_wayland_keyboard_init (MetaWaylandKeyboard *keyboard)
|
||||
wl_list_init (&keyboard->resource_list);
|
||||
wl_list_init (&keyboard->focus_resource_list);
|
||||
|
||||
meta_wayland_xkb_info_init (&keyboard->xkb_info);
|
||||
|
||||
keyboard->default_grab.interface = &default_keyboard_grab_interface;
|
||||
keyboard->default_grab.keyboard = keyboard;
|
||||
keyboard->grab = &keyboard->default_grab;
|
||||
|
@@ -74,8 +74,9 @@ typedef struct
|
||||
{
|
||||
struct xkb_keymap *keymap;
|
||||
struct xkb_state *state;
|
||||
int keymap_fd;
|
||||
size_t keymap_size;
|
||||
char *keymap_string;
|
||||
char *keymap_area;
|
||||
} MetaWaylandXkbInfo;
|
||||
|
||||
struct _MetaWaylandKeyboard
|
||||
|
@@ -185,11 +185,6 @@ zxdg_toplevel_v6_set_parent (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *transient_for = NULL;
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (parent_resource)
|
||||
{
|
||||
@@ -199,7 +194,7 @@ zxdg_toplevel_v6_set_parent (struct wl_client *client,
|
||||
transient_for = parent_surface->window;
|
||||
}
|
||||
|
||||
meta_window_set_transient_for (window, transient_for);
|
||||
meta_window_set_transient_for (surface->window, transient_for);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -208,16 +203,11 @@ zxdg_toplevel_v6_set_title (struct wl_client *client,
|
||||
const char *title)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!g_utf8_validate (title, -1, NULL))
|
||||
title = "";
|
||||
|
||||
meta_window_set_title (window, title);
|
||||
meta_window_set_title (surface->window, title);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -226,16 +216,11 @@ zxdg_toplevel_v6_set_app_id (struct wl_client *client,
|
||||
const char *app_id)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!g_utf8_validate (app_id, -1, NULL))
|
||||
app_id = "";
|
||||
|
||||
meta_window_set_wm_class (window, app_id, app_id);
|
||||
meta_window_set_wm_class (surface->window, app_id, app_id);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -248,20 +233,15 @@ zxdg_toplevel_v6_show_window_menu (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
int monitor_scale;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, FALSE, NULL, NULL))
|
||||
return;
|
||||
|
||||
monitor_scale = window->monitor->scale;
|
||||
meta_window_show_menu (window, META_WINDOW_MENU_WM,
|
||||
window->buffer_rect.x + (x * monitor_scale),
|
||||
window->buffer_rect.y + (y * monitor_scale));
|
||||
monitor_scale = surface->window->monitor->scale;
|
||||
meta_window_show_menu (surface->window, META_WINDOW_MENU_WM,
|
||||
surface->window->buffer_rect.x + (x * monitor_scale),
|
||||
surface->window->buffer_rect.y + (y * monitor_scale));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -272,13 +252,8 @@ zxdg_toplevel_v6_move (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
gfloat x, y;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
|
||||
return;
|
||||
|
||||
@@ -317,14 +292,9 @@ zxdg_toplevel_v6_resize (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
gfloat x, y;
|
||||
MetaGrabOp grab_op;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
|
||||
return;
|
||||
|
||||
@@ -339,11 +309,6 @@ zxdg_toplevel_v6_set_max_size (struct wl_client *client,
|
||||
int32_t height)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (width < 0 || height < 0)
|
||||
{
|
||||
@@ -366,11 +331,6 @@ zxdg_toplevel_v6_set_min_size (struct wl_client *client,
|
||||
int32_t height)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (width < 0 || height < 0)
|
||||
{
|
||||
@@ -391,14 +351,9 @@ zxdg_toplevel_v6_set_maximized (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
meta_window_force_placement (window, TRUE);
|
||||
meta_window_maximize (window, META_MAXIMIZE_BOTH);
|
||||
meta_window_force_placement (surface->window, TRUE);
|
||||
meta_window_maximize (surface->window, META_MAXIMIZE_BOTH);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -406,13 +361,8 @@ zxdg_toplevel_v6_unset_maximized (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
meta_window_unmaximize (window, META_MAXIMIZE_BOTH);
|
||||
meta_window_unmaximize (surface->window, META_MAXIMIZE_BOTH);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -421,20 +371,15 @@ zxdg_toplevel_v6_set_fullscreen (struct wl_client *client,
|
||||
struct wl_resource *output_resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (output_resource)
|
||||
{
|
||||
MetaWaylandOutput *output = wl_resource_get_user_data (output_resource);
|
||||
if (output)
|
||||
meta_window_move_to_monitor (window, output->logical_monitor->number);
|
||||
meta_window_move_to_monitor (surface->window, output->logical_monitor->number);
|
||||
}
|
||||
|
||||
meta_window_make_fullscreen (window);
|
||||
meta_window_make_fullscreen (surface->window);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -442,13 +387,8 @@ zxdg_toplevel_v6_unset_fullscreen (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
meta_window_unmake_fullscreen (window);
|
||||
meta_window_unmake_fullscreen (surface->window);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -456,13 +396,8 @@ zxdg_toplevel_v6_set_minimized (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
meta_window_minimize (window);
|
||||
meta_window_minimize (surface->window);
|
||||
}
|
||||
|
||||
static const struct zxdg_toplevel_v6_interface meta_wayland_zxdg_toplevel_v6_interface = {
|
||||
@@ -663,18 +598,11 @@ meta_wayland_zxdg_toplevel_v6_commit (MetaWaylandSurfaceRole *surface_role,
|
||||
MetaWaylandSurfaceRoleClass *surface_role_class;
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaWindow *window;
|
||||
MetaWindow *window = surface->window;
|
||||
MetaRectangle window_geometry;
|
||||
MetaRectangle old_geometry;
|
||||
gboolean geometry_changed;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
{
|
||||
meta_wayland_surface_cache_pending_frame_callbacks (surface, pending);
|
||||
return;
|
||||
}
|
||||
|
||||
old_geometry = xdg_surface_priv->geometry;
|
||||
|
||||
surface_role_class =
|
||||
|
@@ -365,38 +365,12 @@ meta_wayland_output_new (MetaWaylandCompositor *compositor,
|
||||
}
|
||||
|
||||
static void
|
||||
make_output_resources_inert (MetaWaylandOutput *wayland_output)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = wayland_output->resources; l; l = l->next)
|
||||
{
|
||||
struct wl_resource *output_resource = l->data;
|
||||
|
||||
wl_resource_set_user_data (output_resource, NULL);
|
||||
}
|
||||
g_list_free (wayland_output->resources);
|
||||
wayland_output->resources = NULL;
|
||||
|
||||
for (l = wayland_output->xdg_output_resources; l; l = l->next)
|
||||
{
|
||||
struct wl_resource *xdg_output_resource = l->data;
|
||||
|
||||
wl_resource_set_user_data (xdg_output_resource, NULL);
|
||||
}
|
||||
g_list_free (wayland_output->xdg_output_resources);
|
||||
wayland_output->xdg_output_resources = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
make_output_inert (gpointer key,
|
||||
gpointer value,
|
||||
gpointer data)
|
||||
nullify_logical_monitor (gpointer key,
|
||||
gpointer value,
|
||||
gpointer data)
|
||||
{
|
||||
MetaWaylandOutput *wayland_output = value;
|
||||
|
||||
wayland_output->logical_monitor = NULL;
|
||||
make_output_resources_inert (wayland_output);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -446,7 +420,7 @@ meta_wayland_compositor_update_outputs (MetaWaylandCompositor *compositor,
|
||||
wayland_output);
|
||||
}
|
||||
|
||||
g_hash_table_foreach (compositor->outputs, make_output_inert, NULL);
|
||||
g_hash_table_foreach (compositor->outputs, nullify_logical_monitor, NULL);
|
||||
g_timeout_add_seconds (10, delayed_destroy_outputs, compositor->outputs);
|
||||
|
||||
return new_table;
|
||||
@@ -468,13 +442,30 @@ static void
|
||||
meta_wayland_output_finalize (GObject *object)
|
||||
{
|
||||
MetaWaylandOutput *wayland_output = META_WAYLAND_OUTPUT (object);
|
||||
GList *l;
|
||||
|
||||
wl_global_destroy (wayland_output->global);
|
||||
|
||||
/* Make sure the wl_output destructor doesn't try to access MetaWaylandOutput
|
||||
* after we have freed it.
|
||||
*/
|
||||
make_output_resources_inert (wayland_output);
|
||||
for (l = wayland_output->resources; l; l = l->next)
|
||||
{
|
||||
struct wl_resource *output_resource = l->data;
|
||||
|
||||
wl_resource_set_user_data (output_resource, NULL);
|
||||
}
|
||||
|
||||
g_list_free (wayland_output->resources);
|
||||
|
||||
for (l = wayland_output->xdg_output_resources; l; l = l->next)
|
||||
{
|
||||
struct wl_resource *xdg_output_resource = l->data;
|
||||
|
||||
wl_resource_set_user_data (xdg_output_resource, NULL);
|
||||
}
|
||||
|
||||
g_list_free (wayland_output->xdg_output_resources);
|
||||
|
||||
G_OBJECT_CLASS (meta_wayland_output_parent_class)->finalize (object);
|
||||
}
|
||||
@@ -591,9 +582,6 @@ meta_xdg_output_manager_get_xdg_output (struct wl_client *client,
|
||||
wayland_output->xdg_output_resources =
|
||||
g_list_prepend (wayland_output->xdg_output_resources, xdg_output_resource);
|
||||
|
||||
if (!wayland_output->logical_monitor)
|
||||
return;
|
||||
|
||||
send_xdg_output_events (xdg_output_resource,
|
||||
wayland_output,
|
||||
wayland_output->logical_monitor,
|
||||
|
@@ -72,6 +72,8 @@ struct _MetaWaylandCompositor
|
||||
|
||||
MetaWaylandSeat *seat;
|
||||
MetaWaylandTabletManager *tablet_manager;
|
||||
|
||||
GHashTable *scheduled_surface_associations;
|
||||
};
|
||||
|
||||
#endif /* META_WAYLAND_PRIVATE_H */
|
||||
|
@@ -264,7 +264,7 @@ meta_wayland_seat_free (MetaWaylandSeat *seat)
|
||||
g_object_unref (seat->touch);
|
||||
meta_wayland_text_input_destroy (seat->text_input);
|
||||
|
||||
g_free (seat);
|
||||
g_slice_free (MetaWaylandSeat, seat);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@@ -83,7 +83,7 @@ meta_wayland_shell_surface_set_window (MetaWaylandShellSurface *shell_surface,
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
|
||||
meta_wayland_surface_set_window (surface, window);
|
||||
meta_window_update_monitor (window, META_WINDOW_UPDATE_MONITOR_FLAGS_NONE);
|
||||
meta_window_update_monitor (window, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -54,7 +54,7 @@ G_DEFINE_TYPE (MetaWaylandSubsurface,
|
||||
static void
|
||||
sync_actor_subsurface_state (MetaWaylandSurface *surface)
|
||||
{
|
||||
ClutterActor *actor = CLUTTER_ACTOR (surface->surface_actor);
|
||||
ClutterActor *actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface));
|
||||
MetaWindow *toplevel_window;
|
||||
int geometry_scale;
|
||||
int x, y;
|
||||
@@ -99,8 +99,8 @@ meta_wayland_subsurface_parent_state_applied (MetaWaylandSubsurface *subsurface)
|
||||
GSList *it;
|
||||
MetaWaylandSurface *parent = surface->sub.parent;
|
||||
ClutterActor *parent_actor =
|
||||
clutter_actor_get_parent (CLUTTER_ACTOR (parent->surface_actor));
|
||||
ClutterActor *surface_actor = CLUTTER_ACTOR (surface->surface_actor);
|
||||
clutter_actor_get_parent (CLUTTER_ACTOR (meta_wayland_surface_get_actor (parent)));
|
||||
ClutterActor *surface_actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface));
|
||||
|
||||
for (it = surface->sub.pending_placement_ops; it; it = it->next)
|
||||
{
|
||||
@@ -113,7 +113,7 @@ meta_wayland_subsurface_parent_state_applied (MetaWaylandSubsurface *subsurface)
|
||||
continue;
|
||||
}
|
||||
|
||||
sibling_actor = CLUTTER_ACTOR (op->sibling->surface_actor);
|
||||
sibling_actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (op->sibling));
|
||||
|
||||
switch (op->placement)
|
||||
{
|
||||
@@ -234,7 +234,7 @@ meta_wayland_subsurface_class_init (MetaWaylandSubsurfaceClass *klass)
|
||||
static void
|
||||
unparent_actor (MetaWaylandSurface *surface)
|
||||
{
|
||||
ClutterActor *actor = CLUTTER_ACTOR (surface->surface_actor);
|
||||
ClutterActor *actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface));
|
||||
ClutterActor *parent_actor;
|
||||
|
||||
parent_actor = clutter_actor_get_parent (actor);
|
||||
@@ -471,10 +471,13 @@ wl_subcompositor_get_subsurface (struct wl_client *client,
|
||||
&surface->sub.parent_destroy_listener);
|
||||
parent->subsurfaces = g_list_append (parent->subsurfaces, surface);
|
||||
|
||||
clutter_actor_add_child (CLUTTER_ACTOR (parent->surface_actor),
|
||||
CLUTTER_ACTOR (surface->surface_actor));
|
||||
if (meta_wayland_surface_get_actor (parent))
|
||||
{
|
||||
clutter_actor_add_child (CLUTTER_ACTOR (meta_wayland_surface_get_actor (parent)),
|
||||
CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)));
|
||||
}
|
||||
|
||||
clutter_actor_set_reactive (CLUTTER_ACTOR (surface->surface_actor), TRUE);
|
||||
clutter_actor_set_reactive (CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)), TRUE);
|
||||
}
|
||||
|
||||
static const struct wl_subcompositor_interface meta_wayland_subcompositor_interface = {
|
||||
|
@@ -105,6 +105,7 @@ enum {
|
||||
SURFACE_CONFIGURE,
|
||||
SURFACE_SHORTCUTS_INHIBITED,
|
||||
SURFACE_SHORTCUTS_RESTORED,
|
||||
SURFACE_GEOMETRY_CHANGED,
|
||||
N_SURFACE_SIGNALS
|
||||
};
|
||||
|
||||
@@ -128,18 +129,6 @@ meta_wayland_surface_role_is_on_logical_monitor (MetaWaylandSurfaceRole *surface
|
||||
static MetaWaylandSurface *
|
||||
meta_wayland_surface_role_get_toplevel (MetaWaylandSurfaceRole *surface_role);
|
||||
|
||||
static void
|
||||
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaWaylandSurface *surface);
|
||||
static void
|
||||
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaWaylandSurface *surface);
|
||||
static void
|
||||
surface_actor_position_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaWaylandSurface *surface);
|
||||
static void
|
||||
window_position_changed (MetaWindow *window,
|
||||
MetaWaylandSurface *surface);
|
||||
@@ -312,7 +301,7 @@ surface_process_damage (MetaWaylandSurface *surface,
|
||||
cairo_rectangle_int_t rect;
|
||||
cairo_region_get_rectangle (scaled_region, i, &rect);
|
||||
|
||||
meta_surface_actor_process_damage (surface->surface_actor,
|
||||
meta_surface_actor_process_damage (meta_wayland_surface_get_actor (surface),
|
||||
rect.x, rect.y,
|
||||
rect.width, rect.height);
|
||||
}
|
||||
@@ -602,15 +591,6 @@ parent_surface_state_applied (gpointer data,
|
||||
meta_wayland_subsurface_parent_state_applied (subsurface);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_surface_cache_pending_frame_callbacks (MetaWaylandSurface *surface,
|
||||
MetaWaylandPendingState *pending)
|
||||
{
|
||||
wl_list_insert_list (&surface->pending_frame_callback_list,
|
||||
&pending->frame_callback_list);
|
||||
wl_list_init (&pending->frame_callback_list);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_surface_apply_pending_state (MetaWaylandSurface *surface,
|
||||
MetaWaylandPendingState *pending)
|
||||
@@ -664,14 +644,14 @@ meta_wayland_surface_apply_pending_state (MetaWaylandSurface *surface,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (switched_buffer)
|
||||
if (switched_buffer && meta_wayland_surface_get_actor (surface))
|
||||
{
|
||||
MetaShapedTexture *stex;
|
||||
CoglTexture *texture;
|
||||
CoglSnippet *snippet;
|
||||
gboolean is_y_inverted;
|
||||
|
||||
stex = meta_surface_actor_get_texture (surface->surface_actor);
|
||||
stex = meta_surface_actor_get_texture (meta_wayland_surface_get_actor (surface));
|
||||
texture = meta_wayland_buffer_get_texture (pending->buffer);
|
||||
snippet = meta_wayland_buffer_create_snippet (pending->buffer);
|
||||
is_y_inverted = meta_wayland_buffer_is_y_inverted (pending->buffer);
|
||||
@@ -695,8 +675,9 @@ meta_wayland_surface_apply_pending_state (MetaWaylandSurface *surface,
|
||||
if (pending->scale > 0)
|
||||
surface->scale = pending->scale;
|
||||
|
||||
if (!cairo_region_is_empty (pending->surface_damage) ||
|
||||
!cairo_region_is_empty (pending->buffer_damage))
|
||||
if (meta_wayland_surface_get_actor (surface) &&
|
||||
(!cairo_region_is_empty (pending->surface_damage) ||
|
||||
!cairo_region_is_empty (pending->buffer_damage)))
|
||||
surface_process_damage (surface,
|
||||
pending->surface_damage,
|
||||
pending->buffer_damage);
|
||||
@@ -731,7 +712,13 @@ meta_wayland_surface_apply_pending_state (MetaWaylandSurface *surface,
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_wayland_surface_cache_pending_frame_callbacks (surface, pending);
|
||||
/* Since there is no role assigned to the surface yet, keep frame
|
||||
* callbacks queued until a role is assigned and we know how
|
||||
* the surface will be drawn.
|
||||
*/
|
||||
wl_list_insert_list (&surface->pending_frame_callback_list,
|
||||
&pending->frame_callback_list);
|
||||
wl_list_init (&pending->frame_callback_list);
|
||||
|
||||
if (pending->newly_attached)
|
||||
{
|
||||
@@ -765,10 +752,6 @@ cleanup:
|
||||
static void
|
||||
meta_wayland_surface_commit (MetaWaylandSurface *surface)
|
||||
{
|
||||
if (surface->pending->buffer &&
|
||||
!meta_wayland_buffer_is_realized (surface->pending->buffer))
|
||||
meta_wayland_buffer_realize (surface->pending->buffer);
|
||||
|
||||
/*
|
||||
* If this is a sub-surface and it is in effective synchronous mode, only
|
||||
* cache the pending surface state until either one of the following two
|
||||
@@ -1156,7 +1139,7 @@ meta_wayland_surface_set_window (MetaWaylandSurface *surface,
|
||||
|
||||
surface->window = window;
|
||||
|
||||
clutter_actor_set_reactive (CLUTTER_ACTOR (surface->surface_actor), !!window);
|
||||
clutter_actor_set_reactive (CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)), !!window);
|
||||
sync_drag_dest_funcs (surface);
|
||||
|
||||
if (was_unmapped)
|
||||
@@ -1184,16 +1167,6 @@ wl_surface_destructor (struct wl_resource *resource)
|
||||
|
||||
g_signal_emit (surface, surface_signals[SURFACE_DESTROY], 0);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (surface->surface_actor,
|
||||
surface_actor_mapped_notify,
|
||||
surface);
|
||||
g_signal_handlers_disconnect_by_func (surface->surface_actor,
|
||||
surface_actor_allocation_notify,
|
||||
surface);
|
||||
g_signal_handlers_disconnect_by_func (surface->surface_actor,
|
||||
surface_actor_position_notify,
|
||||
surface);
|
||||
|
||||
g_clear_object (&surface->role);
|
||||
|
||||
/* If we still have a window at the time of destruction, that means that
|
||||
@@ -1219,8 +1192,6 @@ wl_surface_destructor (struct wl_resource *resource)
|
||||
if (surface->input_region)
|
||||
cairo_region_destroy (surface->input_region);
|
||||
|
||||
g_object_unref (surface->surface_actor);
|
||||
|
||||
meta_wayland_compositor_destroy_frame_callbacks (compositor, surface);
|
||||
|
||||
g_hash_table_foreach (surface->outputs_to_destroy_notify_id, surface_output_disconnect_signal, surface);
|
||||
@@ -1242,30 +1213,6 @@ wl_surface_destructor (struct wl_resource *resource)
|
||||
meta_wayland_compositor_repick (compositor);
|
||||
}
|
||||
|
||||
static void
|
||||
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
meta_wayland_surface_update_outputs_recursively (surface);
|
||||
}
|
||||
|
||||
static void
|
||||
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
meta_wayland_surface_update_outputs_recursively (surface);
|
||||
}
|
||||
|
||||
static void
|
||||
surface_actor_position_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
meta_wayland_surface_update_outputs_recursively (surface);
|
||||
}
|
||||
|
||||
static void
|
||||
window_position_changed (MetaWindow *window,
|
||||
MetaWaylandSurface *surface)
|
||||
@@ -1280,21 +1227,6 @@ window_actor_effects_completed (MetaWindowActor *window_actor,
|
||||
meta_wayland_surface_update_outputs_recursively (surface);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_surface_create_surface_actor (MetaWaylandSurface *surface)
|
||||
{
|
||||
MetaSurfaceActor *surface_actor;
|
||||
|
||||
surface_actor = meta_surface_actor_wayland_new (surface);
|
||||
surface->surface_actor = g_object_ref_sink (surface_actor);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_surface_clear_surface_actor (MetaWaylandSurface *surface)
|
||||
{
|
||||
g_clear_object (&surface->surface_actor);
|
||||
}
|
||||
|
||||
MetaWaylandSurface *
|
||||
meta_wayland_surface_create (MetaWaylandCompositor *compositor,
|
||||
struct wl_client *client,
|
||||
@@ -1309,28 +1241,15 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor,
|
||||
surface->resource = wl_resource_create (client, &wl_surface_interface, wl_resource_get_version (compositor_resource), id);
|
||||
wl_resource_set_implementation (surface->resource, &meta_wayland_wl_surface_interface, surface, wl_surface_destructor);
|
||||
|
||||
surface->surface_actor = g_object_ref_sink (meta_surface_actor_wayland_new (surface));
|
||||
|
||||
wl_list_init (&surface->pending_frame_callback_list);
|
||||
|
||||
g_signal_connect_object (surface->surface_actor,
|
||||
"notify::allocation",
|
||||
G_CALLBACK (surface_actor_allocation_notify),
|
||||
surface, 0);
|
||||
g_signal_connect_object (surface->surface_actor,
|
||||
"notify::position",
|
||||
G_CALLBACK (surface_actor_position_notify),
|
||||
surface, 0);
|
||||
g_signal_connect_object (surface->surface_actor,
|
||||
"notify::mapped",
|
||||
G_CALLBACK (surface_actor_mapped_notify),
|
||||
surface, 0);
|
||||
|
||||
sync_drag_dest_funcs (surface);
|
||||
|
||||
surface->outputs_to_destroy_notify_id = g_hash_table_new (NULL, NULL);
|
||||
surface->shortcut_inhibited_seats = g_hash_table_new (NULL, NULL);
|
||||
|
||||
meta_wayland_compositor_notify_surface_id (compositor, id, surface);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
@@ -1513,7 +1432,7 @@ meta_wayland_surface_get_relative_coordinates (MetaWaylandSurface *surface,
|
||||
else
|
||||
{
|
||||
ClutterActor *actor =
|
||||
CLUTTER_ACTOR (meta_surface_actor_get_texture (surface->surface_actor));
|
||||
CLUTTER_ACTOR (meta_surface_actor_get_texture (meta_wayland_surface_get_actor (surface)));
|
||||
|
||||
clutter_actor_transform_stage_point (actor, abs_x, abs_y, sx, sy);
|
||||
*sx /= surface->scale;
|
||||
@@ -1529,7 +1448,7 @@ meta_wayland_surface_get_absolute_coordinates (MetaWaylandSurface *surface,
|
||||
float *y)
|
||||
{
|
||||
ClutterActor *actor =
|
||||
CLUTTER_ACTOR (meta_surface_actor_get_texture (surface->surface_actor));
|
||||
CLUTTER_ACTOR (meta_surface_actor_get_texture (meta_wayland_surface_get_actor (surface)));
|
||||
ClutterVertex sv = {
|
||||
.x = sx * surface->scale,
|
||||
.y = sy * surface->scale,
|
||||
@@ -1546,6 +1465,10 @@ static void
|
||||
meta_wayland_surface_init (MetaWaylandSurface *surface)
|
||||
{
|
||||
surface->pending = g_object_new (META_TYPE_WAYLAND_PENDING_STATE, NULL);
|
||||
|
||||
g_signal_connect (surface, "geometry-changed",
|
||||
G_CALLBACK (meta_wayland_surface_update_outputs_recursively),
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1592,6 +1515,13 @@ meta_wayland_surface_class_init (MetaWaylandSurfaceClass *klass)
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
surface_signals[SURFACE_GEOMETRY_CHANGED] =
|
||||
g_signal_new ("geometry-changed",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1799,3 +1729,18 @@ meta_wayland_surface_is_shortcuts_inhibited (MetaWaylandSurface *surface,
|
||||
|
||||
return g_hash_table_contains (surface->shortcut_inhibited_seats, seat);
|
||||
}
|
||||
|
||||
MetaSurfaceActor *
|
||||
meta_wayland_surface_get_actor (MetaWaylandSurface *surface)
|
||||
{
|
||||
if (!surface->role || !META_IS_WAYLAND_ACTOR_SURFACE (surface->role))
|
||||
return NULL;
|
||||
|
||||
return meta_wayland_actor_surface_get_actor (META_WAYLAND_ACTOR_SURFACE (surface->role));
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_surface_notify_geometry_changed (MetaWaylandSurface *surface)
|
||||
{
|
||||
g_signal_emit (surface, surface_signals[SURFACE_GEOMETRY_CHANGED], 0);
|
||||
}
|
||||
|
@@ -137,7 +137,6 @@ struct _MetaWaylandSurface
|
||||
/* Generic stuff */
|
||||
struct wl_resource *resource;
|
||||
MetaWaylandCompositor *compositor;
|
||||
MetaSurfaceActor *surface_actor;
|
||||
MetaWaylandSurfaceRole *role;
|
||||
MetaWindow *window;
|
||||
cairo_region_t *input_region;
|
||||
@@ -231,10 +230,6 @@ void meta_wayland_surface_unref_buffer_use_count (MetaWaylandSurf
|
||||
void meta_wayland_surface_set_window (MetaWaylandSurface *surface,
|
||||
MetaWindow *window);
|
||||
|
||||
void meta_wayland_surface_create_surface_actor (MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_surface_clear_surface_actor (MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_surface_configure_notify (MetaWaylandSurface *surface,
|
||||
int new_x,
|
||||
int new_y,
|
||||
@@ -261,9 +256,6 @@ MetaWaylandSurface *meta_wayland_surface_get_toplevel (MetaWaylandSurface *surfa
|
||||
|
||||
MetaWindow * meta_wayland_surface_get_toplevel_window (MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_surface_cache_pending_frame_callbacks (MetaWaylandSurface *surface,
|
||||
MetaWaylandPendingState *pending);
|
||||
|
||||
void meta_wayland_surface_queue_pending_frame_callbacks (MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_surface_queue_pending_state_frame_callbacks (MetaWaylandSurface *surface,
|
||||
@@ -306,4 +298,8 @@ void meta_wayland_surface_restore_shortcuts (MetaWaylandSurface *
|
||||
gboolean meta_wayland_surface_is_shortcuts_inhibited (MetaWaylandSurface *surface,
|
||||
MetaWaylandSeat *seat);
|
||||
|
||||
MetaSurfaceActor * meta_wayland_surface_get_actor (MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_surface_notify_geometry_changed (MetaWaylandSurface *surface);
|
||||
|
||||
#endif
|
||||
|
@@ -632,10 +632,13 @@ meta_wayland_tablet_tool_get_relative_coordinates (MetaWaylandTabletTool *tool,
|
||||
wl_fixed_t *sx,
|
||||
wl_fixed_t *sy)
|
||||
{
|
||||
MetaSurfaceActor *surface_actor;
|
||||
float xf, yf;
|
||||
|
||||
surface_actor = meta_wayland_surface_get_actor (surface);
|
||||
|
||||
clutter_event_get_coords (event, &xf, &yf);
|
||||
clutter_actor_transform_stage_point (CLUTTER_ACTOR (meta_surface_actor_get_texture (surface->surface_actor)),
|
||||
clutter_actor_transform_stage_point (CLUTTER_ACTOR (meta_surface_actor_get_texture (surface_actor)),
|
||||
xf, yf, &xf, &yf);
|
||||
|
||||
*sx = wl_fixed_from_double (xf) / surface->scale;
|
||||
|
@@ -191,11 +191,6 @@ xdg_toplevel_set_parent (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *transient_for = NULL;
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (parent_resource)
|
||||
{
|
||||
@@ -205,7 +200,7 @@ xdg_toplevel_set_parent (struct wl_client *client,
|
||||
transient_for = parent_surface->window;
|
||||
}
|
||||
|
||||
meta_window_set_transient_for (window, transient_for);
|
||||
meta_window_set_transient_for (surface->window, transient_for);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -214,16 +209,11 @@ xdg_toplevel_set_title (struct wl_client *client,
|
||||
const char *title)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!g_utf8_validate (title, -1, NULL))
|
||||
title = "";
|
||||
|
||||
meta_window_set_title (window, title);
|
||||
meta_window_set_title (surface->window, title);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -232,16 +222,11 @@ xdg_toplevel_set_app_id (struct wl_client *client,
|
||||
const char *app_id)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!g_utf8_validate (app_id, -1, NULL))
|
||||
app_id = "";
|
||||
|
||||
meta_window_set_wm_class (window, app_id, app_id);
|
||||
meta_window_set_wm_class (surface->window, app_id, app_id);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -254,20 +239,15 @@ xdg_toplevel_show_window_menu (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
int monitor_scale;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, FALSE, NULL, NULL))
|
||||
return;
|
||||
|
||||
monitor_scale = window->monitor->scale;
|
||||
meta_window_show_menu (window, META_WINDOW_MENU_WM,
|
||||
window->buffer_rect.x + (x * monitor_scale),
|
||||
window->buffer_rect.y + (y * monitor_scale));
|
||||
monitor_scale = surface->window->monitor->scale;
|
||||
meta_window_show_menu (surface->window, META_WINDOW_MENU_WM,
|
||||
surface->window->buffer_rect.x + (x * monitor_scale),
|
||||
surface->window->buffer_rect.y + (y * monitor_scale));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -278,13 +258,8 @@ xdg_toplevel_move (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
float x, y;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
|
||||
return;
|
||||
|
||||
@@ -323,14 +298,9 @@ xdg_toplevel_resize (struct wl_client *client,
|
||||
{
|
||||
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
gfloat x, y;
|
||||
MetaGrabOp grab_op;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
|
||||
return;
|
||||
|
||||
@@ -387,11 +357,7 @@ xdg_toplevel_set_maximized (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
MetaWindow *window = surface->window;
|
||||
|
||||
meta_window_force_placement (window, TRUE);
|
||||
meta_window_maximize (window, META_MAXIMIZE_BOTH);
|
||||
@@ -402,13 +368,8 @@ xdg_toplevel_unset_maximized (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
meta_window_unmaximize (window, META_MAXIMIZE_BOTH);
|
||||
meta_window_unmaximize (surface->window, META_MAXIMIZE_BOTH);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -417,11 +378,6 @@ xdg_toplevel_set_fullscreen (struct wl_client *client,
|
||||
struct wl_resource *output_resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (output_resource)
|
||||
{
|
||||
@@ -429,12 +385,12 @@ xdg_toplevel_set_fullscreen (struct wl_client *client,
|
||||
|
||||
if (output)
|
||||
{
|
||||
meta_window_move_to_monitor (window,
|
||||
meta_window_move_to_monitor (surface->window,
|
||||
output->logical_monitor->number);
|
||||
}
|
||||
}
|
||||
|
||||
meta_window_make_fullscreen (window);
|
||||
meta_window_make_fullscreen (surface->window);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -442,13 +398,8 @@ xdg_toplevel_unset_fullscreen (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
meta_window_unmake_fullscreen (window);
|
||||
meta_window_unmake_fullscreen (surface->window);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -456,13 +407,8 @@ xdg_toplevel_set_minimized (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
|
||||
MetaWindow *window;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
meta_window_minimize (window);
|
||||
meta_window_minimize (surface->window);
|
||||
}
|
||||
|
||||
static const struct xdg_toplevel_interface meta_wayland_xdg_toplevel_interface = {
|
||||
@@ -678,25 +624,13 @@ meta_wayland_xdg_toplevel_commit (MetaWaylandSurfaceRole *surface_role,
|
||||
MetaRectangle old_geometry;
|
||||
gboolean geometry_changed;
|
||||
|
||||
window = surface->window;
|
||||
if (!window)
|
||||
{
|
||||
meta_wayland_surface_cache_pending_frame_callbacks (surface, pending);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!surface->buffer_ref.buffer && xdg_surface_priv->first_buffer_attached)
|
||||
{
|
||||
MetaWaylandActorSurface *actor_surface =
|
||||
META_WAYLAND_ACTOR_SURFACE (xdg_toplevel);
|
||||
|
||||
meta_wayland_xdg_surface_reset (xdg_surface);
|
||||
meta_wayland_actor_surface_queue_frame_callbacks (actor_surface,
|
||||
pending);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
window = surface->window;
|
||||
old_geometry = xdg_surface_priv->geometry;
|
||||
|
||||
surface_role_class =
|
||||
@@ -778,9 +712,8 @@ meta_wayland_xdg_toplevel_reset (MetaWaylandXdgSurface *xdg_surface)
|
||||
surface = meta_wayland_surface_role_get_surface (surface_role);
|
||||
|
||||
meta_wayland_surface_destroy_window (surface);
|
||||
meta_wayland_surface_clear_surface_actor (surface);
|
||||
|
||||
meta_wayland_surface_create_surface_actor (surface);
|
||||
meta_wayland_actor_surface_reset_actor (META_WAYLAND_ACTOR_SURFACE (surface_role));
|
||||
window = meta_window_wayland_new (meta_get_display (), surface);
|
||||
meta_wayland_shell_surface_set_window (shell_surface, window);
|
||||
|
||||
@@ -1023,7 +956,6 @@ meta_wayland_xdg_popup_commit (MetaWaylandSurfaceRole *surface_role,
|
||||
if (!surface->buffer_ref.buffer && xdg_surface_priv->first_buffer_attached)
|
||||
{
|
||||
meta_wayland_xdg_surface_reset (xdg_surface);
|
||||
meta_wayland_surface_cache_pending_frame_callbacks (surface, pending);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -46,6 +46,7 @@
|
||||
#include "meta-wayland-inhibit-shortcuts.h"
|
||||
#include "meta-wayland-inhibit-shortcuts-dialog.h"
|
||||
#include "meta-xwayland-grab-keyboard.h"
|
||||
#include "meta-xwayland.h"
|
||||
|
||||
static MetaWaylandCompositor _meta_wayland_compositor;
|
||||
static char *_display_name_override;
|
||||
@@ -306,6 +307,8 @@ meta_wayland_compositor_init (MetaWaylandCompositor *compositor)
|
||||
{
|
||||
memset (compositor, 0, sizeof (MetaWaylandCompositor));
|
||||
wl_list_init (&compositor->frame_callbacks);
|
||||
|
||||
compositor->scheduled_surface_associations = g_hash_table_new (NULL, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -482,3 +485,62 @@ meta_wayland_compositor_flush_clients (MetaWaylandCompositor *compositor)
|
||||
{
|
||||
wl_display_flush_clients (compositor->wayland_display);
|
||||
}
|
||||
|
||||
static void on_scheduled_association_unmanaged (MetaWindow *window,
|
||||
gpointer user_data);
|
||||
|
||||
static void
|
||||
meta_wayland_compositor_remove_surface_association (MetaWaylandCompositor *compositor,
|
||||
int id)
|
||||
{
|
||||
MetaWindow *window;
|
||||
|
||||
window = g_hash_table_lookup (compositor->scheduled_surface_associations,
|
||||
GINT_TO_POINTER (id));
|
||||
if (window)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (window,
|
||||
on_scheduled_association_unmanaged,
|
||||
GINT_TO_POINTER (id));
|
||||
g_hash_table_remove (compositor->scheduled_surface_associations,
|
||||
GINT_TO_POINTER (id));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_scheduled_association_unmanaged (MetaWindow *window,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
|
||||
|
||||
meta_wayland_compositor_remove_surface_association (compositor,
|
||||
GPOINTER_TO_INT (user_data));
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_compositor_schedule_surface_association (MetaWaylandCompositor *compositor,
|
||||
int id,
|
||||
MetaWindow *window)
|
||||
{
|
||||
g_signal_connect (window, "unmanaged",
|
||||
G_CALLBACK (on_scheduled_association_unmanaged),
|
||||
GINT_TO_POINTER (id));
|
||||
g_hash_table_insert (compositor->scheduled_surface_associations,
|
||||
GINT_TO_POINTER (id), window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_compositor_notify_surface_id (MetaWaylandCompositor *compositor,
|
||||
int id,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
MetaWindow *window;
|
||||
|
||||
window = g_hash_table_lookup (compositor->scheduled_surface_associations,
|
||||
GINT_TO_POINTER (id));
|
||||
if (window)
|
||||
{
|
||||
meta_xwayland_associate_window_with_surface (window, surface);
|
||||
meta_wayland_compositor_remove_surface_association (compositor, id);
|
||||
}
|
||||
}
|
||||
|
@@ -65,5 +65,12 @@ gboolean meta_wayland_compositor_is_shortcuts_inhibited (MetaWayl
|
||||
|
||||
void meta_wayland_compositor_flush_clients (MetaWaylandCompositor *compositor);
|
||||
|
||||
void meta_wayland_compositor_schedule_surface_association (MetaWaylandCompositor *compositor,
|
||||
int id,
|
||||
MetaWindow *window);
|
||||
void meta_wayland_compositor_notify_surface_id (MetaWaylandCompositor *compositor,
|
||||
int id,
|
||||
MetaWaylandSurface *surface);
|
||||
|
||||
#endif
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user