Compare commits

..

11 Commits

Author SHA1 Message Date
Carlos Garnacho
8d75ea69e3 wayland: Use weak ref to keep track of buffers
Instead of using a one-shot signal meant to happen then the buffer
is being destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:10 +02:00
Carlos Garnacho
a7ee7559e4 compositor: Use redraw clip region to cull out children
This will avoid repainting too much of the background if the
bounding box turned out to be too large.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:10 +02:00
Carlos Garnacho
af3475f65f ClutterStage: Store clip area as a region
This will allow drawing optimizations as a region is more concrete
than the bounding rectangle.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:10 +02:00
Carlos Garnacho
77fd682c8b ClutterActor: Preserve valid paint volumes till the next relayout/repaint
Cuts down approximately 55% of paint volumes calculation when there's
windows that redraw frequently, but don't move.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:10 +02:00
Carlos Garnacho
fa8e4f60f6 compositor: Ensure to clip partial shadow redraws
Otherwise we end up drawing too far outside the clip area, which
brings in artifacts now that we have tighter regions instead of
an overlapping rect.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:10 +02:00
Carlos Garnacho
b98a8d9932 clutter: Avoid rounding compensation when invalidating 2D actors
This allows the redraw clip to be more constrained, so MetaCullable doesn't
end up rendering portions of window shadows, frame and background when a
window invalidates (part of) its contents.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:10 +02:00
Carlos Garnacho
864bc793aa cogl: Ensure to only clear the depth buffer if depth testing is enabled
The depth buffer is marked as invalid when 1) the framebuffer is just created,
and 2) whenever GL_DEPTH_TEST is enabled on it. This will ensure the
framebuffers attached depth buffer (if any) is properly cleared before it's
actually used, while saving needless clears while depth testing is disabled
(the default).

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:10 +02:00
Carlos Garnacho
e5b06754e0 compositor: Remove MetaSurfaceActor::repaint-scheduled signal
It's unused now.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:09 +02:00
Carlos Garnacho
3402c50625 compositor: Use queue_redraw vmethod over repaint-scheduled signal
https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:09 +02:00
Carlos Garnacho
060543466c compositor: Avoid changing pipeline/source if shadow is not being painted
Avoids some context invalidations in cogl.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:09 +02:00
Carlos Garnacho
65e816908a clutter: Add ClutterPaintVolume argument to ClutterActor::queue_redraw
This is an ABI break, hopefully an unimportant one since this signal/vmethod
is barely overridden.

The signal has been added an extra ClutterPaintVolume argument, and has been
given a boolean return value. The recursion to the parents has been taken
out of the default implementation and into the caller, using the returned
boolean parameter to control further propagation.

Passing the ClutterPaintVolume is easier on performance, as we don't need
setting this pointer as gobject data just to retrieve/unset it further
in propagation.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:43:09 +02:00
179 changed files with 12700 additions and 18530 deletions

103
NEWS
View File

@@ -1,106 +1,3 @@
3.25.91
=======
* Reduce memory use of suspended instances [Jonas; #786299]
* Make supported scales determination saner [Rui; #786474]
* Fix crash on inhibit-shortcuts dialog reponse [Jonas; #786385]
* Support libinput's tag-and-drag setting [freeroot; #775755]
* Avoid overlapping keybindings with multiple layouts [Jonas; #786408]
* Fix non-transformed cursor on rotated monitors [Jonas; #786023]
* Avoid unnecessary work during background painting [Alessandro; #783512]
* Misc. bug fixes [Alberts, Jonas, Mario; #691611, #786300, #777732, #786568]
Contributors:
freeroot, Jonas Ådahl, Alessandro Bono, Carlos Garnacho, Rui Matos,
Alberts Muktupāvels, Mario Sanchez Prada
Translations:
Muhammet Kara [tr], Claude Paroz [fr], Мирослав Николић [sr, sr@latin],
Pawan Chitrakar [ne], Kukuh Syafaat [id]
3.25.90
=======
* Add zwp_linux_dmabuf_v1 support [Daniel; #785262]
* Add (x)wayland shortcut inhibitor support [Olivier; #783342]
* Misc. bug fixes [Daniel, Carlos, Cosimo; #785263, #785347, #767805]
Contributors:
Jonas Ådahl, Cosimo Cecchi, Olivier Fourdan, Carlos Garnacho, Daniel Stone
Translations:
Fabio Tomat [fur], Kukuh Syafaat [id], Aurimas Černius [lt],
Daniel Mustieles [es], Baurzhan Muftakhidinov [kk], Jordi Mas [ca],
Matej Urbančič [sl], Marek Cernocky [cs], gogo [hr], Fran Dieguez [gl],
Balázs Meskó [hu]
3.25.4
======
* Do not throttle motion events on tablet tools [Carlos; #783535]
* Handle left-handed mode on pen/eraser devices [Carlos; #782027]
* Add wl_surface.damage_buffer() support [Jonas; #784080]
* Fix crash when moving across on-adjacent monitors [Jonas; #783630]
* Fix window moving/resizing via tablet tools [Jason; #777333]
* Support fractional monitor scaling [Jonas, Marco; #765011]
* Keep override-redirect windows stacked on top [Rui; #780485]
* Implement tablet rings/strips configuration [Carlos; #782033]
* Support tablet wheel events on wayland [Jason; #783716]
* Move g-s-d xrandr functionality into mutter [Rui; #781906]
* Misc. bug fixes [Florian, Jason, Miguel, Carlos, Jonas; #783502, #784009,
#784223, #784272, #784402, #784881, #762083, #784867, #781723]
Contributors:
Jonas Ådahl, Miguel A. Vico, Emmanuele Bassi, Carlos Garnacho, Jason Gerecke,
Rui Matos, Florian Müllner, Marco Trevisan (Treviño)
3.25.3
======
* Ignore hotplug-mode-update value on startup [Marco; #783073]
* Implement configurable monitor scales on X11 [Jonas; #777732]
* Fix handling of tiled monitors [Jonas; #781723]
* Handle multiple keycodes for keysym [Christian; #781223]
* Consider subsurfaces when grabbing [mindtree; #781811]
* Fix logic for HiPDPI scaling of TV outputs [Christian; #777347]
* Fix handling of left-handed mode on pen/eraser devices [Carlos; #782027]
* Fix output cycling in non-display-attached tablets [Carlos; #782032]
* Fix wacom cursor offset on wayland [Jason; #784009]
* Handle EXIF orientation of backgrounds [Silvère; #783125]
* Misc. bug fixes [Piotr, Tim, Bastien, Jonas, Florian, Benoit, Carlos; #772218,
#783161, #780407, #783113, #783293, #783505, #781703]
Contributors:
mitchmindtree, Jonas Ådahl, Ikey Doherty, Piotr Drąg, Carlos Garnacho,
Jason Gerecke, Benoit Gschwind, Christian Kellner, Silvère Latchurié,
Tim Lunn, Florian Müllner, Bastien Nocera, Marco Trevisan (Treviño)
Translations:
Fabio Tomat [fur], Kukuh Syafaat [id], Khaled Hosny [ar],
Daniel Mustieles [es]
3.25.2
======
* Fix frame updates on hide-titlebar-when-maximized changes [Florian; #781862]
* Fix accessible screen coordinates on X11 [Florian; #781902]
* Use less CPU when rendering fast-updating windows [Carlos, Emmanuele; #782344]
* Compute geometry of clients that don't set one explicitly [Olivier; #782213]
* Fix copy+paste of UTF8 strings between X11 and wayland [Carlos; #782472]
* Fix non-wayland builds [Chris; #780533]
* Add plugin vfunc to implement a custom force-quit dialog [Carlos; #711619]
* Fix swapped red and blue channels in CoglTexture data [Carlos; #779234
* Fix build where libtool's link_all_deplibs defaults to 'no' [Marco; #782821]
* Fix glitches when opening a window maximized [Olivier; #781353, #782183]
* Fix wrong cursor after window underneath the pointer changed [Carlos; #755164]
* Implement support for disable-while-typing option [Evan; #764852]
* Emit size-change signal when tiling [Alessandro; #782968]
* Misc. bug fixes [Nigel, Matthias, Jonas; #759085, #780215, #782156, #782152]
Contributors:
Jonas Ådahl, Emmanuele Bassi, Alessandro Bono, Olivier Fourdan,
Carlos Garnacho, Matthias Liertzer, Florian Müllner, Nigel Taylor,
Marco Trevisan (Treviño), Chris Vine, Evan Welsh
Translations:
Fabio Tomat [fur], Jordi Mas [ca], Mario Blättermann [de],
Emin Tufan Çetin [tr], Balázs Úr [hu]
3.25.1
======
* Always sync window geometry on state changes [Jonas; #780292]

View File

@@ -34,7 +34,6 @@ stamp-marshal: $(marshal_list)
$(AM_V_GEN)$(GLIB_GENMARSHAL) \
--prefix=$(glib_marshal_prefix) \
--header \
--valist-marshallers \
$(marshal_list) > xgen-mh \
&& (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \
&& rm -f xgen-mh \
@@ -47,8 +46,6 @@ $(marshal_c): $(marshal_h)
$(AM_V_GEN)$(GLIB_GENMARSHAL) \
--prefix=$(glib_marshal_prefix) \
--body \
--valist-marshallers \
--prototypes \
$(marshal_list) > xgen-mc \
&& (cmp -s xgen-mc $(marshal_c) || cp -f xgen-mc $(marshal_c)) \
&& rm -f xgen-mc

View File

@@ -283,9 +283,6 @@ void _clutter_actor_queue_redraw_full
ClutterPaintVolume *volume,
ClutterEffect *effect);
ClutterPaintVolume * _clutter_actor_get_queue_redraw_clip (ClutterActor *self);
void _clutter_actor_set_queue_redraw_clip (ClutterActor *self,
ClutterPaintVolume *clip_volume);
void _clutter_actor_finish_queue_redraw (ClutterActor *self,
ClutterPaintVolume *clip);

View File

@@ -840,6 +840,7 @@ struct _ClutterActorPrivate
guint needs_compute_expand : 1;
guint needs_x_expand : 1;
guint needs_y_expand : 1;
guint needs_paint_volume_update : 1;
};
enum
@@ -2619,6 +2620,7 @@ clutter_actor_real_allocate (ClutterActor *self,
g_object_freeze_notify (G_OBJECT (self));
changed = clutter_actor_set_allocation_internal (self, box, flags);
priv->needs_paint_volume_update = changed;
/* we allocate our children before we notify changes in our geometry,
* so that people connecting to properties will be able to get valid
@@ -2641,9 +2643,12 @@ clutter_actor_real_allocate (ClutterActor *self,
}
static void
_clutter_actor_signal_queue_redraw (ClutterActor *self,
ClutterActor *origin)
_clutter_actor_propagate_queue_redraw (ClutterActor *self,
ClutterActor *origin,
ClutterPaintVolume *pv)
{
gboolean stop = FALSE;
/* no point in queuing a redraw on a destroyed actor */
if (CLUTTER_ACTOR_IN_DESTRUCTION (self))
return;
@@ -2652,27 +2657,33 @@ _clutter_actor_signal_queue_redraw (ClutterActor *self,
* the actor bas been cloned. In this case the clone will need to
* receive the signal so it can queue its own redraw.
*/
while (self)
{
_clutter_actor_queue_redraw_on_clones (self);
_clutter_actor_queue_redraw_on_clones (self);
/* calls klass->queue_redraw in default handler */
if (g_signal_has_handler_pending (self, actor_signals[QUEUE_REDRAW],
/* calls klass->queue_redraw in default handler */
if (g_signal_has_handler_pending (self, actor_signals[QUEUE_REDRAW],
0, TRUE))
{
g_signal_emit (self, actor_signals[QUEUE_REDRAW], 0, origin);
}
else
{
CLUTTER_ACTOR_GET_CLASS (self)->queue_redraw (self, origin);
{
g_signal_emit (self, actor_signals[QUEUE_REDRAW], 0, origin, pv, &stop);
}
else
{
stop = CLUTTER_ACTOR_GET_CLASS (self)->queue_redraw (self, origin, pv);
}
if (stop)
break;
self = clutter_actor_get_parent (self);
}
}
static void
clutter_actor_real_queue_redraw (ClutterActor *self,
ClutterActor *origin)
static gboolean
clutter_actor_real_queue_redraw (ClutterActor *self,
ClutterActor *origin,
ClutterPaintVolume *paint_volume)
{
ClutterActor *parent;
CLUTTER_NOTE (PAINT, "Redraw queued on '%s' (from: '%s')",
_clutter_actor_get_debug_name (self),
origin != NULL ? _clutter_actor_get_debug_name (origin)
@@ -2680,13 +2691,14 @@ clutter_actor_real_queue_redraw (ClutterActor *self,
/* no point in queuing a redraw on a destroyed actor */
if (CLUTTER_ACTOR_IN_DESTRUCTION (self))
return;
return TRUE;
/* If the queue redraw is coming from a child then the actor has
become dirty and any queued effect is no longer valid */
if (self != origin)
{
self->priv->is_dirty = TRUE;
self->priv->needs_paint_volume_update = TRUE;
self->priv->effect_to_redraw = NULL;
}
@@ -2695,7 +2707,7 @@ clutter_actor_real_queue_redraw (ClutterActor *self,
* won't change so we don't have to propagate up the hierarchy.
*/
if (!CLUTTER_ACTOR_IS_VISIBLE (self))
return;
return TRUE;
/* Although we could determine here that a full stage redraw
* has already been queued and immediately bail out, we actually
@@ -2709,7 +2721,7 @@ clutter_actor_real_queue_redraw (ClutterActor *self,
ClutterActor *stage = _clutter_actor_get_stage_internal (self);
if (stage != NULL &&
_clutter_stage_has_full_redraw_queued (CLUTTER_STAGE (stage)))
return;
return TRUE;
}
self->priv->propagated_one_redraw = TRUE;
@@ -2717,12 +2729,7 @@ clutter_actor_real_queue_redraw (ClutterActor *self,
/* notify parents, if they are all visible eventually we'll
* queue redraw on the stage, which queues the redraw idle.
*/
parent = clutter_actor_get_parent (self);
if (parent != NULL)
{
/* this will go up recursively */
_clutter_actor_signal_queue_redraw (parent, origin);
}
return FALSE;
}
static void
@@ -8011,10 +8018,12 @@ clutter_actor_class_init (ClutterActorClass *klass)
G_SIGNAL_RUN_LAST |
G_SIGNAL_NO_HOOKS,
G_STRUCT_OFFSET (ClutterActorClass, queue_redraw),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
CLUTTER_TYPE_ACTOR);
g_signal_accumulator_true_handled,
NULL,
_clutter_marshal_BOOLEAN__OBJECT_BOXED,
G_TYPE_BOOLEAN, 2,
CLUTTER_TYPE_ACTOR,
CLUTTER_TYPE_PAINT_VOLUME);
/**
* ClutterActor::queue-relayout:
@@ -8519,6 +8528,7 @@ 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;
@@ -8612,8 +8622,7 @@ _clutter_actor_finish_queue_redraw (ClutterActor *self,
ClutterPaintVolume *clip)
{
ClutterActorPrivate *priv = self->priv;
ClutterPaintVolume *pv;
gboolean clipped;
ClutterPaintVolume *pv = NULL;
/* Remove queue entry early in the process, otherwise a new
queue_redraw() during signal handling could put back this
@@ -8640,8 +8649,7 @@ _clutter_actor_finish_queue_redraw (ClutterActor *self,
*/
if (clip)
{
_clutter_actor_set_queue_redraw_clip (self, clip);
clipped = TRUE;
pv = clip;
}
else if (G_LIKELY (priv->last_paint_volume_valid))
{
@@ -8651,36 +8659,12 @@ _clutter_actor_finish_queue_redraw (ClutterActor *self,
ClutterActor *stage = _clutter_actor_get_stage_internal (self);
/* make sure we redraw the actors old position... */
_clutter_actor_set_queue_redraw_clip (stage,
&priv->last_paint_volume);
_clutter_actor_signal_queue_redraw (stage, stage);
_clutter_actor_set_queue_redraw_clip (stage, NULL);
/* XXX: Ideally the redraw signal would take a clip volume
* argument, but that would be an ABI break. Until we can
* break the ABI we pass the argument out-of-band
*/
/* setup the clip for the actors new position... */
_clutter_actor_set_queue_redraw_clip (self, pv);
clipped = TRUE;
_clutter_actor_propagate_queue_redraw (stage, stage,
&priv->last_paint_volume);
}
else
clipped = FALSE;
}
else
clipped = FALSE;
_clutter_actor_signal_queue_redraw (self, self);
/* Just in case anyone is manually firing redraw signals without
* using the public queue_redraw() API we are careful to ensure that
* our out-of-band clip member is cleared before returning...
*
* Note: A NULL clip denotes a full-stage, un-clipped redraw
*/
if (G_LIKELY (clipped))
_clutter_actor_set_queue_redraw_clip (self, NULL);
_clutter_actor_propagate_queue_redraw (self, self, pv);
}
static void
@@ -8841,8 +8825,7 @@ _clutter_actor_queue_redraw_full (ClutterActor *self,
{
/* NB: NULL denotes an undefined clip which will result in a
* full redraw... */
_clutter_actor_set_queue_redraw_clip (self, NULL);
_clutter_actor_signal_queue_redraw (self, self);
_clutter_actor_propagate_queue_redraw (self, self, NULL);
return;
}
@@ -8916,6 +8899,7 @@ _clutter_actor_queue_redraw_full (ClutterActor *self,
}
priv->is_dirty = TRUE;
priv->needs_paint_volume_update = TRUE;
}
/**
@@ -12973,6 +12957,7 @@ clutter_actor_add_child_internal (ClutterActor *self,
child->priv->needs_width_request = TRUE;
child->priv->needs_height_request = TRUE;
child->priv->needs_allocation = TRUE;
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
@@ -16650,26 +16635,6 @@ clutter_actor_has_pointer (ClutterActor *self)
return self->priv->has_pointer;
}
/* XXX: This is a workaround for not being able to break the ABI of
* the QUEUE_REDRAW signal. It is an out-of-band argument. See
* clutter_actor_queue_clipped_redraw() for details.
*/
ClutterPaintVolume *
_clutter_actor_get_queue_redraw_clip (ClutterActor *self)
{
return g_object_get_data (G_OBJECT (self),
"-clutter-actor-queue-redraw-clip");
}
void
_clutter_actor_set_queue_redraw_clip (ClutterActor *self,
ClutterPaintVolume *clip)
{
g_object_set_data (G_OBJECT (self),
"-clutter-actor-queue-redraw-clip",
clip);
}
/**
* clutter_actor_has_allocation:
* @self: a #ClutterActor
@@ -17516,16 +17481,22 @@ _clutter_actor_get_paint_volume_mutable (ClutterActor *self)
priv = self->priv;
if (priv->paint_volume_valid)
clutter_paint_volume_free (&priv->paint_volume);
{
if (!priv->needs_paint_volume_update)
return &priv->paint_volume;
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
{
priv->paint_volume_valid = FALSE;
priv->needs_paint_volume_update = FALSE;
return NULL;
}
}

View File

@@ -236,8 +236,9 @@ struct _ClutterActorClass
void (* pick) (ClutterActor *actor,
const ClutterColor *color);
void (* queue_redraw) (ClutterActor *actor,
ClutterActor *leaf_that_queued);
gboolean (* queue_redraw) (ClutterActor *actor,
ClutterActor *leaf_that_queued,
ClutterPaintVolume *paint_volume);
/* size negotiation */
void (* get_preferred_width) (ClutterActor *self,

View File

@@ -2179,61 +2179,3 @@ clutter_event_get_mode_group (const ClutterEvent *event)
return 0;
}
}
/**
* clutter_event_get_pad_event_details:
* @event: a pad event
* @number: (out) (optional): ring/strip/button number
* @mode: (out) (optional): pad mode as per the event
* @value: (out) (optional): event axis value
*
* Returns the details of a pad event.
*
* Returns: #TRUE if event details could be obtained
**/
gboolean
clutter_event_get_pad_event_details (const ClutterEvent *event,
guint *number,
guint *mode,
gdouble *value)
{
guint n, m;
gdouble v;
g_return_val_if_fail (event != NULL, FALSE);
g_return_val_if_fail (event->type == CLUTTER_PAD_BUTTON_PRESS ||
event->type == CLUTTER_PAD_BUTTON_RELEASE ||
event->type == CLUTTER_PAD_RING ||
event->type == CLUTTER_PAD_STRIP, FALSE);
switch (event->type)
{
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
n = event->pad_button.button;
m = event->pad_button.mode;
v = 0.0;
break;
case CLUTTER_PAD_RING:
n = event->pad_ring.ring_number;
m = event->pad_ring.mode;
v = event->pad_ring.angle;
break;
case CLUTTER_PAD_STRIP:
n = event->pad_strip.strip_number;
m = event->pad_strip.mode;
v = event->pad_strip.value;
break;
default:
return FALSE;
}
if (number)
*number = n;
if (mode)
*mode = m;
if (value)
*value = v;
return TRUE;
}

View File

@@ -778,12 +778,6 @@ ClutterScrollFinishFlags clutter_event_get_scroll_finish_flags (const Clut
CLUTTER_AVAILABLE_IN_ALL
guint clutter_event_get_mode_group (const ClutterEvent *event);
CLUTTER_AVAILABLE_IN_MUTTER
gboolean clutter_event_get_pad_event_details (const ClutterEvent *event,
guint *number,
guint *mode,
gdouble *value);
G_END_DECLS

View File

@@ -2243,15 +2243,10 @@ clutter_input_device_get_device_node (ClutterInputDevice *device)
ClutterInputDeviceMapping
clutter_input_device_get_mapping_mode (ClutterInputDevice *device)
{
ClutterInputDeviceType device_type;
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device),
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE);
device_type = clutter_input_device_get_device_type (device);
g_return_val_if_fail (device_type == CLUTTER_TABLET_DEVICE ||
device_type == CLUTTER_PEN_DEVICE ||
device_type == CLUTTER_ERASER_DEVICE,
g_return_val_if_fail (clutter_input_device_get_device_type (device) ==
CLUTTER_TABLET_DEVICE,
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE);
return device->mapping_mode;
@@ -2261,14 +2256,9 @@ void
clutter_input_device_set_mapping_mode (ClutterInputDevice *device,
ClutterInputDeviceMapping mapping)
{
ClutterInputDeviceType device_type;
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
device_type = clutter_input_device_get_device_type (device);
g_return_if_fail (device_type == CLUTTER_TABLET_DEVICE ||
device_type == CLUTTER_PEN_DEVICE ||
device_type == CLUTTER_ERASER_DEVICE);
g_return_if_fail (clutter_input_device_get_device_type (device) ==
CLUTTER_TABLET_DEVICE);
if (device->mapping_mode == mapping)
return;

View File

@@ -1,6 +1,7 @@
BOOLEAN:BOXED
BOOLEAN:BOXED,INT,INT
BOOLEAN:OBJECT,BOOLEAN
BOOLEAN:OBJECT,BOXED
BOOLEAN:OBJECT,BOXED,DOUBLE
BOOLEAN:OBJECT,DOUBLE
BOOLEAN:OBJECT,ENUM

View File

@@ -1166,6 +1166,21 @@ _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.

View File

@@ -20,7 +20,6 @@
#include "clutter/clutter-stage-view.h"
#include <cairo-gobject.h>
#include <math.h>
enum
{
@@ -39,7 +38,7 @@ static GParamSpec *obj_props[PROP_LAST];
typedef struct _ClutterStageViewPrivate
{
cairo_rectangle_int_t layout;
float scale;
int scale;
CoglFramebuffer *framebuffer;
CoglOffscreen *offscreen;
@@ -144,7 +143,7 @@ clutter_stage_view_blit_offscreen (ClutterStageView *view,
cogl_framebuffer_pop_matrix (priv->framebuffer);
}
float
int
clutter_stage_view_get_scale (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
@@ -242,7 +241,7 @@ clutter_stage_view_get_property (GObject *object,
g_value_set_boxed (value, priv->offscreen);
break;
case PROP_SCALE:
g_value_set_float (value, priv->scale);
g_value_set_int (value, priv->scale);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -267,29 +266,13 @@ clutter_stage_view_set_property (GObject *object,
priv->layout = *layout;
break;
case PROP_FRAMEBUFFER:
g_clear_pointer (&priv->framebuffer, cogl_object_unref);
priv->framebuffer = g_value_dup_boxed (value);
#ifndef G_DISABLE_CHECKS
if (priv->framebuffer)
{
int fb_width, fb_height;
fb_width = cogl_framebuffer_get_width (priv->framebuffer);
fb_height = cogl_framebuffer_get_height (priv->framebuffer);
g_warn_if_fail (fabsf (roundf (fb_width / priv->scale) -
fb_width / priv->scale) < FLT_EPSILON);
g_warn_if_fail (fabsf (roundf (fb_height / priv->scale) -
fb_height / priv->scale) < FLT_EPSILON);
}
#endif
break;
case PROP_OFFSCREEN:
g_clear_pointer (&priv->offscreen, cogl_object_unref);
priv->offscreen = g_value_dup_boxed (value);
break;
case PROP_SCALE:
priv->scale = g_value_get_float (value);
priv->scale = g_value_get_int (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -318,7 +301,7 @@ clutter_stage_view_init (ClutterStageView *view)
priv->dirty_viewport = TRUE;
priv->dirty_projection = TRUE;
priv->scale = 1.0;
priv->scale = 1;
}
static void
@@ -339,7 +322,6 @@ clutter_stage_view_class_init (ClutterStageViewClass *klass)
"The view layout on the screen",
CAIRO_GOBJECT_TYPE_RECTANGLE_INT,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS);
obj_props[PROP_FRAMEBUFFER] =
@@ -348,7 +330,6 @@ clutter_stage_view_class_init (ClutterStageViewClass *klass)
"The front buffer of the view",
COGL_TYPE_HANDLE,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS);
obj_props[PROP_OFFSCREEN] =
@@ -357,17 +338,16 @@ clutter_stage_view_class_init (ClutterStageViewClass *klass)
"Framebuffer used as intermediate buffer",
COGL_TYPE_HANDLE,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
obj_props[PROP_SCALE] =
g_param_spec_float ("scale",
"View scale",
"The view scale",
0.5, G_MAXFLOAT, 1.0,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS);
g_param_spec_int ("scale",
"View scale",
"The view scale",
1, G_MAXINT, 1,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, PROP_LAST, obj_props);
}

View File

@@ -61,7 +61,7 @@ void clutter_stage_view_blit_offscreen (ClutterStageView *view,
const cairo_rectangle_int_t *clip);
CLUTTER_AVAILABLE_IN_MUTTER
float clutter_stage_view_get_scale (ClutterStageView *view);
int clutter_stage_view_get_scale (ClutterStageView *view);
gboolean clutter_stage_view_is_dirty_viewport (ClutterStageView *view);

View File

@@ -231,19 +231,35 @@ _clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *window)
return TRUE;
}
gboolean
_clutter_stage_window_get_redraw_clip_bounds (ClutterStageWindow *window,
cairo_rectangle_int_t *stage_clip)
cairo_region_t *
_clutter_stage_window_get_redraw_clip (ClutterStageWindow *window)
{
ClutterStageWindowIface *iface;
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->get_redraw_clip_bounds != NULL)
return iface->get_redraw_clip_bounds (window, stage_clip);
if (iface->get_redraw_clip != NULL)
return iface->get_redraw_clip (window);
return FALSE;
return NULL;
}
gboolean
_clutter_stage_window_get_redraw_clip_bounds (ClutterStageWindow *window,
cairo_rectangle_int_t *stage_clip)
{
cairo_region_t *redraw_clip;
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
redraw_clip = _clutter_stage_window_get_redraw_clip (window);
if (!redraw_clip)
return FALSE;
cairo_region_get_extents (redraw_clip, stage_clip);
cairo_region_destroy (redraw_clip);
return TRUE;
}
void

View File

@@ -68,9 +68,7 @@ struct _ClutterStageWindowIface
cairo_rectangle_int_t *stage_rectangle);
gboolean (* has_redraw_clips) (ClutterStageWindow *stage_window);
gboolean (* ignoring_redraw_clips) (ClutterStageWindow *stage_window);
gboolean (* get_redraw_clip_bounds) (ClutterStageWindow *stage_window,
cairo_rectangle_int_t *clip);
cairo_region_t * (* get_redraw_clip) (ClutterStageWindow *stage_window);
void (* set_accept_focus) (ClutterStageWindow *stage_window,
gboolean accept_focus);
@@ -125,6 +123,7 @@ gboolean _clutter_stage_window_has_redraw_clips (ClutterStageWin
gboolean _clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *window);
gboolean _clutter_stage_window_get_redraw_clip_bounds (ClutterStageWindow *window,
cairo_rectangle_int_t *clip);
cairo_region_t * _clutter_stage_window_get_redraw_clip (ClutterStageWindow *window);
void _clutter_stage_window_set_accept_focus (ClutterStageWindow *window,
gboolean accept_focus);

View File

@@ -161,7 +161,6 @@ struct _ClutterStagePrivate
guint accept_focus : 1;
guint motion_events_enabled : 1;
guint has_custom_perspective : 1;
guint stage_was_relayout : 1;
};
enum
@@ -962,7 +961,6 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
ClutterEvent *next_event;
ClutterInputDevice *device;
ClutterInputDevice *next_device;
ClutterInputDeviceType device_type;
gboolean check_device = FALSE;
event = l->data;
@@ -978,16 +976,8 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
if (device != NULL && next_device != NULL)
check_device = TRUE;
device_type = clutter_input_device_get_device_type (device);
/* Skip consecutive motion events coming from the same device,
* except those of tablet tools, since users of these events
* want no precision loss.
*/
if (priv->throttle_motion_events && next_event != NULL &&
device_type != CLUTTER_TABLET_DEVICE &&
device_type != CLUTTER_PEN_DEVICE &&
device_type != CLUTTER_ERASER_DEVICE)
/* Skip consecutive motion events coming from the same device */
if (priv->throttle_motion_events && next_event != NULL)
{
if (event->type == CLUTTER_MOTION &&
(next_event->type == CLUTTER_MOTION ||
@@ -1069,7 +1059,6 @@ _clutter_stage_maybe_relayout (ClutterActor *actor)
if (!CLUTTER_ACTOR_IN_RELAYOUT (stage))
{
priv->relayout_pending = FALSE;
priv->stage_was_relayout = TRUE;
CLUTTER_NOTE (ACTOR, "Recomputing layout");
@@ -1140,58 +1129,6 @@ clutter_stage_do_redraw (ClutterStage *stage)
stage);
}
static GSList *
_clutter_stage_check_updated_pointers (ClutterStage *stage)
{
ClutterStagePrivate *priv = stage->priv;
ClutterDeviceManager *device_manager;
GSList *updating = NULL;
const GSList *devices;
cairo_rectangle_int_t clip;
ClutterPoint point;
gboolean has_clip;
has_clip = _clutter_stage_window_get_redraw_clip_bounds (priv->impl, &clip);
device_manager = clutter_device_manager_get_default ();
devices = clutter_device_manager_peek_devices (device_manager);
for (; devices != NULL; devices = devices->next)
{
ClutterInputDevice *dev = devices->data;
if (clutter_input_device_get_device_mode (dev) !=
CLUTTER_INPUT_MODE_MASTER)
continue;
switch (clutter_input_device_get_device_type (dev))
{
case CLUTTER_POINTER_DEVICE:
case CLUTTER_TABLET_DEVICE:
case CLUTTER_PEN_DEVICE:
case CLUTTER_ERASER_DEVICE:
case CLUTTER_CURSOR_DEVICE:
if (!clutter_input_device_get_coords (dev, NULL, &point))
continue;
if (!has_clip ||
(point.x >= clip.x && point.x < clip.x + clip.width &&
point.y >= clip.y && point.y < clip.y + clip.height))
updating = g_slist_prepend (updating, dev);
break;
default:
/* Any other devices don't need checking, either because they
* don't have x/y coordinates, or because they're implicitly
* grabbed on an actor by default as it's the case of
* touch(screens).
*/
break;
}
}
return updating;
}
/**
* _clutter_stage_do_update:
* @stage: A #ClutterStage
@@ -1204,10 +1141,6 @@ gboolean
_clutter_stage_do_update (ClutterStage *stage)
{
ClutterStagePrivate *priv = stage->priv;
gboolean stage_was_relayout = priv->stage_was_relayout;
GSList *pointers = NULL;
priv->stage_was_relayout = FALSE;
/* if the stage is being destroyed, or if the destruction already
* happened and we don't have an StageWindow any more, then we
@@ -1228,9 +1161,6 @@ _clutter_stage_do_update (ClutterStage *stage)
if (!priv->redraw_pending)
return FALSE;
if (stage_was_relayout)
pointers = _clutter_stage_check_updated_pointers (stage);
clutter_stage_maybe_finish_queue_redraws (stage);
clutter_stage_do_redraw (stage);
@@ -1248,12 +1178,6 @@ _clutter_stage_do_update (ClutterStage *stage)
}
#endif /* CLUTTER_ENABLE_DEBUG */
while (pointers)
{
_clutter_input_device_update (pointers->data, NULL, TRUE);
pointers = g_slist_delete_link (pointers, pointers);
}
return TRUE;
}
@@ -1275,45 +1199,44 @@ clutter_stage_real_queue_relayout (ClutterActor *self)
parent_class->queue_relayout (self);
}
static void
clutter_stage_real_queue_redraw (ClutterActor *actor,
ClutterActor *leaf)
static gboolean
clutter_stage_real_queue_redraw (ClutterActor *actor,
ClutterActor *leaf,
ClutterPaintVolume *redraw_clip)
{
ClutterStage *stage = CLUTTER_STAGE (actor);
ClutterStageWindow *stage_window;
ClutterPaintVolume *redraw_clip;
ClutterActorBox bounding_box;
ClutterActorBox intersection_box;
cairo_rectangle_int_t geom, stage_clip;
if (CLUTTER_ACTOR_IN_DESTRUCTION (actor))
return;
return TRUE;
/* If the backend can't do anything with redraw clips (e.g. it already knows
* it needs to redraw everything anyway) then don't spend time transforming
* any clip volume into stage coordinates... */
stage_window = _clutter_stage_get_window (stage);
if (stage_window == NULL)
return;
return TRUE;
if (_clutter_stage_window_ignoring_redraw_clips (stage_window))
{
_clutter_stage_window_add_redraw_clip (stage_window, NULL);
return;
return FALSE;
}
/* Convert the clip volume into stage coordinates and then into an
* axis aligned stage coordinates bounding box...
*/
redraw_clip = _clutter_actor_get_queue_redraw_clip (leaf);
if (redraw_clip == NULL)
{
_clutter_stage_window_add_redraw_clip (stage_window, NULL);
return;
return FALSE;
}
if (redraw_clip->is_empty)
return;
return TRUE;
_clutter_paint_volume_get_stage_paint_box (redraw_clip,
stage,
@@ -1329,7 +1252,7 @@ clutter_stage_real_queue_redraw (ClutterActor *actor,
/* There is no need to track degenerate/empty redraw clips */
if (intersection_box.x2 <= intersection_box.x1 ||
intersection_box.y2 <= intersection_box.y1)
return;
return TRUE;
/* when converting to integer coordinates make sure we round the edges of the
* clip rectangle outwards... */
@@ -1339,6 +1262,7 @@ clutter_stage_real_queue_redraw (ClutterActor *actor,
stage_clip.height = intersection_box.y2 - stage_clip.y;
_clutter_stage_window_add_redraw_clip (stage_window, &stage_clip);
return FALSE;
}
gboolean
@@ -1391,6 +1315,31 @@ clutter_stage_get_redraw_clip_bounds (ClutterStage *stage,
}
}
cairo_region_t *
clutter_stage_get_redraw_clip (ClutterStage *stage)
{
ClutterStagePrivate *priv;
cairo_rectangle_int_t clip;
cairo_region_t *region;
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), NULL);
priv = stage->priv;
region = _clutter_stage_window_get_redraw_clip (priv->impl);
if (region)
return region;
if (!region)
{
/* Set clip to the full extents of the stage */
_clutter_stage_window_get_geometry (priv->impl, &clip);
region = cairo_region_create_rectangle (&clip);
}
return region;
}
static void
read_pixels_to_file (char *filename_stem,
int x,
@@ -1445,9 +1394,9 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
gint read_x;
gint read_y;
float fb_width, fb_height;
float fb_scale;
float viewport_offset_x;
float viewport_offset_y;
int fb_scale;
int viewport_offset_x;
int viewport_offset_y;
priv = stage->priv;
@@ -1474,8 +1423,8 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
if (G_LIKELY (!(clutter_pick_debug_flags & CLUTTER_DEBUG_DUMP_PICK_BUFFERS)))
{
CLUTTER_NOTE (PICK, "Pushing pick scissor clip x: %d, y: %d, 1x1",
(int) dirty_x * fb_scale,
(int) dirty_y * fb_scale);
dirty_x * fb_scale,
dirty_y * fb_scale);
cogl_framebuffer_push_scissor_clip (fb, dirty_x * fb_scale, dirty_y * fb_scale, 1, 1);
}
@@ -3622,9 +3571,9 @@ _clutter_stage_maybe_setup_viewport (ClutterStage *stage,
{
cairo_rectangle_int_t view_layout;
ClutterPerspective perspective;
float fb_scale;
float viewport_offset_x;
float viewport_offset_y;
int fb_scale;
int viewport_offset_x;
int viewport_offset_y;
float z_2d;
CLUTTER_NOTE (PAINT,
@@ -4720,7 +4669,6 @@ capture_view (ClutterStage *stage,
int stride;
CoglBitmap *bitmap;
cairo_rectangle_int_t view_layout;
float view_scale;
framebuffer = clutter_stage_view_get_framebuffer (view);
@@ -4731,11 +4679,8 @@ capture_view (ClutterStage *stage,
clutter_stage_do_paint_view (stage, view, rect);
}
view_scale = clutter_stage_view_get_scale (view);
image = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
rect->width * view_scale,
rect->height * view_scale);
cairo_surface_set_device_scale (image, view_scale, view_scale);
rect->width, rect->height);
data = cairo_image_surface_get_data (image);
stride = cairo_image_surface_get_stride (image);
@@ -4743,8 +4688,7 @@ capture_view (ClutterStage *stage,
backend = clutter_get_default_backend ();
context = clutter_backend_get_cogl_context (backend);
bitmap = cogl_bitmap_new_for_data (context,
rect->width * view_scale,
rect->height * view_scale,
rect->width, rect->height,
CLUTTER_CAIRO_FORMAT_ARGB32,
stride,
data);
@@ -4752,8 +4696,8 @@ capture_view (ClutterStage *stage,
clutter_stage_view_get_layout (view, &view_layout);
cogl_framebuffer_read_pixels_into_bitmap (framebuffer,
(rect->x - view_layout.x) * view_scale,
(rect->y - view_layout.y) * view_scale,
rect->x - view_layout.x,
rect->y - view_layout.y,
COGL_READ_PIXELS_COLOR_BUFFER,
bitmap);

View File

@@ -245,6 +245,9 @@ guchar * clutter_stage_read_pixels (ClutterStage
CLUTTER_AVAILABLE_IN_ALL
void clutter_stage_get_redraw_clip_bounds (ClutterStage *stage,
cairo_rectangle_int_t *clip);
CLUTTER_AVAILABLE_IN_MUTTER
cairo_region_t * clutter_stage_get_redraw_clip (ClutterStage *stage);
CLUTTER_AVAILABLE_IN_ALL
void clutter_stage_ensure_viewport (ClutterStage *stage);
CLUTTER_AVAILABLE_IN_ALL

View File

@@ -51,12 +51,10 @@
typedef struct _ClutterStageViewCoglPrivate
{
/*
* List of previous damaged areas in stage view framebuffer coordinate space.
*/
/* Stores a list of previous damaged areas in the stage coordinate space */
#define DAMAGE_HISTORY_MAX 16
#define DAMAGE_HISTORY(x) ((x) & (DAMAGE_HISTORY_MAX - 1))
cairo_rectangle_int_t damage_history[DAMAGE_HISTORY_MAX];
cairo_region_t * damage_history[DAMAGE_HISTORY_MAX];
unsigned int damage_index;
} ClutterStageViewCoglPrivate;
@@ -248,13 +246,10 @@ clutter_stage_cogl_has_redraw_clips (ClutterStageWindow *stage_window)
/* NB: at the start of each new frame there is an implied clip that
* clips everything (i.e. nothing would be drawn) so we need to make
* sure we return True in the un-initialized case here.
*
* NB: a clip width of 0 means a full stage redraw has been queued
* so we effectively don't have any redraw clips in that case.
*/
if (!stage_cogl->initialized_redraw_clip ||
(stage_cogl->initialized_redraw_clip &&
stage_cogl->bounding_redraw_clip.width != 0))
stage_cogl->redraw_clip))
return TRUE;
else
return FALSE;
@@ -265,9 +260,9 @@ clutter_stage_cogl_ignoring_redraw_clips (ClutterStageWindow *stage_window)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
/* NB: a clip width of 0 means a full stage redraw is required */
/* NB: a NULL clip means a full stage redraw is required */
if (stage_cogl->initialized_redraw_clip &&
stage_cogl->bounding_redraw_clip.width == 0)
!stage_cogl->redraw_clip)
return TRUE;
else
return FALSE;
@@ -298,11 +293,11 @@ clutter_stage_cogl_add_redraw_clip (ClutterStageWindow *stage_window,
return;
/* A NULL stage clip means a full stage redraw has been queued and
* we keep track of this by setting a zero width
* stage_cogl->bounding_redraw_clip */
* we keep track of this by setting a NULL redraw_clip.
*/
if (stage_clip == NULL)
{
stage_cogl->bounding_redraw_clip.width = 0;
g_clear_pointer (&stage_cogl->redraw_clip, cairo_region_destroy);
stage_cogl->initialized_redraw_clip = TRUE;
return;
}
@@ -311,34 +306,27 @@ clutter_stage_cogl_add_redraw_clip (ClutterStageWindow *stage_window,
if (stage_clip->width == 0 || stage_clip->height == 0)
return;
if (!stage_cogl->initialized_redraw_clip)
if (!stage_cogl->redraw_clip)
{
stage_cogl->bounding_redraw_clip = *stage_clip;
stage_cogl->redraw_clip = cairo_region_create_rectangle (stage_clip);
}
else if (stage_cogl->bounding_redraw_clip.width > 0)
else
{
_clutter_util_rectangle_union (&stage_cogl->bounding_redraw_clip,
stage_clip,
&stage_cogl->bounding_redraw_clip);
cairo_region_union_rectangle (stage_cogl->redraw_clip, stage_clip);
}
stage_cogl->initialized_redraw_clip = TRUE;
}
static gboolean
clutter_stage_cogl_get_redraw_clip_bounds (ClutterStageWindow *stage_window,
cairo_rectangle_int_t *stage_clip)
static cairo_region_t *
clutter_stage_cogl_get_redraw_clip (ClutterStageWindow *stage_window)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
if (stage_cogl->using_clipped_redraw)
{
*stage_clip = stage_cogl->bounding_redraw_clip;
if (stage_cogl->using_clipped_redraw && stage_cogl->redraw_clip)
return cairo_region_copy (stage_cogl->redraw_clip);
return TRUE;
}
return FALSE;
return NULL;
}
static inline gboolean
@@ -416,44 +404,51 @@ swap_framebuffer (ClutterStageWindow *stage_window,
static void
paint_stage (ClutterStageCogl *stage_cogl,
ClutterStageView *view,
const cairo_rectangle_int_t *clip)
cairo_region_t *clip)
{
ClutterStage *stage = stage_cogl->wrapper;
cairo_rectangle_int_t clip_rect;
cairo_region_get_extents (clip, &clip_rect);
_clutter_stage_maybe_setup_viewport (stage, view);
_clutter_stage_paint_view (stage, view, clip);
_clutter_stage_paint_view (stage, view, &clip_rect);
if (clutter_stage_view_get_onscreen (view) !=
clutter_stage_view_get_framebuffer (view))
{
clutter_stage_view_blit_offscreen (view, clip);
clutter_stage_view_blit_offscreen (view, &clip_rect);
}
}
static void
fill_current_damage_history_and_step (ClutterStageView *view)
fill_current_damage_history (ClutterStageView *view,
cairo_region_t *damage)
{
ClutterStageViewCogl *view_cogl = CLUTTER_STAGE_VIEW_COGL (view);
ClutterStageViewCoglPrivate *view_priv =
clutter_stage_view_cogl_get_instance_private (view_cogl);
cairo_rectangle_int_t view_rect;
float fb_scale;
cairo_rectangle_int_t *current_fb_damage;
cairo_region_t **current_damage;
current_fb_damage =
current_damage =
&view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index)];
clutter_stage_view_get_layout (view, &view_rect);
fb_scale = clutter_stage_view_get_scale (view);
*current_fb_damage = (cairo_rectangle_int_t) {
.x = 0,
.y = 0,
.width = view_rect.width * fb_scale,
.height = view_rect.height * fb_scale
};
g_clear_pointer (current_damage, cairo_region_destroy);
*current_damage = cairo_region_copy (damage);
view_priv->damage_index++;
}
static void
fill_current_damage_history_rectangle (ClutterStageView *view,
const cairo_rectangle_int_t *rect)
{
cairo_region_t *damage;
damage = cairo_region_create_rectangle (rect);
fill_current_damage_history (view, damage);
cairo_region_destroy (damage);
}
static void
transform_swap_region_to_onscreen (ClutterStageView *view,
cairo_rectangle_int_t *swap_region)
@@ -490,40 +485,6 @@ transform_swap_region_to_onscreen (ClutterStageView *view,
};
}
static void
calculate_scissor_region (cairo_rectangle_int_t *fb_clip_region,
int subpixel_compensation,
int fb_width,
int fb_height,
cairo_rectangle_int_t *out_scissor_rect)
{
int scissor_x;
int scissor_y;
int scissor_width;
int scissor_height;
scissor_x = fb_clip_region->x;
scissor_y = fb_clip_region->y;
scissor_width = fb_clip_region->width;
scissor_height = fb_clip_region->height;
if (fb_clip_region->x > 0)
scissor_x += subpixel_compensation;
if (fb_clip_region->y > 0)
scissor_y += subpixel_compensation;
if (fb_clip_region->x + fb_clip_region->width < fb_width)
scissor_width -= 2 * subpixel_compensation;
if (fb_clip_region->y + fb_clip_region->height < fb_height)
scissor_height -= 2 * subpixel_compensation;
*out_scissor_rect = (cairo_rectangle_int_t) {
.x = scissor_x,
.y = scissor_y,
.width = scissor_width,
.height = scissor_height
};
}
static gboolean
clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
ClutterStageView *view)
@@ -542,20 +503,17 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
gboolean do_swap_buffer;
gboolean swap_with_damage;
ClutterActor *wrapper;
cairo_rectangle_int_t redraw_clip;
cairo_region_t *redraw_clip;
cairo_region_t *clip_region;
cairo_rectangle_int_t swap_region;
cairo_rectangle_int_t fb_clip_region;
cairo_rectangle_int_t clip_rect;
cairo_rectangle_int_t redraw_rect;
gboolean clip_region_empty;
float fb_scale;
int subpixel_compensation = 0;
int fb_width, fb_height;
int fb_scale;
wrapper = CLUTTER_ACTOR (stage_cogl->wrapper);
clutter_stage_view_get_layout (view, &view_rect);
fb_scale = clutter_stage_view_get_scale (view);
fb_width = cogl_framebuffer_get_width (fb);
fb_height = cogl_framebuffer_get_height (fb);
can_blit_sub_buffer =
cogl_is_onscreen (fb) &&
@@ -565,20 +523,19 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
cogl_is_onscreen (fb) &&
cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE);
/* NB: a zero width redraw clip == full stage redraw */
if (stage_cogl->bounding_redraw_clip.width == 0)
/* NB: a NULL redraw clip == full stage redraw */
if (!stage_cogl->redraw_clip)
have_clip = FALSE;
else
{
redraw_clip = stage_cogl->bounding_redraw_clip;
_clutter_util_rectangle_intersection (&redraw_clip,
&view_rect,
&redraw_clip);
cairo_region_t *view_region;
redraw_clip = cairo_region_copy (stage_cogl->redraw_clip);
have_clip = !(redraw_clip.x == view_rect.x &&
redraw_clip.y == view_rect.y &&
redraw_clip.width == view_rect.width &&
redraw_clip.height == view_rect.height);
view_region = cairo_region_create_rectangle (&view_rect);
cairo_region_intersect (redraw_clip, view_region);
have_clip = !cairo_region_equal (redraw_clip, view_region);
cairo_region_destroy (view_region);
}
may_use_clipped_redraw = FALSE;
@@ -590,24 +547,12 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
cogl_onscreen_get_frame_counter (COGL_ONSCREEN (fb)) > 3)
{
may_use_clipped_redraw = TRUE;
if (fb_scale != floorf (fb_scale))
subpixel_compensation = ceilf (fb_scale);
fb_clip_region = (cairo_rectangle_int_t) {
.x = (floorf ((redraw_clip.x - view_rect.x) * fb_scale) -
subpixel_compensation),
.y = (floorf ((redraw_clip.y - view_rect.y) * fb_scale) -
subpixel_compensation),
.width = (ceilf (redraw_clip.width * fb_scale) +
(2 * subpixel_compensation)),
.height = (ceilf (redraw_clip.height * fb_scale) +
(2 * subpixel_compensation))
};
clip_region = cairo_region_reference (redraw_clip);
}
else
{
fb_clip_region = (cairo_rectangle_int_t) { 0 };
clip_region = cairo_region_create ();
redraw_clip = cairo_region_reference (clip_region);
}
if (may_use_clipped_redraw &&
@@ -616,7 +561,9 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
else
use_clipped_redraw = FALSE;
clip_region_empty = may_use_clipped_redraw && fb_clip_region.width == 0;
clip_region_empty = may_use_clipped_redraw && cairo_region_is_empty (clip_region);
fb_scale = clutter_stage_view_get_scale (view);
swap_with_damage = FALSE;
if (has_buffer_age)
@@ -624,44 +571,26 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
if (use_clipped_redraw && !clip_region_empty)
{
int age, i;
cairo_rectangle_int_t *current_fb_damage =
&view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index++)];
age = cogl_onscreen_get_buffer_age (COGL_ONSCREEN (fb));
if (valid_buffer_age (view_cogl, age))
{
cairo_rectangle_int_t damage_region;
*current_fb_damage = fb_clip_region;
fill_current_damage_history (view, clip_region);
for (i = 1; i <= age; i++)
{
cairo_rectangle_int_t *fb_damage =
&view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - i - 1)];
_clutter_util_rectangle_union (&fb_clip_region,
fb_damage,
&fb_clip_region);
cairo_region_t *damage =
view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - i - 1)];
cairo_region_union (clip_region, damage);
}
/* Update the bounding redraw clip state with the extra damage. */
damage_region = (cairo_rectangle_int_t) {
.x = view_rect.x + floorf (fb_clip_region.x / fb_scale),
.y = view_rect.y + floorf (fb_clip_region.y / fb_scale),
.width = ceilf (fb_clip_region.width / fb_scale),
.height = ceilf (fb_clip_region.height / fb_scale)
};
_clutter_util_rectangle_union (&stage_cogl->bounding_redraw_clip,
&damage_region,
&stage_cogl->bounding_redraw_clip);
/* Update the redraw clip state with the extra damage. */
cairo_region_union (stage_cogl->redraw_clip, clip_region);
CLUTTER_NOTE (CLIPPING, "Reusing back buffer(age=%d) - repairing region: x=%d, y=%d, width=%d, height=%d\n",
CLUTTER_NOTE (CLIPPING, "Reusing back buffer(age=%d) - repairing region: num rects: %d\n",
age,
fb_clip_region.x,
fb_clip_region.y,
fb_clip_region.width,
fb_clip_region.height);
cairo_region_num_rectangles (clip_region));
swap_with_damage = TRUE;
}
@@ -669,20 +598,17 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
{
CLUTTER_NOTE (CLIPPING, "Invalid back buffer(age=%d): forcing full redraw\n", age);
use_clipped_redraw = FALSE;
*current_fb_damage = (cairo_rectangle_int_t) {
.x = 0,
.y = 0,
.width = view_rect.width * fb_scale,
.height = view_rect.height * fb_scale
};
fill_current_damage_history_rectangle (view, &view_rect);
}
}
else if (!use_clipped_redraw)
{
fill_current_damage_history_and_step (view);
fill_current_damage_history_rectangle (view, &view_rect);
}
}
cairo_region_get_extents (clip_region, &clip_rect);
cogl_push_framebuffer (fb);
if (use_clipped_redraw && clip_region_empty)
{
@@ -690,34 +616,26 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
}
else if (use_clipped_redraw)
{
cairo_rectangle_int_t scissor_rect;
calculate_scissor_region (&fb_clip_region,
subpixel_compensation,
fb_width, fb_height,
&scissor_rect);
int scissor_x;
int scissor_y;
CLUTTER_NOTE (CLIPPING,
"Stage clip pushed: x=%d, y=%d, width=%d, height=%d\n",
scissor_rect.x,
scissor_rect.y,
scissor_rect.width,
scissor_rect.height);
clip_rect.x,
clip_rect.y,
clip_rect.width,
clip_rect.height);
stage_cogl->using_clipped_redraw = TRUE;
scissor_x = (clip_rect.x - view_rect.x) * fb_scale;
scissor_y = (clip_rect.y - view_rect.y) * fb_scale;
cogl_framebuffer_push_scissor_clip (fb,
scissor_rect.x,
scissor_rect.y,
scissor_rect.width,
scissor_rect.height);
paint_stage (stage_cogl, view,
&(cairo_rectangle_int_t) {
.x = view_rect.x + floorf ((fb_clip_region.x - 0) / fb_scale),
.y = view_rect.y + floorf ((fb_clip_region.y - 0) / fb_scale),
.width = ceilf ((fb_clip_region.width + 0) / fb_scale),
.height = ceilf ((fb_clip_region.height + 0) / fb_scale)
});
scissor_x,
scissor_y,
clip_rect.width * fb_scale,
clip_rect.height * fb_scale);
paint_stage (stage_cogl, view, clip_region);
cogl_framebuffer_pop_clip (fb);
stage_cogl->using_clipped_redraw = FALSE;
@@ -727,47 +645,47 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
CLUTTER_NOTE (CLIPPING, "Unclipped stage paint\n");
/* If we are trying to debug redraw issues then we want to pass
* the bounding_redraw_clip so it can be visualized */
* the redraw_clip so it can be visualized */
if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS) &&
may_use_clipped_redraw &&
!clip_region_empty)
{
cairo_rectangle_int_t scissor_rect;
calculate_scissor_region (&fb_clip_region,
subpixel_compensation,
fb_width, fb_height,
&scissor_rect);
int scissor_x;
int scissor_y;
scissor_x = (clip_rect.x - view_rect.x) * fb_scale;;
scissor_y = (clip_rect.y - view_rect.y) * fb_scale;
cogl_framebuffer_push_scissor_clip (fb,
scissor_rect.x,
scissor_rect.y,
scissor_rect.width,
scissor_rect.height);
paint_stage (stage_cogl, view,
&(cairo_rectangle_int_t) {
.x = view_rect.x + floorf (fb_clip_region.x / fb_scale),
.y = view_rect.y + floorf (fb_clip_region.y / fb_scale),
.width = ceilf (fb_clip_region.width / fb_scale),
.height = ceilf (fb_clip_region.height / fb_scale)
});
scissor_x,
scissor_y,
clip_rect.width * fb_scale,
clip_rect.height * fb_scale);
paint_stage (stage_cogl, view, clip_region);
cogl_framebuffer_pop_clip (fb);
}
else
paint_stage (stage_cogl, view, &view_rect);
{
cairo_region_t *view_region;
view_region = cairo_region_create_rectangle (&view_rect);
paint_stage (stage_cogl, view, view_region);
cairo_region_destroy (view_region);
}
}
cogl_pop_framebuffer ();
cairo_region_get_extents (redraw_clip, &redraw_rect);
if (may_use_clipped_redraw &&
G_UNLIKELY ((clutter_paint_debug_flags & CLUTTER_DEBUG_REDRAWS)))
{
CoglContext *ctx = cogl_framebuffer_get_context (fb);
static CoglPipeline *outline = NULL;
ClutterActor *actor = CLUTTER_ACTOR (wrapper);
float x_1 = redraw_clip.x;
float x_2 = redraw_clip.x + redraw_clip.width;
float y_1 = redraw_clip.y;
float y_2 = redraw_clip.y + redraw_clip.height;
float x_1 = redraw_rect.x;
float x_2 = redraw_rect.x + redraw_rect.width;
float y_1 = redraw_rect.y;
float y_2 = redraw_rect.y + redraw_rect.height;
CoglVertexP2 quad[4] = {
{ x_1, y_1 },
{ x_2, y_1 },
@@ -813,7 +731,12 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
}
else if (use_clipped_redraw)
{
swap_region = fb_clip_region;
swap_region = (cairo_rectangle_int_t) {
.x = (clip_rect.x - view_rect.x) * fb_scale,
.y = (clip_rect.y - view_rect.y) * fb_scale,
.width = clip_rect.width * fb_scale,
.height = clip_rect.height * fb_scale,
};
g_assert (swap_region.width > 0);
do_swap_buffer = TRUE;
}
@@ -834,6 +757,11 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
do_swap_buffer = TRUE;
}
if (redraw_clip)
cairo_region_destroy (redraw_clip);
if (clip_region)
cairo_region_destroy (clip_region);
if (do_swap_buffer)
{
if (clutter_stage_view_get_onscreen (view) !=
@@ -881,6 +809,7 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
/* reset the redraw clipping for the next paint... */
stage_cogl->initialized_redraw_clip = FALSE;
g_clear_pointer (&stage_cogl->redraw_clip, cairo_region_destroy);
stage_cogl->frame_count++;
}
@@ -895,25 +824,9 @@ clutter_stage_cogl_get_dirty_pixel (ClutterStageWindow *stage_window,
gboolean has_buffer_age =
cogl_is_onscreen (framebuffer) &&
cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE);
float fb_scale;
gboolean scale_is_fractional;
cairo_rectangle_int_t rect;
fb_scale = clutter_stage_view_get_scale (view);
if (fb_scale != floorf (fb_scale))
scale_is_fractional = TRUE;
else
scale_is_fractional = FALSE;
/*
* Buffer damage is tracked in the framebuffer coordinate space
* using the damage history. When fractional scaling is used, a
* coordinate on the stage might not correspond to the exact position of any
* physical pixel, which causes issues when painting using the pick mode.
*
* For now, always use the (0, 0) pixel for picking when using fractional
* framebuffer scaling.
*/
if (!has_buffer_age || scale_is_fractional)
if (!has_buffer_age)
{
*x = 0;
*y = 0;
@@ -924,13 +837,18 @@ clutter_stage_cogl_get_dirty_pixel (ClutterStageWindow *stage_window,
ClutterStageViewCoglPrivate *view_priv =
clutter_stage_view_cogl_get_instance_private (view_cogl);
cairo_rectangle_int_t view_layout;
cairo_rectangle_int_t *fb_damage;
cairo_region_t *damage;
clutter_stage_view_get_layout (view, &view_layout);
fb_damage = &view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - 1)];
*x = fb_damage->x / fb_scale;
*y = fb_damage->y / fb_scale;
damage = view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - 1)];
if (damage)
cairo_region_get_rectangle (damage, 0, &rect);
else
rect.x = rect.y = 0;
*x = rect.x - view_layout.x;
*y = rect.y - view_layout.y;
}
}
@@ -949,7 +867,7 @@ clutter_stage_window_iface_init (ClutterStageWindowIface *iface)
iface->add_redraw_clip = clutter_stage_cogl_add_redraw_clip;
iface->has_redraw_clips = clutter_stage_cogl_has_redraw_clips;
iface->ignoring_redraw_clips = clutter_stage_cogl_ignoring_redraw_clips;
iface->get_redraw_clip_bounds = clutter_stage_cogl_get_redraw_clip_bounds;
iface->get_redraw_clip = clutter_stage_cogl_get_redraw_clip;
iface->redraw = clutter_stage_cogl_redraw;
iface->get_dirty_pixel = clutter_stage_cogl_get_dirty_pixel;
}

View File

@@ -59,7 +59,7 @@ struct _ClutterStageCogl
* junk frames to start with. */
unsigned int frame_count;
cairo_rectangle_int_t bounding_redraw_clip;
cairo_region_t *redraw_clip;
guint initialized_redraw_clip : 1;

View File

@@ -2602,21 +2602,6 @@ clutter_evdev_set_keyboard_layout_index (ClutterDeviceManager *evdev,
xkb_state_update_mask (state, depressed_mods, latched_mods, locked_mods, 0, 0, idx);
}
/**
* clutter_evdev_get_keyboard_layout_index: (skip)
*/
xkb_layout_index_t
clutter_evdev_get_keyboard_layout_index (ClutterDeviceManager *evdev)
{
ClutterDeviceManagerEvdev *manager_evdev;
struct xkb_state *state;
manager_evdev = CLUTTER_DEVICE_MANAGER_EVDEV (evdev);
state = manager_evdev->priv->main_seat->xkb;
return xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_LOCKED);
}
/**
* clutter_evdev_set_keyboard_numlock: (skip)
* @evdev: the #ClutterDeviceManager created by the evdev backend

View File

@@ -120,9 +120,6 @@ CLUTTER_AVAILABLE_IN_1_20
void clutter_evdev_set_keyboard_layout_index (ClutterDeviceManager *evdev,
xkb_layout_index_t idx);
CLUTTER_AVAILABLE_IN_MUTTER
xkb_layout_index_t clutter_evdev_get_keyboard_layout_index (ClutterDeviceManager *evdev);
CLUTTER_AVAILABLE_IN_1_26
void clutter_evdev_set_keyboard_numlock (ClutterDeviceManager *evdev,
gboolean numlock_state);

View File

@@ -163,9 +163,6 @@ clutter_input_device_evdev_update_from_tool (ClutterInputDevice *device,
if (libinput_tablet_tool_has_slider (evdev_tool->tool))
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_SLIDER, -1, 1, 0);
if (libinput_tablet_tool_has_wheel (evdev_tool->tool))
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_WHEEL, -180, 180, 0);
g_object_thaw_notify (G_OBJECT (device));
}

View File

@@ -66,14 +66,6 @@ static const char *clutter_input_axis_atom_names[] = {
#define N_AXIS_ATOMS G_N_ELEMENTS (clutter_input_axis_atom_names)
enum {
PAD_AXIS_FIRST = 3, /* First axes are always x/y/pressure, ignored in pads */
PAD_AXIS_STRIP1 = PAD_AXIS_FIRST,
PAD_AXIS_STRIP2,
PAD_AXIS_RING1,
PAD_AXIS_RING2,
};
static Atom clutter_input_axis_atoms[N_AXIS_ATOMS] = { 0, };
static void clutter_event_translator_iface_init (ClutterEventTranslatorIface *iface);
@@ -367,36 +359,6 @@ get_device_node_path (ClutterBackendX11 *backend_x11,
return node_path;
}
static void
get_pad_features (XIDeviceInfo *info,
guint *n_rings,
guint *n_strips)
{
gint i, rings = 0, strips = 0;
for (i = PAD_AXIS_FIRST; i < info->num_classes; i++)
{
XIValuatorClassInfo *valuator = (XIValuatorClassInfo*) info->classes[i];
int axis = valuator->number;
if (valuator->type != XIValuatorClass)
continue;
if (valuator->max <= 1)
continue;
/* Ring/strip axes are fixed in pad devices as handled by the
* wacom driver. Match those to detect pad features.
*/
if (axis == PAD_AXIS_STRIP1 || axis == PAD_AXIS_STRIP2)
strips++;
else if (axis == PAD_AXIS_RING1 || axis == PAD_AXIS_RING2)
rings++;
}
*n_rings = rings;
*n_strips = strips;
}
static ClutterInputDevice *
create_device (ClutterDeviceManagerXI2 *manager_xi2,
ClutterBackendX11 *backend_x11,
@@ -406,7 +368,7 @@ create_device (ClutterDeviceManagerXI2 *manager_xi2,
ClutterInputDevice *retval;
ClutterInputMode mode;
gboolean is_enabled;
guint num_touches = 0, num_rings = 0, num_strips = 0;
guint num_touches = 0;
gchar *vendor_id = NULL, *product_id = NULL, *node_path = NULL;
if (info->use == XIMasterKeyboard || info->use == XISlaveKeyboard)
@@ -474,12 +436,6 @@ create_device (ClutterDeviceManagerXI2 *manager_xi2,
node_path = get_device_node_path (backend_x11, info);
}
if (source == CLUTTER_PAD_DEVICE)
{
is_enabled = TRUE;
get_pad_features (info, &num_rings, &num_strips);
}
retval = g_object_new (CLUTTER_TYPE_INPUT_DEVICE_XI2,
"name", info->name,
"id", info->deviceid,
@@ -492,8 +448,6 @@ create_device (ClutterDeviceManagerXI2 *manager_xi2,
"vendor-id", vendor_id,
"product-id", product_id,
"device-node", node_path,
"n-rings", num_rings,
"n-strips", num_strips,
NULL);
translate_device_classes (backend_x11->xdpy, retval,
@@ -893,54 +847,6 @@ translate_axes (ClutterInputDevice *device,
return retval;
}
static gboolean
translate_pad_axis (ClutterInputDevice *device,
XIValuatorState *valuators,
ClutterEventType *evtype,
guint *number,
gdouble *value)
{
double *values;
gint i;
values = valuators->values;
for (i = PAD_AXIS_FIRST; i < valuators->mask_len * 8; i++)
{
gdouble val;
guint axis_number = 0;
if (!XIMaskIsSet (valuators->mask, i))
continue;
val = *values++;
if (val <= 0)
continue;
_clutter_input_device_translate_axis (device, i, val, value);
if (i == PAD_AXIS_RING1 || i == PAD_AXIS_RING2)
{
*evtype = CLUTTER_PAD_RING;
(*value) *= 360.0;
}
else if (i == PAD_AXIS_STRIP1 || i == PAD_AXIS_STRIP2)
{
*evtype = CLUTTER_PAD_STRIP;
}
else
continue;
if (i == PAD_AXIS_STRIP2 || i == PAD_AXIS_RING2)
axis_number++;
*number = axis_number;
return TRUE;
}
return FALSE;
}
static void
translate_coords (ClutterStageX11 *stage_x11,
gdouble event_x,
@@ -1119,54 +1025,6 @@ handle_property_event (ClutterDeviceManagerXI2 *manager_xi2,
}
}
static gboolean
translate_pad_event (ClutterEvent *event,
XIDeviceEvent *xev,
ClutterInputDevice *device)
{
gdouble value;
guint number;
if (!translate_pad_axis (device, &xev->valuators,
&event->any.type,
&number, &value))
return FALSE;
/* When touching a ring/strip a first XI_Motion event
* is generated. Use it to reset the pad state, so
* later events actually have a directionality.
*/
if (xev->evtype == XI_Motion)
value = -1;
if (event->any.type == CLUTTER_PAD_RING)
{
event->pad_ring.ring_number = number;
event->pad_ring.angle = value;
}
else
{
event->pad_strip.strip_number = number;
event->pad_strip.value = value;
}
event->any.time = xev->time;
clutter_event_set_device (event, device);
clutter_event_set_source_device (event, device);
CLUTTER_NOTE (EVENT,
"%s: win:0x%x, device:%d '%s', time:%d "
"(value:%f)",
event->any.type == CLUTTER_PAD_RING
? "pad ring "
: "pad strip",
(unsigned int) xev->event,
device->id,
device->device_name,
event->any.time, value);
return TRUE;
}
static ClutterTranslateReturn
clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
gpointer native,
@@ -1348,23 +1206,15 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
XIAsyncDevice,
xev->time);
event->any.stage = stage;
/* Ignore 4-7 buttons */
if (xev->detail >= 4 && xev->detail <= 7)
{
retval = CLUTTER_TRANSLATE_REMOVE;
return CLUTTER_TRANSLATE_REMOVE;
if (xi_event->evtype == XI_ButtonPress &&
translate_pad_event (event, xev, source_device))
retval = CLUTTER_TRANSLATE_QUEUE;
break;
}
event->any.type =
event->pad_button.type =
(xi_event->evtype == XI_ButtonPress) ? CLUTTER_PAD_BUTTON_PRESS
: CLUTTER_PAD_BUTTON_RELEASE;
event->any.time = xev->time;
event->pad_button.time = xev->time;
event->pad_button.stage = stage;
/* The 4-7 button range is taken as non-existent on pad devices,
* let the buttons above that take over this range.
@@ -1374,7 +1224,6 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
/* Pad buttons are 0-indexed */
event->pad_button.button = xev->detail - 1;
clutter_event_set_device (event, device);
clutter_event_set_source_device (event, source_device);
CLUTTER_NOTE (EVENT,
@@ -1531,15 +1380,6 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
device = g_hash_table_lookup (manager_xi2->devices_by_id,
GINT_TO_POINTER (xev->deviceid));
if (clutter_input_device_get_device_type (source_device) == CLUTTER_PAD_DEVICE)
{
event->any.stage = stage;
if (translate_pad_event (event, xev, source_device))
retval = CLUTTER_TRANSLATE_QUEUE;
break;
}
/* Set the stage for core events coming out of nowhere (see bug #684509) */
if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_MASTER &&
clutter_input_device_get_pointer_stage (device) == NULL &&

View File

@@ -10,6 +10,7 @@ static const struct {
{ "Net/DndDragThreshold", "dnd-drag-threshold" },
{ "Gtk/FontName", "font-name" },
{ "Xft/Antialias", "font-antialias" },
{ "Xft/DPI", "font-dpi" },
{ "Xft/Hinting", "font-hinting" },
{ "Xft/HintStyle", "font-hint-style" },
{ "Xft/RGBA", "font-subpixel-order" },

View File

@@ -110,7 +110,7 @@ LT_LIB_M
AC_HEADER_STDC
# required versions for dependencies
m4_define([glib_req_version], [2.53.2])
m4_define([glib_req_version], [2.44.0])
m4_define([cogl_req_version], [1.21.2])
m4_define([json_glib_req_version], [0.12.0])
m4_define([atk_req_version], [2.5.3])

View File

@@ -407,7 +407,8 @@ test_scale_center (TestState *state)
g_assert (scale_x == 4.0);
g_assert (scale_y == 2.0);
g_assert (gravity == CLUTTER_GRAVITY_NONE);
assert_notifications (NOTIFY_SCALE_CENTER_X | NOTIFY_SCALE_CENTER_Y
assert_notifications (NOTIFY_SCALE_X | NOTIFY_SCALE_Y
| NOTIFY_SCALE_CENTER_X | NOTIFY_SCALE_CENTER_Y
| NOTIFY_SCALE_GRAVITY);
assert_coords (state, 100 + 10 - 10 * 4, 200 + 20 - 20 * 2,
100 + 10 + (RECT_WIDTH - 10) * 4,

View File

@@ -193,6 +193,11 @@ struct _CoglFramebuffer
CoglFramebufferBits bits;
int samples_per_pixel;
/* Whether the depth buffer was enabled for this framebuffer,
* usually means it needs to be cleared before being reused next.
*/
CoglBool depth_buffer_clear_needed;
};
typedef enum {

View File

@@ -117,6 +117,7 @@ _cogl_framebuffer_init (CoglFramebuffer *framebuffer,
framebuffer->viewport_age_for_scissor_workaround = -1;
framebuffer->dither_enabled = TRUE;
framebuffer->depth_writing_enabled = TRUE;
framebuffer->depth_buffer_clear_needed = TRUE;
framebuffer->modelview_stack = cogl_matrix_stack_new (ctx);
framebuffer->projection_stack = cogl_matrix_stack_new (ctx);
@@ -268,6 +269,13 @@ cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
int scissor_y1;
CoglBool saved_viewport_scissor_workaround;
if (!framebuffer->depth_buffer_clear_needed &&
(buffers & COGL_BUFFER_BIT_DEPTH))
buffers &= ~(COGL_BUFFER_BIT_DEPTH);
if (buffers == 0)
return;
_cogl_clip_stack_get_bounds (clip_stack,
&scissor_x0, &scissor_y0,
&scissor_x1, &scissor_y1);
@@ -415,6 +423,9 @@ cleared:
_cogl_framebuffer_mark_mid_scene (framebuffer);
_cogl_framebuffer_mark_clear_clip_dirty (framebuffer);
if (buffers & COGL_BUFFER_BIT_DEPTH)
framebuffer->depth_buffer_clear_needed = FALSE;
if (buffers & COGL_BUFFER_BIT_COLOR && buffers & COGL_BUFFER_BIT_DEPTH)
{
/* For our fast-path for reading back a single pixel of simple

View File

@@ -1417,17 +1417,15 @@ _cogl_framebuffer_gl_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
&gl_intformat,
&gl_format,
&gl_type);
#if HAVE_COGL_GL
/* As we are reading pixels, we want to consider the bitmap according to
* its real pixel format, not the swizzled channels we pretend face to the
* pipeline.
*/
if ((ctx->driver == COGL_DRIVER_GL || ctx->driver == COGL_DRIVER_GL3) &&
(format == COGL_PIXEL_FORMAT_BGRA_8888 ||
if ((format == COGL_PIXEL_FORMAT_BGRA_8888 ||
format == COGL_PIXEL_FORMAT_BGRA_8888_PRE) &&
_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_TEXTURE_SWIZZLE))
gl_format = GL_BGRA;
#endif
/* NB: All offscreen rendering is done upside down so there is no need
* to flip in this case... */

View File

@@ -418,7 +418,11 @@ flush_depth_state (CoglContext *ctx,
if (ctx->depth_test_enabled_cache != depth_state->test_enabled)
{
if (depth_state->test_enabled == TRUE)
GE (ctx, glEnable (GL_DEPTH_TEST));
{
GE (ctx, glEnable (GL_DEPTH_TEST));
if (ctx->current_draw_buffer)
ctx->current_draw_buffer->depth_buffer_clear_needed = TRUE;
}
else
GE (ctx, glDisable (GL_DEPTH_TEST));
ctx->depth_test_enabled_cache = depth_state->test_enabled;

View File

@@ -2,14 +2,14 @@ AC_PREREQ(2.62)
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [25])
m4_define([mutter_micro_version], [91])
m4_define([mutter_micro_version], [1])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])
m4_define([mutter_plugin_api_version], [3])
m4_define([libmutter_api_version], [1])
m4_define([libmutter_api_version], [0])
AC_INIT([mutter], [mutter_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=mutter])
@@ -72,7 +72,7 @@ AC_HEADER_STDC
PKG_PROG_PKG_CONFIG([0.21])
# Sets GLIB_GENMARSHAL and GLIB_MKENUMS
AM_PATH_GLIB_2_0([2.53.2])
AM_PATH_GLIB_2_0([2.49.0])
CANBERRA_GTK=libcanberra-gtk3
CANBERRA_GTK_VERSION=0.26
@@ -275,7 +275,7 @@ AS_IF([test "$enable_egl_device" = "yes"], [
AC_DEFINE([HAVE_EGL_DEVICE],[1], [Defined if EGLDevice support is enabled])
])
MUTTER_WAYLAND_MODULES="wayland-server >= 1.13.0"
MUTTER_WAYLAND_MODULES="wayland-server >= 1.6.90"
AC_ARG_ENABLE(wayland,
AS_HELP_STRING([--disable-wayland], [disable mutter on wayland support]),,
@@ -292,7 +292,7 @@ AS_IF([test "$have_wayland" = "yes"], [
AC_SUBST([WAYLAND_SCANNER])
AC_DEFINE([HAVE_WAYLAND],[1],[Define if you want to enable Wayland support])
PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.9],
PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.7],
[ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
])

View File

@@ -18,7 +18,7 @@ gschema_in_files = \
gsettings_SCHEMAS = $(gschema_in_files:.xml.in=.xml)
%.gschema.xml: %.gschema.xml.in Makefile
$(AM_V_GEN) sed -e 's|@GETTEXT_DOMAIN[@]|$(GETTEXT_PACKAGE)|g' \
$(AM_V_GEN) sed -e 's|@GETTEXT_DOMAIN[@]|$(GETTEXT_DOMAIN)|g' \
$< > $@ || rm $@
@GSETTINGS_RULES@

View File

@@ -1,6 +1,6 @@
<schemalist>
<schema id="org.gnome.mutter" path="/org/gnome/mutter/"
gettext-domain="@GETTEXT_DOMAIN@">
gettext-domain="@GETTEXT_DOMAIN">
<key name="overlay-key" type="s">
<default>'Super_L'</default>
@@ -146,15 +146,5 @@
<summary>Cancel tab popup</summary>
</key>
<key name="switch-monitor" type="as">
<default><![CDATA[['<Super>p','XF86Display']]]></default>
<summary>Switch monitor configurations</summary>
</key>
<key name="rotate-monitor" type="as">
<default><![CDATA[['XF86RotateWindows']]]></default>
<summary>Rotates the built-in monitor configuration</summary>
</key>
</schema>
</schemalist>

View File

@@ -49,9 +49,5 @@
<default><![CDATA[['<Primary><Alt>F12']]]></default>
<summary>Switch to VT 12</summary>
</key>
<key name="restore-shortcuts" type="as">
<default><![CDATA[['<Shift><Control>Escape']]]></default>
<summary>Re-enable shortcuts</summary>
</key>
</schema>
</schemalist>

413
po/ar.po
View File

@@ -4,15 +4,14 @@
# Arafat Medini <lumina@silverpen.de>, 2003.
# Abdulaziz Al-Arfaj <alarfaj0@yahoo.com>, 2004.
# Djihed Afifi <djihed@gmail.com>, 2006.
# Khaled Hosny <khaledhosny@eglug.org>, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2017.
# Khaled Hosny <khaledhosny@eglug.org>, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015.
# Anas Afif Emad <anas.e87@gmail.com>, 2008.
msgid ""
msgstr ""
"Project-Id-Version: metacity.HEAD\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter&"
"keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-06-18 21:26+0200\n"
"PO-Revision-Date: 2017-06-18 21:27+0200\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-03-23 21:38+0200\n"
"PO-Revision-Date: 2015-03-23 21:45+0200\n"
"Last-Translator: Khaled Hosny <khaledhosny@eglug.org>\n"
"Language-Team: Arabic <doc@arabeyes.org>\n"
"Language: ar\n"
@@ -21,568 +20,524 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
"X-Generator: Virtaal 1.0.0-beta1\n"
"X-Project-Style: gnome\n"
"X-Generator: Virtaal 0.7.1\n"
#: data/50-mutter-navigation.xml:6
#: ../data/50-mutter-navigation.xml.in.h:1
msgid "Navigation"
msgstr "الإبحار"
#: data/50-mutter-navigation.xml:9
#: ../data/50-mutter-navigation.xml.in.h:2
msgid "Move window to workspace 1"
msgstr "انقل النافذة إلى مساحة العمل 1"
#: data/50-mutter-navigation.xml:12
#: ../data/50-mutter-navigation.xml.in.h:3
msgid "Move window to workspace 2"
msgstr "انقل النافذة إلى مساحة العمل 2"
#: data/50-mutter-navigation.xml:15
#: ../data/50-mutter-navigation.xml.in.h:4
msgid "Move window to workspace 3"
msgstr "انقل النافذة إلى مساحة العمل 3"
#: data/50-mutter-navigation.xml:18
#: ../data/50-mutter-navigation.xml.in.h:5
msgid "Move window to workspace 4"
msgstr "انقل النافذة إلى مساحة العمل 4"
#: data/50-mutter-navigation.xml:21
#: ../data/50-mutter-navigation.xml.in.h:6
msgid "Move window to last workspace"
msgstr "انقل النافذة إلى مساحة العمل الأخيرة"
#: data/50-mutter-navigation.xml:24
#: ../data/50-mutter-navigation.xml.in.h:7
msgid "Move window one workspace to the left"
msgstr "انقل النافذة مساحة عمل واحدة إلى اليسار"
#: data/50-mutter-navigation.xml:27
#: ../data/50-mutter-navigation.xml.in.h:8
msgid "Move window one workspace to the right"
msgstr "انقل النافذة مساحة عمل واحدة إلى اليمين"
#: data/50-mutter-navigation.xml:30
#: ../data/50-mutter-navigation.xml.in.h:9
msgid "Move window one workspace up"
msgstr "انقل النافذة مساحة عمل واحدة إلى الأعلى"
#: data/50-mutter-navigation.xml:33
#: ../data/50-mutter-navigation.xml.in.h:10
msgid "Move window one workspace down"
msgstr "انقل النافذة مساحة عمل واحدة إلى الأسفل"
#: data/50-mutter-navigation.xml:36
#: ../data/50-mutter-navigation.xml.in.h:11
msgid "Move window one monitor to the left"
msgstr "انقل النافذة شاشة واحدة إلى اليسار"
#: data/50-mutter-navigation.xml:39
#: ../data/50-mutter-navigation.xml.in.h:12
msgid "Move window one monitor to the right"
msgstr "انقل النافذة شاشة واحدة إلى اليمين"
#: data/50-mutter-navigation.xml:42
#: ../data/50-mutter-navigation.xml.in.h:13
msgid "Move window one monitor up"
msgstr "انقل النافذة شاشة واحدة إلى الأعلى"
#: data/50-mutter-navigation.xml:45
#: ../data/50-mutter-navigation.xml.in.h:14
msgid "Move window one monitor down"
msgstr "انقل النافذة شاشة واحدة إلى الأسفل"
#: data/50-mutter-navigation.xml:49
#: ../data/50-mutter-navigation.xml.in.h:15
msgid "Switch applications"
msgstr "تنقل بين التطبيقات"
#: data/50-mutter-navigation.xml:54
#: ../data/50-mutter-navigation.xml.in.h:16
msgid "Switch to previous application"
msgstr "انتقل إلى التطبيق السابق"
#: data/50-mutter-navigation.xml:58
#: ../data/50-mutter-navigation.xml.in.h:17
msgid "Switch windows"
msgstr "تنقل بين النوافذ"
#: data/50-mutter-navigation.xml:63
#: ../data/50-mutter-navigation.xml.in.h:18
msgid "Switch to previous window"
msgstr "انتقل إلى النافذة السابقة"
#: data/50-mutter-navigation.xml:67
#: ../data/50-mutter-navigation.xml.in.h:19
msgid "Switch windows of an application"
msgstr "تنقل بين نوافذ التطبيق"
#: data/50-mutter-navigation.xml:72
#: ../data/50-mutter-navigation.xml.in.h:20
msgid "Switch to previous window of an application"
msgstr "انتقل إلى نافذة التطبيق السابقة"
#: data/50-mutter-navigation.xml:76
#: ../data/50-mutter-navigation.xml.in.h:21
msgid "Switch system controls"
msgstr "تنقل بين تحكمات النظام"
#: data/50-mutter-navigation.xml:81
#: ../data/50-mutter-navigation.xml.in.h:22
msgid "Switch to previous system control"
msgstr "انتقل إلى تحكم النظام السابق"
#: data/50-mutter-navigation.xml:85
#: ../data/50-mutter-navigation.xml.in.h:23
msgid "Switch windows directly"
msgstr "تنقل مباشرة بين النوافذ"
#: data/50-mutter-navigation.xml:90
#: ../data/50-mutter-navigation.xml.in.h:24
msgid "Switch directly to previous window"
msgstr "انتقل مباشرة إلى النافذة السابقة"
#: data/50-mutter-navigation.xml:94
#: ../data/50-mutter-navigation.xml.in.h:25
msgid "Switch windows of an app directly"
msgstr "تنقل مباشرة بين نوافذ التطبيق"
#: data/50-mutter-navigation.xml:99
#: ../data/50-mutter-navigation.xml.in.h:26
msgid "Switch directly to previous window of an app"
msgstr "انتقل مباشرة إلى نافذة التطبيق السابقة"
#: data/50-mutter-navigation.xml:103
#: ../data/50-mutter-navigation.xml.in.h:27
msgid "Switch system controls directly"
msgstr "تنقل مباشرة بين تحكمات النظام"
#: data/50-mutter-navigation.xml:108
#: ../data/50-mutter-navigation.xml.in.h:28
msgid "Switch directly to previous system control"
msgstr "انتقل مباشرة إلى تحكم النظام السابق"
#: data/50-mutter-navigation.xml:111
#: ../data/50-mutter-navigation.xml.in.h:29
msgid "Hide all normal windows"
msgstr "أخفِ كل النوافذ العادية"
#: data/50-mutter-navigation.xml:114
#: ../data/50-mutter-navigation.xml.in.h:30
msgid "Switch to workspace 1"
msgstr "انتقل إلى مساحة العمل 1"
#: data/50-mutter-navigation.xml:117
#: ../data/50-mutter-navigation.xml.in.h:31
msgid "Switch to workspace 2"
msgstr "انتقل إلى مساحة العمل 2"
#: data/50-mutter-navigation.xml:120
#: ../data/50-mutter-navigation.xml.in.h:32
msgid "Switch to workspace 3"
msgstr "انتقل إلى مساحة العمل 3"
#: data/50-mutter-navigation.xml:123
#: ../data/50-mutter-navigation.xml.in.h:33
msgid "Switch to workspace 4"
msgstr "انتقل إلى مساحة العمل 4"
#: data/50-mutter-navigation.xml:126
#: ../data/50-mutter-navigation.xml.in.h:34
msgid "Switch to last workspace"
msgstr "انتقل إلى مساحة العمل الأخيرة"
#: data/50-mutter-navigation.xml:129
#: ../data/50-mutter-navigation.xml.in.h:35
msgid "Move to workspace left"
msgstr "انقل لمساحة العمل على اليسار"
#: data/50-mutter-navigation.xml:132
#: ../data/50-mutter-navigation.xml.in.h:36
msgid "Move to workspace right"
msgstr "انقل لمساحة العمل على اليمين"
#: data/50-mutter-navigation.xml:135
#: ../data/50-mutter-navigation.xml.in.h:37
msgid "Move to workspace above"
msgstr "انقل لمساحة العمل أعلى"
#: data/50-mutter-navigation.xml:138
#: ../data/50-mutter-navigation.xml.in.h:38
msgid "Move to workspace below"
msgstr "انقل لمساحة العمل أسفل"
#: data/50-mutter-system.xml:6
#: ../data/50-mutter-system.xml.in.h:1
msgid "System"
msgstr "النظام"
#: data/50-mutter-system.xml:8
#: ../data/50-mutter-system.xml.in.h:2
msgid "Show the run command prompt"
msgstr "أظهر محث تشغيل أمر"
#: data/50-mutter-system.xml:10
#: ../data/50-mutter-system.xml.in.h:3
msgid "Show the activities overview"
msgstr "أظهر نظرة عامة على الأنشطة"
#: data/50-mutter-windows.xml:6
#: ../data/50-mutter-windows.xml.in.h:1
msgid "Windows"
msgstr "النوافذ"
#: data/50-mutter-windows.xml:8
#: ../data/50-mutter-windows.xml.in.h:2
msgid "Activate the window menu"
msgstr "فعّل قائمة النافذة"
#: data/50-mutter-windows.xml:10
#: ../data/50-mutter-windows.xml.in.h:3
msgid "Toggle fullscreen mode"
msgstr "بدّل نمط ملء الشاشة"
#: data/50-mutter-windows.xml:12
#: ../data/50-mutter-windows.xml.in.h:4
msgid "Toggle maximization state"
msgstr "بدّل حالة التكبير"
#: data/50-mutter-windows.xml:14
#: ../data/50-mutter-windows.xml.in.h:5
msgid "Maximize window"
msgstr "كبّر النّافذة"
#: data/50-mutter-windows.xml:16
#: ../data/50-mutter-windows.xml.in.h:6
msgid "Restore window"
msgstr "استعد النّافذة"
#: data/50-mutter-windows.xml:18
#: ../data/50-mutter-windows.xml.in.h:7
msgid "Toggle shaded state"
msgstr "بدّل حالة الإخفاء"
#: data/50-mutter-windows.xml:20
#: ../data/50-mutter-windows.xml.in.h:8
msgid "Close window"
msgstr "أغلق النّافذة"
#: data/50-mutter-windows.xml:22
#: ../data/50-mutter-windows.xml.in.h:9
msgid "Hide window"
msgstr "أخفِ النّافذة"
#: data/50-mutter-windows.xml:24
#: ../data/50-mutter-windows.xml.in.h:10
msgid "Move window"
msgstr "انقل النّافذة"
#: data/50-mutter-windows.xml:26
#: ../data/50-mutter-windows.xml.in.h:11
msgid "Resize window"
msgstr "حجّم النّافذة"
#: data/50-mutter-windows.xml:29
#: ../data/50-mutter-windows.xml.in.h:12
msgid "Toggle window on all workspaces or one"
msgstr "بدّل حالة ظهور النافذة على جميع مساحات العمل أو واحدة منها"
#: data/50-mutter-windows.xml:31
#: ../data/50-mutter-windows.xml.in.h:13
msgid "Raise window if covered, otherwise lower it"
msgstr "ارفع النافذة إذا كانت أخرى تغطيها، أو أخفضها في ما عدا ذلك"
#: data/50-mutter-windows.xml:33
#: ../data/50-mutter-windows.xml.in.h:14
msgid "Raise window above other windows"
msgstr "ارفع النافذة فوق النوافذ الأخرى"
#: data/50-mutter-windows.xml:35
#: ../data/50-mutter-windows.xml.in.h:15
msgid "Lower window below other windows"
msgstr "اخفض النافذة تحت النوافذ الأخرى"
#: data/50-mutter-windows.xml:37
#: ../data/50-mutter-windows.xml.in.h:16
msgid "Maximize window vertically"
msgstr "كبّر النافذة رأسيا"
#: data/50-mutter-windows.xml:39
#: ../data/50-mutter-windows.xml.in.h:17
msgid "Maximize window horizontally"
msgstr "كبّر النافذة أفقيا"
#: data/50-mutter-windows.xml:43
#: ../data/50-mutter-windows.xml.in.h:18
msgid "View split on left"
msgstr "المنظور مقسوم على اليمين"
#: data/50-mutter-windows.xml:47
#: ../data/50-mutter-windows.xml.in.h:19
msgid "View split on right"
msgstr "المنظور مقسوم على اليسار"
#: data/mutter.desktop.in:4
#: ../data/mutter.desktop.in.h:1
msgid "Mutter"
msgstr "مَتَر"
#: data/org.gnome.mutter.gschema.xml.in:7
#: ../data/org.gnome.mutter.gschema.xml.in.h:1
msgid "Modifier to use for extended window management operations"
msgstr "المغير الذي سيُستعمل لتمديد عمليات إدارة النوافذ "
#: data/org.gnome.mutter.gschema.xml.in:8
#: ../data/org.gnome.mutter.gschema.xml.in.h:2
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. Its 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 ""
#: data/org.gnome.mutter.gschema.xml.in:20
#: ../data/org.gnome.mutter.gschema.xml.in.h:3
msgid "Attach modal dialogs"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:21
#: ../data/org.gnome.mutter.gschema.xml.in.h:4
msgid ""
"When true, instead of having independent titlebars, modal dialogs appear "
"attached to the titlebar of the parent window and are moved together with "
"the parent window."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:30
#: ../data/org.gnome.mutter.gschema.xml.in.h:5
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:31
#: ../data/org.gnome.mutter.gschema.xml.in.h:6
msgid ""
"If enabled, dropping windows on vertical screen edges maximizes them "
"vertically and resizes them horizontally to cover half of the available "
"area. Dropping windows on the top screen edge maximizes them completely."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:40
#: ../data/org.gnome.mutter.gschema.xml.in.h:7
msgid "Workspaces are managed dynamically"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:41
#: ../data/org.gnome.mutter.gschema.xml.in.h:8
msgid ""
"Determines whether workspaces are managed dynamically or whether theres 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 ""
#: data/org.gnome.mutter.gschema.xml.in:50
#: ../data/org.gnome.mutter.gschema.xml.in.h:9
msgid "Workspaces only on primary"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:51
#: ../data/org.gnome.mutter.gschema.xml.in.h:10
msgid ""
"Determines whether workspace switching should happen for windows on all "
"monitors or only for windows on the primary monitor."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:59
#: ../data/org.gnome.mutter.gschema.xml.in.h:11
msgid "No tab popup"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:60
#: ../data/org.gnome.mutter.gschema.xml.in.h:12
msgid ""
"Determines whether the use of popup and highlight frame should be disabled "
"for window cycling."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:68
#: ../data/org.gnome.mutter.gschema.xml.in.h:13
msgid "Delay focus changes until the pointer stops moving"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:69
#: ../data/org.gnome.mutter.gschema.xml.in.h:14
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 ""
#: data/org.gnome.mutter.gschema.xml.in:79
#: ../data/org.gnome.mutter.gschema.xml.in.h:15
msgid "Draggable border width"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:80
#: ../data/org.gnome.mutter.gschema.xml.in.h:16
msgid ""
"The amount of total draggable borders. If the themes 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 ""
#: data/org.gnome.mutter.gschema.xml.in:89
#: ../data/org.gnome.mutter.gschema.xml.in.h:17
msgid "Auto maximize nearly monitor sized windows"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:90
#: ../data/org.gnome.mutter.gschema.xml.in.h:18
msgid ""
"If enabled, new windows that are initially the size of the monitor "
"automatically get maximized."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:98
#: ../data/org.gnome.mutter.gschema.xml.in.h:19
msgid "Place new windows in the center"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:99
#: ../data/org.gnome.mutter.gschema.xml.in.h:20
msgid ""
"When true, the new windows will always be put in the center of the active "
"screen of the monitor."
msgstr ""
#: 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. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:151
#: ../data/org.gnome.mutter.gschema.xml.in.h:21
msgid "Select window from tab popup"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:156
#: ../data/org.gnome.mutter.gschema.xml.in.h:22
msgid "Cancel tab popup"
msgstr ""
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
#, fuzzy
msgid "Switch to VT 1"
msgstr "انتقل إلى مساحة العمل 1"
#: data/org.gnome.mutter.wayland.gschema.xml.in:10
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
#, fuzzy
msgid "Switch to VT 2"
msgstr "انتقل إلى مساحة العمل 2"
#: data/org.gnome.mutter.wayland.gschema.xml.in:14
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
#, fuzzy
msgid "Switch to VT 3"
msgstr "انتقل إلى مساحة العمل 3"
#: data/org.gnome.mutter.wayland.gschema.xml.in:18
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
#, fuzzy
msgid "Switch to VT 4"
msgstr "انتقل إلى مساحة العمل 4"
#: data/org.gnome.mutter.wayland.gschema.xml.in:22
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
#, fuzzy
msgid "Switch to VT 5"
msgstr "انتقل إلى مساحة العمل 5"
#: data/org.gnome.mutter.wayland.gschema.xml.in:26
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
#, fuzzy
msgid "Switch to VT 6"
msgstr "انتقل إلى مساحة العمل 6"
#: data/org.gnome.mutter.wayland.gschema.xml.in:30
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
#, fuzzy
msgid "Switch to VT 7"
msgstr "انتقل إلى مساحة العمل 7"
#: data/org.gnome.mutter.wayland.gschema.xml.in:34
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#, fuzzy
msgid "Switch to VT 8"
msgstr "انتقل إلى مساحة العمل 8"
#: data/org.gnome.mutter.wayland.gschema.xml.in:38
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#, fuzzy
msgid "Switch to VT 9"
msgstr "انتقل إلى مساحة العمل 9"
#: data/org.gnome.mutter.wayland.gschema.xml.in:42
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#, fuzzy
msgid "Switch to VT 10"
msgstr "انتقل إلى مساحة العمل 10"
#: data/org.gnome.mutter.wayland.gschema.xml.in:46
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#, fuzzy
msgid "Switch to VT 11"
msgstr "انتقل إلى مساحة العمل 11"
#: data/org.gnome.mutter.wayland.gschema.xml.in:50
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#, fuzzy
msgid "Switch to VT 12"
msgstr "انتقل إلى مساحة العمل 12"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1866
#, c-format
msgid "Mode Switch (Group %d)"
msgstr ""
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1888
msgid "Switch monitor"
msgstr "غيّر الشاشة"
#: src/backends/meta-input-settings.c:1890
msgid "Show on-screen help"
msgstr ""
#: src/backends/meta-monitor-manager.c:879
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "شاشة مدمجة"
#: src/backends/meta-monitor-manager.c:902
#: ../src/backends/meta-monitor-manager.c:391
msgid "Unknown"
msgstr "غير معروفة"
#: src/backends/meta-monitor-manager.c:904
#: ../src/backends/meta-monitor-manager.c:393
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:912
#: ../src/backends/meta-monitor-manager.c:401
#, 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:476
#, fuzzy, c-format
#: ../src/compositor/compositor.c:456
#, 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 "يعمل مدير مزج آخر على الشاشة %i والعرض \"%s\"."
#: src/core/bell.c:194
#: ../src/core/bell.c:185
msgid "Bell event"
msgstr "حدث جرس"
#: src/core/display.c:608
#, fuzzy, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "فشل فتح عرض نظام نوافذ إكس '%s'\n"
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "عطّل الاتصال بمدير الجلسة"
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "استبدل بمدير النوافذ الذي يعمل"
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "حدّد رقم هويّة إدارة الجلسة"
#: src/core/main.c:206
msgid "X Display to use"
msgstr "معراض س الذي سيستعمل"
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "ابدأ الجلسة من ملف محفوظ"
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "اجعل نداءات س متزامنة"
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr ""
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr ""
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr ""
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#: ../src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "”‏%s“ لا يستجيب."
#: src/core/meta-close-dialog-default.c:149
#: ../src/core/delete.c:129
msgid "Application is not responding."
msgstr "لا يستجيب التطبيق"
#: src/core/meta-close-dialog-default.c:154
#: ../src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr "ربما ترغب في الانتظار قليلا ليُكمِل أو إجبار التطبيق على الإنهاء كُلّية."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "أ_جبر الإنهاء"
#: src/core/meta-close-dialog-default.c:161
#: ../src/core/delete.c:141
msgid "_Wait"
msgstr "ا_نتظر"
#: src/core/mutter.c:39
#, fuzzy, c-format
#: ../src/core/delete.c:141
msgid "_Force Quit"
msgstr "أ_جبر الإنهاء"
#: ../src/core/display.c:562
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "فشل فتح عرض نظام نوافذ إكس '%s'\n"
#: ../src/core/main.c:176
msgid "Disable connection to session manager"
msgstr "عطّل الاتصال بمدير الجلسة"
#: ../src/core/main.c:182
msgid "Replace the running window manager"
msgstr "استبدل بمدير النوافذ الذي يعمل"
#: ../src/core/main.c:188
msgid "Specify session management ID"
msgstr "حدّد رقم هويّة إدارة الجلسة"
#: ../src/core/main.c:193
msgid "X Display to use"
msgstr "معراض س الذي سيستعمل"
#: ../src/core/main.c:199
msgid "Initialize session from savefile"
msgstr "ابدأ الجلسة من ملف محفوظ"
#: ../src/core/main.c:205
msgid "Make X calls synchronous"
msgstr "اجعل نداءات س متزامنة"
#: ../src/core/main.c:212
msgid "Run as a wayland compositor"
msgstr ""
#: ../src/core/main.c:220
msgid "Run as a full display server, rather than nested"
msgstr ""
#: ../src/core/mutter.c:39
#, c-format
msgid ""
"mutter %s\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright (C) 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"
@@ -592,52 +547,46 @@ msgstr ""
"هذا برنامج حر، راجع المصدر لشروط النسخ.\n"
"لا يوجد أي ضمان: و لا حتى ضمان قابلية التسويق أو المناسبة لأي هدف.\n"
#: src/core/mutter.c:53
#: ../src/core/mutter.c:53
msgid "Print version"
msgstr "اطبع الإصدارة"
#: src/core/mutter.c:59
#: ../src/core/mutter.c:59
msgid "Mutter plugin to use"
msgstr "ملحق مَتَر الذي سيُستخدم"
#: src/core/prefs.c:1997
#: ../src/core/prefs.c:2004
#, c-format
msgid "Workspace %d"
msgstr "مساحة العمل %d"
#: src/core/screen.c:580
#, fuzzy, c-format
#: ../src/core/screen.c:525
#, 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 ""
"الشاشة \"%s\" لها مدير نوافذ بالفعل، حاول استعمال خيار التبديل --replace "
"لتحُلّ محلّ مدير النوافذ الحالي."
#: src/core/screen.c:665
#, fuzzy, c-format
msgid "Screen %d on display %s is invalid\n"
#: ../src/core/screen.c:607
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "الشاشة %d على العرض '%s' غير صحيحة\n"
#: src/core/util.c:120
#: ../src/core/util.c:118
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "جُمِّع مَتَر دون دعم للنمط المطنب\n"
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr ""
#: src/x11/session.c:1815
#, fuzzy
#: ../src/x11/session.c:1815
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 &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
msgstr ""
"هذه النوافذ لا تدعم &quot;احفظ الضبط الحالي&quot; يجب إعادة تشغيلها يدويا "
"عند الولوج المرة القادمة."
#: src/x11/window-props.c:559
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (على %s)"

124
po/ca.po
View File

@@ -13,9 +13,9 @@ msgstr ""
"Project-Id-Version: metacity 2.24\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-07-26 13:44+0000\n"
"PO-Revision-Date: 2017-07-2614:45+0100\n"
"Last-Translator: Jordi Mas <jmas@softcatala.org>\n"
"POT-Creation-Date: 2017-04-21 21:33+0000\n"
"PO-Revision-Date: 2016-03-13 14:45+0100\n"
"Last-Translator: Gil Forcada <gilforcada@guifi.net>\n"
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
@@ -105,8 +105,10 @@ msgid "Switch to previous window of an application"
msgstr "Canvia a la finestra anterior d'una aplicació"
#: data/50-mutter-navigation.xml:76
#, fuzzy
#| msgid "Switch system controls directly"
msgid "Switch system controls"
msgstr "Canvia els controls del sistema"
msgstr "Canvia immediatament entre els controls del sistema"
#: data/50-mutter-navigation.xml:81
msgid "Switch to previous system control"
@@ -277,6 +279,12 @@ msgstr ""
"finestres"
#: data/org.gnome.mutter.gschema.xml.in:8
#, fuzzy
#| 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."
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 "
@@ -325,6 +333,11 @@ msgid "Workspaces are managed dynamically"
msgstr "Els espais de treball es gestionen dinàmicament"
#: data/org.gnome.mutter.gschema.xml.in:41
#, fuzzy
#| msgid ""
#| "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)."
msgid ""
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
@@ -363,6 +376,11 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Retarda el canvi del focus fins que s'aturi el punter"
#: data/org.gnome.mutter.gschema.xml.in:69
#, fuzzy
#| 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."
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 "
@@ -377,6 +395,10 @@ msgid "Draggable border width"
msgstr "Amplada del contorn arrossegable"
#: data/org.gnome.mutter.gschema.xml.in:80
#, fuzzy
#| msgid ""
#| "The amount of total draggable borders. If the theme's visible borders are "
#| "not enough, invisible borders will be added to meet this value."
msgid ""
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
@@ -413,7 +435,7 @@ msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Habilita les funcionalitats experimentals"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
@@ -421,32 +443,20 @@ msgid ""
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
"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."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "Selecció de finestra entre les emergents d'una pestanya"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Cancel·lació de les finestres emergents a les pestanyes"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Canvia configuracions de monitor"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Gira la configuració del monitor integrada"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Canvia al terminal virtual 1"
@@ -498,7 +508,7 @@ msgstr "Canvia al terminal virtual 12"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1848
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Mode de commutació (grup %d)"
@@ -506,37 +516,37 @@ msgstr "Mode de commutació (grup %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1870
msgid "Switch monitor"
msgstr "Commuta el monitor"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1872
msgid "Show on-screen help"
msgstr "Mostra l'ajuda en pantalla"
#: src/backends/meta-monitor-manager.c:925
#: src/backends/meta-monitor-manager.c:783
msgid "Built-in display"
msgstr "Pantalla integrada"
#: src/backends/meta-monitor-manager.c:948
#: src/backends/meta-monitor-manager.c:806
msgid "Unknown"
msgstr "Desconeguda"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:808
msgid "Unknown Display"
msgstr "Pantalla desconeguda"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:958
#: src/backends/meta-monitor-manager.c:816
#, 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:476
#: src/compositor/compositor.c:474
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -548,6 +558,32 @@ msgstr ""
msgid "Bell event"
msgstr "Esdeveniment de campana"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» no està responent."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "L'aplicació no està responent."
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Podeu esperar un moment perquè continuï o podeu forçar-ne la sortida "
"completa."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Força'n la sortida"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Espera"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@@ -595,32 +631,6 @@ msgstr "Funciona com a compositor imbricat"
msgid "Run as a full display server, rather than nested"
msgstr "Funciona com a servidor de pantalla completa, en comptes d'imbricat"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» no està responent."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "L'aplicació no està responent."
#: 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 ""
"Podeu esperar un moment perquè continuï o podeu forçar-ne la sortida "
"completa."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Força'n la sortida"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Espera"
#: src/core/mutter.c:39
#, c-format
msgid ""

134
po/cs.po
View File

@@ -13,10 +13,10 @@ msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-02 10:05+0000\n"
"PO-Revision-Date: 2017-08-03 08:15+0200\n"
"POT-Creation-Date: 2017-03-07 12:40+0000\n"
"PO-Revision-Date: 2017-03-09 07:51+0100\n"
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
"Language-Team: čeština <gnome-cs-list@gnome.org>>\n"
"Language-Team: čeština <gnome-cs-list@gnome.org>\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -361,8 +361,9 @@ msgid ""
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr ""
"Je-li zapnuto a režim zaměření je buď „sloppy“ nebo „mouse“, pak se zaměření "
"nezmění hned, když vstoupíte do kona, ale až se přestane pohybovat ukazatel."
"Je-li zapnuto a režim zaměření je buď „sloppy“ nebo „mouse“, pak se "
"zaměření nezmění hned, když vstoupíte do kona, ale až se přestane pohybovat "
"ukazatel."
#: data/org.gnome.mutter.gschema.xml.in:79
msgid "Draggable border width"
@@ -400,56 +401,14 @@ msgstr ""
"Je-li zapnuto, nová okna budou vždy umístěna ve středu aktivní obrazovky "
"monitoru."
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Povolit experimentální funkce"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Chcete-li povolit experimentální funkce, přidejte klíčové slovo funkce do "
"seznamu. Zda funkce vyžaduje restartování kompozitoru, závisí na dané "
"funkci. Ne u každé experimentální funkce je vyžadováno, aby byla stále "
"dostupná nebo konfigurovatelná. Neočekávejte, že by bylo v tomto nastavení "
"přidáno něco, co by do budoucna přineslo vylepšení. V současné době jsou "
"možná tato klíčová slova: • „monitor-config-manager“ použijte se nový "
"systém nastavení monitoru, jehož cílem je nahradit starý. Poskytuje "
"aplikacím pro nastavování API vyšší úrovně, stejně jako možnost nastavení "
"podle logického škálování monitorů. • „scale-monitor-framebuffer“ zajistí, "
"aby byl mutter výchozí pro logické uspořádání monitorů v logickém "
"souřadnicovém prostoru pixelů, zatímco škáluje přímo v grafické vyrovnávací "
"paměti, namísto v obsahu oken, aby se postaral o správu montorů s HiDPI. "
"Nevyžaduje restart. Aby tato funkce fungovala, je zapotřebí povolit rovněž "
"„monitor-config-manager“."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Vybrat okno z překryvné nabídky tabulátoru"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Zrušit překryvné okno tabulátoru"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Přepnout nastavení monitoru"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Postupně mění vestavěná nastavení monitoru"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Přepnout na VT 1"
@@ -498,14 +457,10 @@ msgstr "Přepnout na VT 11"
msgid "Switch to VT 12"
msgstr "Přepnout na VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Znovu povolit klávesové zkratky"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1800
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Přepínač režimu (skupina %d)"
@@ -513,37 +468,37 @@ msgstr "Přepínač režimu (skupina %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1822
msgid "Switch monitor"
msgstr "Přepnout monitor"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1824
msgid "Show on-screen help"
msgstr "Zobrazit nápovědu na obrazovce"
#: src/backends/meta-monitor-manager.c:927
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Vestavěný displej"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Neznámý"
#: src/backends/meta-monitor-manager.c:952
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Neznámý displej"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:960
#: src/backends/meta-monitor-manager.c:708
#, 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:476
#: src/compositor/compositor.c:474
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -553,6 +508,32 @@ msgstr "Jiný kompozitní správce již běží na obrazovce %i displeje „%s
msgid "Bell event"
msgstr "Událost zvonku"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ nereaguje."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Aplikace nereaguje."
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Je možné chvíli počkat, aby aplikace mohla pokračovat, nebo si vynutit úplné "
"ukončení aplikace."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Vynutit ukončení"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Počkat"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@@ -594,32 +575,6 @@ msgstr "Spustit jako podkladový kompozitor"
msgid "Run as a full display server, rather than nested"
msgstr "Spustit jako plnohodnotný server displeje, nikoliv vnořeně"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ nereaguje."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Aplikace nereaguje."
#: 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 ""
"Je možné chvíli počkat, aby aplikace mohla pokračovat, nebo si vynutit úplné "
"ukončení aplikace."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Vynutit ukončení"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Počkat"
#: src/core/mutter.c:39
#, c-format
msgid ""
@@ -677,10 +632,11 @@ msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."
msgstr ""
"Tato okna nepodporují „uložení aktuálního nastavení“ a po svém příštím "
"přihlášení je budete muset spustit ručně."
"Tato okna nepodporují „uložení aktuálního nastavení“ a po svém "
"příštím přihlášení je budete muset spustit ručně."
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (na %s)"

159
po/es.po
View File

@@ -12,10 +12,10 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter.master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-02 10:05+0000\n"
"PO-Revision-Date: 2017-08-03 09:59+0200\n"
"POT-Creation-Date: 2017-02-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-17 11:38+0100\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: es <gnome-es-list@gnome.org>\n"
"Language: es\n"
@@ -275,6 +275,11 @@ msgstr ""
"Modificador que usar para extender las operaciones de gestión sobre ventanas"
#: 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."
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 "
@@ -323,6 +328,10 @@ msgid "Workspaces are managed dynamically"
msgstr "Las áreas de trabajo se gestionan dinámicamente"
#: data/org.gnome.mutter.gschema.xml.in:41
#| msgid ""
#| "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)."
msgid ""
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
@@ -361,6 +370,10 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Retrasar el cambio de foco hasta detener el puntero"
#: 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."
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 "
@@ -375,6 +388,9 @@ msgid "Draggable border width"
msgstr "Anchura arrastrable del borde"
#: data/org.gnome.mutter.gschema.xml.in:80
#| msgid ""
#| "The amount of total draggable borders. If the theme's visible borders are "
#| "not enough, invisible borders will be added to meet this value."
msgid ""
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
@@ -409,57 +425,14 @@ msgstr ""
"Cuando es cierto, las ventanas nuevas se colocarán siempre en el centro de "
"la pantalla activa del monitor."
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Activar las características experimentales"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Para activar las características experimentales, añada la palabra clave de "
"la característica a la lista. Depende de la característica que se deba "
"reiniciar o no el compositor. Cualquier característica experimental puede no "
"estar disponible o ser configurable. No espere que lo que se añada en este "
"escenario sirva como prueba futura. Las palabras clave actualmente "
"disponibles son: • \"monitor-config-manager\" - utiliza el nuevo sistema de "
"configuración del monitor, destinado a sustituir el antiguo. Esto permite "
"que las aplicaciones de configuración usen una API de configuración de nivel "
"superior, así como la capacidad de configurar el escalado de monitores "
"lógicos. • \"scale-monitor-framebuffer\" - convierte a mutter en ña manera "
"predeterminada de disponer monitores lógicos en un espacio lógico de "
"coordenadas de píxeles, al escalar framebuffers de monitores framebuffers en "
"lugar del contenido de ventana, para administrar monitores HiDPI. No "
"requiere un reinicio. También es necesario activar \"monitor-config-manager"
"\" para activar esta función."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Seleccionar ventana de la pestaña emergente"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Cancelar pestaña emergente"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Cambiar la configuración del monitor"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Rota la configuración del monitor empotrado"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Cambiar al VT 1"
@@ -508,53 +481,53 @@ msgstr "Cambiar al VT 11"
msgid "Switch to VT 12"
msgstr "Cambiar al VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Volver a activar los atajos"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1759
#, c-format
#| msgid "Mode Switch: Mode %d"
msgid "Mode Switch (Group %d)"
msgstr "Cambiar modo (grupo %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Cambiar monitor"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Mostrar la ayuda en pantalla"
#: src/backends/meta-monitor-manager.c:927
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Pantalla integrada"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Desconocida"
#: src/backends/meta-monitor-manager.c:952
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Pantalla desconocida"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:960
#: src/backends/meta-monitor-manager.c:708
#, 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:476
#: src/compositor/compositor.c:471
#, c-format
#| msgid ""
#| "Another compositing manager is already running on screen %i on display "
#| "\"%s\"."
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
@@ -565,8 +538,35 @@ msgstr ""
msgid "Bell event"
msgstr "Evento de campana"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» no está respondiendo."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "La aplicación no está respondiendo."
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Puede elegir esperar un rato para ver si continua o forzar la aplicación "
"para cerrarla completamente."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Forzar la salida"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Esperar"
#: src/core/display.c:608
#, c-format
#| msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display “%s”\n"
msgstr "Ocurrió un error al abrir la pantalla de X Window System «%s»\n"
@@ -606,34 +606,14 @@ msgstr "Ejecutar como compositor anidado"
msgid "Run as a full display server, rather than nested"
msgstr "Ejecutar como servidor completo, en lugar de anidado"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» no está respondiendo."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "La aplicación no está respondiendo."
#: 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 ""
"Puede elegir esperar un rato para ver si continua o forzar la aplicación "
"para cerrarla completamente."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Forzar la salida"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Esperar"
#: src/core/mutter.c:39
#, c-format
#| msgid ""
#| "mutter %s\n"
#| "Copyright (C) 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"
msgid ""
"mutter %s\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
@@ -663,6 +643,9 @@ msgstr "Área de trabajo %d"
#: src/core/screen.c:580
#, c-format
#| msgid ""
#| "Display \"%s\" already has a window manager; try using the --replace "
#| "option to replace the current window manager."
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
@@ -672,6 +655,7 @@ msgstr ""
#: src/core/screen.c:665
#, c-format
#| msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display “%s” is invalid\n"
msgstr "La ventana %d en la pantalla «%s» no es válida\n"
@@ -685,6 +669,9 @@ msgid "Mode Switch: Mode %d"
msgstr "Cambiar modo: modo %d"
#: src/x11/session.c:1815
#| msgid ""
#| "These windows do not support &quot;save current setup&quot; and will have "
#| "to be restarted manually next time you log in."
msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."

125
po/fr.po
View File

@@ -17,10 +17,10 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-13 15:47+0000\n"
"PO-Revision-Date: 2017-08-15 09:16+0200\n"
"POT-Creation-Date: 2017-02-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-17 21:09+0100\n"
"Last-Translator: Claude Paroz <claude@2xlibre.net>\n"
"Language-Team: GNOME French Team <gnomefr@traduc.org>\n"
"Language: fr\n"
@@ -410,59 +410,16 @@ msgstr ""
"Si true (vrai), les nouvelles fenêtres seront toujours placées au centre de "
"l'écran actif du moniteur."
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Activer les fonctionnalités expérimentales"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Pour activer les fonctionnalités expérimentales, ajoutez le mot-clé de la "
"fonctionnalité dans la liste. Selon la fonctionnalité, il peut être nécessaire "
"de redémarrer le compositeur. Chaque fonctionnalité expérimentale peut "
"disparaître ou ne plus être configurable. N'attendez pas à ce que le contenu de "
"ce réglage soit stable dans le temps. Les mots-clés actuellement possibles "
"sont : • « monitor-config-manager » — utiliser le nouveau système de "
"configuration de moniteur qui remplacera l'ancien à terme. Cela active une "
"API de configuration de plus haut niveau exploitable par les applications de "
"configuration. Il permet aussi de configurer par échelle de moniteur logique. "
"• « scale-monitor-framebuffer » — demande à mutter d'utiliser par défaut une "
"disposition par moniteur logique dans un espace de coordonnées de pixels logique, "
"tout en mettant à l'échelle les « framebuffers » de moniteur au lieu des contenus "
"de fenêtre pour pouvoir gérer les moniteurs à haute densité. Cela ne nécessite "
"pas de redémarrage. L'activation de « monitor-config-manager » est requis pour "
"que cette fonctionnalité soit activée."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr ""
"Sélectionner la fenêtre dans la vue qui apparaît suite à un appui sur la "
"touche tab"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Fermer la vue qui apparaît suite à un appui sur la touche tab"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Changer de configuration de moniteur"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Passe à la prochaine configuration intégrée de moniteur"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Passer à l'émulateur de terminal 1"
@@ -511,14 +468,10 @@ msgstr "Passer à l'émulateur de terminal 11"
msgid "Switch to VT 12"
msgstr "Passer à l'émulateur de terminal 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Réactiver les raccourcis"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1759
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Changement de mode (groupe %d)"
@@ -526,37 +479,37 @@ msgstr "Changement de mode (groupe %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Changer de moniteur"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Afficher l'aide à l'écran"
#: src/backends/meta-monitor-manager.c:927
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Affichage intégré"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Inconnu"
#: src/backends/meta-monitor-manager.c:952
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Affichage inconnu"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:960
#: src/backends/meta-monitor-manager.c:708
#, 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:476
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -568,6 +521,32 @@ msgstr ""
msgid "Bell event"
msgstr "Évènement sonore"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "« %s » ne répond pas."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "L'application ne répond pas."
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Vous pouvez patienter un instant pour continuer ou forcer l'application à "
"quitter définitivement."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Forcer à quitter"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Attendre"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@@ -609,32 +588,6 @@ msgstr "Lancer comme un compositeur imbriqué"
msgid "Run as a full display server, rather than nested"
msgstr "Lancer comme un serveur d'affichage complet, plutôt qu'imbriqué"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "« %s » ne répond pas."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "L'application ne répond pas."
#: 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 ""
"Vous pouvez patienter un instant pour continuer ou forcer l'application à "
"quitter définitivement."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Forcer à quitter"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Attendre"
#: src/core/mutter.c:39
#, c-format
msgid ""

112
po/fur.po
View File

@@ -8,15 +8,15 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-07-22 09:45+0000\n"
"PO-Revision-Date: 2017-07-22 22:53+0200\n"
"POT-Creation-Date: 2017-04-21 21:33+0000\n"
"PO-Revision-Date: 2017-04-30 15:41+0200\n"
"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
"Language-Team: Friulian <fur@li.org>\n"
"Language: fur\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.2\n"
"X-Generator: Poedit 1.8.12\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -405,14 +405,10 @@ msgid ""
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
"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."
msgstr ""
"Par abilitâ lis funzionalitâts sperimentâls, zonte la peraule clâf de "
"funzionalitât ae liste. Il fat che la funzionalitât e vedi bisugne di tornâ "
@@ -420,33 +416,19 @@ msgstr ""
"funzionalitât sperimentâl no je necessarie che e sedi disponibile o "
"configurabile. No sta spietâti di zontâ alc in cheste impostazion e pensâ "
"che e duredi tal timp. Atualmentri lis peraulis clâf pussibilis a son: • "
"“monitor-config-manager” — al dopre il gnûf sisteme di configurazion dal "
"visôr, fat par sostituî chel vecjo. Chest al abilite une API di nivel "
"superiôr che e pues jessi doprade di aplicazions di configurazion, cussì "
"come la capacitât di configurâ par scjale di monitor logjic. • “scale-"
"monitor-framebuffer” — al rint come predefinît par mutter la disposizion dai "
"visôrs logjics intun spazi logjic di coordenadis dai pixel, intant i "
"framebuffer dai visôrs par scjalâ, invezit dal contignût dal barcon, a "
"gjestissin i visôrs HiDPI. Nol covente tornâ a inviâ. In plui al è necessari "
"abilitâ “monitor-config-manager” par fâ in mût che cheste funzionalitât e "
"sedi abilitade."
"“scale-monitor-framebuffer” — al rint come predefinît par mutter la "
"disposizion dai visôrs logjics intun spazi logjic di coordenadis dai pixel, "
"intant i framebuffer dai visôrs par scjalâ, invezit dal contignût dal "
"barcon, a gjestissin i visôrs HiDPI. Nol covente tornâ a inviâ."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "Selezione barcon dal tab popup"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Anule tab popup"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Cambie configurazions visôr"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Al volte la configurazion dal visôr integrât"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Passe al VT 1"
@@ -498,7 +480,7 @@ msgstr "Passe al VT 12"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1848
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Cambie mût (Grup %d)"
@@ -506,37 +488,37 @@ msgstr "Cambie mût (Grup %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1870
msgid "Switch monitor"
msgstr "Cambie visôr"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1872
msgid "Show on-screen help"
msgstr "Mostre jutori a schermi"
#: src/backends/meta-monitor-manager.c:925
#: src/backends/meta-monitor-manager.c:783
msgid "Built-in display"
msgstr "Display integrât"
#: src/backends/meta-monitor-manager.c:948
#: src/backends/meta-monitor-manager.c:806
msgid "Unknown"
msgstr "No cognossût"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:808
msgid "Unknown Display"
msgstr "Display no cognossût"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:958
#: src/backends/meta-monitor-manager.c:816
#, 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:476
#: src/compositor/compositor.c:474
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -548,6 +530,32 @@ msgstr ""
msgid "Bell event"
msgstr "Event cjampane"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” nol rispuint."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "La aplicazion no rispuint."
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Al è pussibil sielzi di spietâ un pôc lassant che la aplicazion e continui o "
"sfuarçâ la aplicazion par sierâle dal dut."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "Sfuarce _Jessude"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Spiete"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@@ -589,32 +597,6 @@ msgstr "Eseguìs come compositor nidiât"
msgid "Run as a full display server, rather than nested"
msgstr "Eseguìs come servidôr display complet, invezit che nidiât"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” nol rispuint."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "La aplicazion no rispuint."
#: 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 ""
"Al è pussibil sielzi di spietâ un pôc lassant che la aplicazion e continui o "
"sfuarçâ la aplicazion par sierâle dal dut."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "Sfuarce _Jessude"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Spiete"
#: src/core/mutter.c:39
#, c-format
msgid ""

166
po/gl.po
View File

@@ -10,21 +10,22 @@
# Fran Diéguez <frandieguez@gnome.org>, 2009, 2010, 2011, 2012.
# Leandro Regueiro <leandro.regueiro@gmail.com>, 2012.
# Fran Dieguez <frandieguez@gnome.org>, 2012, 2013, 2014, 2015, 2016, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: gl\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=mutter"
"&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-02 10:05+0000\n"
"PO-Revision-Date: 2017-08-09 17:55+0200\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-02-28 06:20+0000\n"
"PO-Revision-Date: 2017-03-11 03:02+0100\n"
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
"Language-Team: Galician\n"
"Language-Team: Galician <gnome-l10n-gl@gnome.org>\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: Gtranslator 2.91.7\n"
"X-Project-Style: gnome\n"
#: data/50-mutter-navigation.xml:6
@@ -277,6 +278,11 @@ msgstr ""
"Modificador que se vai usar para as accións modificadas de xestión de xanela"
#: 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."
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 "
@@ -322,6 +328,10 @@ msgid "Workspaces are managed dynamically"
msgstr "Os espazos de traballo xestiónanse dinamicamente"
#: data/org.gnome.mutter.gschema.xml.in:41
#| msgid ""
#| "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)."
msgid ""
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
@@ -360,6 +370,10 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Retrasar o cambio de enfoque até que o punteiro se deteña ao moverse"
#: 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."
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 "
@@ -374,6 +388,9 @@ msgid "Draggable border width"
msgstr "Anchura arrastrábel do bordo"
#: data/org.gnome.mutter.gschema.xml.in:80
#| msgid ""
#| "The amount of total draggable borders. If the theme's visible borders are "
#| "not enough, invisible borders will be added to meet this value."
msgid ""
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
@@ -406,57 +423,14 @@ msgstr ""
"Cando está verdadeiro, as novas xanelas sempre se porán no centro da "
"pantalla activa."
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Activar as características experimentais"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Para activar as características experimentais, engada a palabra chave da "
"característica á lista. Depende da característica que se deba reiniciar ou "
"non o compositor. Calquera característica experimental pode non estar "
"dispoñíbel ou ser configurábel. Non agarde que o que se engada neste "
"escenario sirva como proba futura. As palabras chave actualmente dispoñíbeis "
"son: “monitor-config-manager” — usa o novo sistema de configuración do "
"monitor, destinado a substituír o antigo. Isto permite que os aplicativos de "
"configuración usen unha API de configuración de nivel superior, así como a "
"capacidade de configurar o escalado de monitores lóxicos. • “scale-monitor-"
"framebuffer” — convirte a mutter na maneira predeterminada de dispor "
"monitores lóxicos nun espacio lóxico de coordenadas de íxeles, a escalar "
"framebuffers de monitores framebuffers no lugar do contido de xnalea, para "
"administrar monitores HiDPI. Non require un reinicio. Tamén é preciso "
"activar «monitor-config-manager» para activar esta función."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Seleccionar xanela da lapela emerxente"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Cancelar lapela emerxente"
#: data/org.gnome.mutter.gschema.xml.in:161
#| msgid "Switch monitor"
msgid "Switch monitor configurations"
msgstr "Cambiar preferencias do monitor"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Rota a configuración do monitor embebido"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Cambiar á VT 1"
@@ -505,53 +479,53 @@ msgstr "Cambiar á VT 11"
msgid "Switch to VT 12"
msgstr "Cambiar á VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Reactivar os atallos"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1800
#, c-format
#| msgid "Mode Switch: Mode %d"
msgid "Mode Switch (Group %d)"
msgstr "Modo conmutador (Grupo %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1822
msgid "Switch monitor"
msgstr "Cambiar monitor"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1824
msgid "Show on-screen help"
msgstr "Mostrar axuda en pantalla"
#: src/backends/meta-monitor-manager.c:927
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Pantalla embebida"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Descoñecido"
#: src/backends/meta-monitor-manager.c:952
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Pantalla descoñecida"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:960
#: src/backends/meta-monitor-manager.c:708
#, 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:476
#: src/compositor/compositor.c:471
#, c-format
#| msgid ""
#| "Another compositing manager is already running on screen %i on display "
#| "\"%s\"."
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
@@ -562,8 +536,35 @@ msgstr ""
msgid "Bell event"
msgstr "Evento de campá"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» non está respondendo."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "O Aplicativo non está respondendo."
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Pode elixir esperar un momento para ver se continúa ou forzar ao aplicativo "
"a pechar completamente."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Forzar a saída"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "Espe_rar"
#: src/core/display.c:608
#, c-format
#| msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display “%s”\n"
msgstr "Produciuse un erro ao abrir a visualización do X Window System «%s»\n"
@@ -603,34 +604,14 @@ msgstr "Executar como compositor anidado"
msgid "Run as a full display server, rather than nested"
msgstr "Executar como un servidor de pantalla completo, fronte a un aniñado"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» non está respondendo."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "O Aplicativo non está respondendo."
#: 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 ""
"Pode elixir esperar un momento para ver se continúa ou forzar ao aplicativo "
"a pechar completamente."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Forzar a saída"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "Espe_rar"
#: src/core/mutter.c:39
#, c-format
#| msgid ""
#| "mutter %s\n"
#| "Copyright (C) 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"
msgid ""
"mutter %s\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
@@ -659,6 +640,9 @@ msgstr "Espazo de traballo %d"
#: src/core/screen.c:580
#, c-format
#| msgid ""
#| "Display \"%s\" already has a window manager; try using the --replace "
#| "option to replace the current window manager."
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
@@ -668,6 +652,7 @@ msgstr ""
#: src/core/screen.c:665
#, c-format
#| msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display “%s” is invalid\n"
msgstr "A pantalla %d na visualización «%s» non é válida\n"
@@ -681,6 +666,9 @@ msgid "Mode Switch: Mode %d"
msgstr "Modo conmutador: Modo %d"
#: src/x11/session.c:1815
#| msgid ""
#| "These windows do not support &quot;save current setup&quot; and will have "
#| "to be restarted manually next time you log in."
msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."

6719
po/hr.po

File diff suppressed because it is too large Load Diff

125
po/hu.po
View File

@@ -12,15 +12,15 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-02 10:05+0000\n"
"PO-Revision-Date: 2017-08-09 08:51+0200\n"
"Last-Translator: Meskó Balázs <meskobalazs@fedoraproject.org>\n"
"POT-Creation-Date: 2017-05-14 09:49+0000\n"
"PO-Revision-Date: 2017-05-14 21:36+0200\n"
"Last-Translator: Balázs Úr <urbalazs@gmail.com>\n"
"Language-Team: Hungarian <gnome-hu-list at gnome dot org>\n"
"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.3\n"
"X-Generator: Lokalize 1.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: data/50-mutter-navigation.xml:6
@@ -409,46 +409,30 @@ msgid ""
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
"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."
msgstr ""
"A kísérleti funkciók engedélyezéséhez adja hozzá a funkció kulcsszavát a "
"listához. A funkció a betűszedő újraindítását igényelheti az adott "
"funkciótól függően. Egyik kísérleti funkciónál sem szükséges, hogy továbbra "
"is elérhető vagy beállítható legyen. Ne várja el azt, hogy ha bármit hozzáad "
"ehhez a beállításhoz, akkor az a jövőben is elérhető lesz. Jelenleg "
"lehetséges kulcsszavak: • „monitor-config-manager” az új monitor "
"konfigurációs rendszer használata, amely a régi leváltására készül. Ez egy "
"magasabb szintű konfigurációs API-t biztosít a beállító alkalmazásoknak, "
"valamint lehetővé teszi a logikai monitorok különálló méretezését. • „scale-"
"monitor-framebuffer” — alapértelmezetté teszi a mutter programot a logikai "
"monitorok elrendezéséhez egy logikai képpontkoordináta-térben, miközben "
"átméretezi a monitor keretpufferét az ablaktartalom helyett azért, hogy "
"kezelje a HiDPI monitorokat. Nem igényel újraindítást. Ezen funkció "
"bekapcsolásához a „monitor-config-manager” engedélyezése is szükséges."
"listához. A funkció a betűszedő újraindítását igényelheti az adott funkciótól "
"függően. Egyik kísérleti funkciónál sem szükséges, hogy továbbra is elérhető "
"vagy beállítható legyen. Ne várja el azt, hogy ha bármit hozzáad ehhez a "
"beállításhoz, akkor az a jövőben is elérhető lesz. Jelenleg lehetséges "
"kulcsszavak: • „scale-monitor-framebuffer” alapértelmezetté teszi a mutter "
"programot a logikai monitorok elrendezéséhez egy logikai "
"képpontkoordináta-térben, miközben átméretezi a monitor keretpufferét az "
"ablaktartalom helyett azért, hogy kezelje a HiDPI monitorokat. Nem igényel "
"újraindítást."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "Ablakok kiválasztása tab billentyűre felugró ablakból"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Tab felugró kikapcsolása"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Monitorkonfiguráció átváltása"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Cserélgeti a beépített monitorkonfigurációkat"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Váltás az 1. VT-re"
@@ -497,14 +481,10 @@ msgstr "Váltás a 11. VT-re"
msgid "Switch to VT 12"
msgstr "Váltás a 12. VT-re"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Gyorsbillentyűk újraengedélyezése"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1848
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Módkapcsoló (%d. csoport)"
@@ -512,30 +492,30 @@ msgstr "Módkapcsoló (%d. csoport)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1870
msgid "Switch monitor"
msgstr "Monitorváltás"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1872
msgid "Show on-screen help"
msgstr "Képernyősúgó megjelenítése"
#: src/backends/meta-monitor-manager.c:927
#: src/backends/meta-monitor-manager.c:783
msgid "Built-in display"
msgstr "Beépített kijelző"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:806
msgid "Unknown"
msgstr "Ismeretlen"
#: src/backends/meta-monitor-manager.c:952
#: src/backends/meta-monitor-manager.c:808
msgid "Unknown Display"
msgstr "Ismeretlen kijelző"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:960
#: src/backends/meta-monitor-manager.c:816
#, c-format
msgid "%s %s"
msgstr "%s %s"
@@ -554,6 +534,32 @@ msgstr ""
msgid "Bell event"
msgstr "Csengetés esemény"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "„%s” nem válaszol."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Az alkalmazás nem válaszol."
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Várhat egy kicsit a folytatódására, vagy kikényszerítheti az alkalmazás "
"teljes kilépését."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Erőltetett kilépés"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "Vá_rakozás"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@@ -596,32 +602,6 @@ msgid "Run as a full display server, rather than nested"
msgstr ""
"Futtatás teljes megjelenítő kiszolgálóként az egymásba ágyazott helyett"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "„%s” nem válaszol."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Az alkalmazás nem válaszol."
#: 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 ""
"Várhat egy kicsit a folytatódására, vagy kikényszerítheti az alkalmazás "
"teljes kilépését."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Erőltetett kilépés"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "Vá_rakozás"
#: src/core/mutter.c:39
#, c-format
msgid ""
@@ -685,3 +665,4 @@ msgstr ""
#, c-format
msgid "%s (on %s)"
msgstr "%s (ezen: %s)"

View File

@@ -11,15 +11,15 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-21 04:46+0000\n"
"PO-Revision-Date: 2017-08-21 13:42+0700\n"
"POT-Creation-Date: 2017-04-21 21:33+0000\n"
"PO-Revision-Date: 2017-04-23 14:39+0700\n"
"Last-Translator: Kukuh Syafaat <syafaatkukuh@gmail.com>\n"
"Language-Team: Indonesian <gnome-l10n-id@googlegroups.com>\n"
"Language: id\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.3\n"
"X-Generator: Poedit 1.8.11\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: data/50-mutter-navigation.xml:6
@@ -417,11 +417,11 @@ msgstr ""
"daftar. Apakah fitur memerlukan nyala ulang kompositor tergantung pada fitur "
"yang diberikan. Setiap fitur eksperimental tidak diharuskan tetap tersedia, "
"atau dapat dikonfigurasi. Jangan berharap menambahkan apapun dalam "
"pengaturan ini kebal perubahan di masa depan. Saat ini kata kunci yang "
"mungkin: • scale-monitor-framebuffer — membuat bawaan mutter untuk tata "
"letak monitor logikal dalam ruang koordinat pixel logikal, sambil "
"menskalakan framebuffer monitor alih-alih konten jendela, untuk mengelola "
"monitor HiDPI. Tidak perlu mulai ulang."
"pengaturan ini sebagai bukti di masa depan. Saat ini kata kunci yang "
"mungkin: • \"scale-monitor-framebuffer\" — membuat mutter bawaan ke tata "
"letak monitor logikal dalam ruang koordinat pixel logikal, sementara skala "
"monitor framebuffer bukan konten jendela, untuk mengatur monitor HiDPI. "
"Tidak perlu nyala ulang."
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
@@ -431,14 +431,6 @@ msgstr "Pilih jendela dari popup tab"
msgid "Cancel tab popup"
msgstr "Batalkan popup tab"
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations"
msgstr "Tukar konfigurasi monitor bawaan"
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration"
msgstr "Memutar konfigurasi monitor bawaan"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Bertukar ke VT 1"
@@ -487,14 +479,10 @@ msgstr "Bertukar ke VT 11"
msgid "Switch to VT 12"
msgstr "Bertukar ke VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Aktifkan kembali pintasan"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2151
#: src/backends/meta-input-settings.c:1848
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Tukar Mode: (Grup %d)"
@@ -502,37 +490,37 @@ msgstr "Tukar Mode: (Grup %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2174
#: src/backends/meta-input-settings.c:1870
msgid "Switch monitor"
msgstr "Berpindah monitor"
#: src/backends/meta-input-settings.c:2176
#: src/backends/meta-input-settings.c:1872
msgid "Show on-screen help"
msgstr "Tampilkan bantuan pada layar"
#: src/backends/meta-monitor-manager.c:903
#: src/backends/meta-monitor-manager.c:783
msgid "Built-in display"
msgstr "Tampilan bawaan"
#: src/backends/meta-monitor-manager.c:926
#: src/backends/meta-monitor-manager.c:806
msgid "Unknown"
msgstr "Tak Dikenal"
#: src/backends/meta-monitor-manager.c:928
#: src/backends/meta-monitor-manager.c:808
msgid "Unknown Display"
msgstr "Tampilan Tak Dikenal"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:936
#: src/backends/meta-monitor-manager.c:816
#, 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:476
#: src/compositor/compositor.c:474
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -543,6 +531,31 @@ msgstr ""
msgid "Bell event"
msgstr "Bel peristiwa"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "\"%s\" tak merespon."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Aplikasi tak merespon."
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Anda bisa memilih untuk menunggu sebentar atau memaksa aplikasi keluar."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Matikan Paksa"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Tunggu"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@@ -584,31 +597,6 @@ msgstr "Jalankan sebagai kompositor bersarang"
msgid "Run as a full display server, rather than nested"
msgstr "Jalankan sebagai server tampilan penuh, ketimbang tampilan bersarang"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "\"%s\" tak merespon."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Aplikasi tak merespon."
#: 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 ""
"Anda bisa memilih untuk menunggu sebentar atau memaksa aplikasi keluar."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Matikan Paksa"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Tunggu"
#: src/core/mutter.c:39
#, c-format
msgid ""

203
po/kk.po
View File

@@ -6,17 +6,17 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-07-19 09:20+0000\n"
"PO-Revision-Date: 2017-07-27 17:28+0500\n"
"POT-Creation-Date: 2016-09-07 09:27+0000\n"
"PO-Revision-Date: 2016-09-09 21:12+0500\n"
"Last-Translator: Baurzhan Muftakhidinov <baurthefirst@gmail.com>\n"
"Language-Team: Kazakh <kk@li.org>\n"
"Language: kk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Generator: Poedit 1.8.9\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -270,10 +270,10 @@ msgstr ""
#: 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. Its 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 ""
#: data/org.gnome.mutter.gschema.xml.in:20
@@ -306,7 +306,7 @@ msgstr "Жұмыс орындары динамикалы түрде басқар
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether theres 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 ""
@@ -337,9 +337,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 ""
#: data/org.gnome.mutter.gschema.xml.in:79
@@ -348,7 +348,7 @@ msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the themes 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 ""
@@ -372,42 +372,14 @@ msgid ""
"screen of the monitor."
msgstr ""
#: 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. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Монитор баптауларын ауыстыру"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr ""
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Бірінші виртуалды терминалына ауысу"
@@ -456,109 +428,57 @@ msgstr "Он бірінші виртуалды терминалына ауысу
msgid "Switch to VT 12"
msgstr "Он екінші виртуалды терминалына ауысу"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#, c-format
msgid "Mode Switch (Group %d)"
msgstr ""
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1707
msgid "Switch monitor"
msgstr "Мониторды ауыстыру"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1709
msgid "Show on-screen help"
msgstr "Экрандағы көмекті көрсету"
#: src/backends/meta-monitor-manager.c:925
#: src/backends/meta-monitor-manager.c:514
msgid "Built-in display"
msgstr "Құрамындағы экран"
#: src/backends/meta-monitor-manager.c:948
#: src/backends/meta-monitor-manager.c:537
msgid "Unknown"
msgstr "Белгісіз"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:539
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:958
#: src/backends/meta-monitor-manager.c:547
#, 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:476
#: src/compositor/compositor.c:463
#, 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 ""
#: src/core/bell.c:194
msgid "Bell event"
msgstr ""
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr ""
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Сессиялар менеджеріне байланыстарды сөндіру"
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr ""
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Сессия менеджментінің ID-ін көрсету"
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Қолданылатын X дисплейі"
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr ""
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "X сервер шақыруларын синхронды қылу"
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr ""
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr ""
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr ""
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” жауап бермейді."
#: src/core/meta-close-dialog-default.c:149
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Қолданба жауап бермейді."
#: src/core/meta-close-dialog-default.c:154
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@@ -566,19 +486,60 @@ msgstr ""
"Сіз қолданба өз жұмысын жалғастырғанды күтіп, немесе оны мәжбүрлетіп жаба "
"аласыз."
#: src/core/meta-close-dialog-default.c:161
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Күту"
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Мәжбүрлі шығу"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Күту"
#: src/core/display.c:590
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr ""
#: 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 дисплейі"
#: 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 ""
#: 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/mutter.c:39
#, c-format
msgid ""
"mutter %s\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright (C) 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"
@@ -597,34 +558,34 @@ msgstr ""
msgid "Workspace %d"
msgstr "Жұмыс орны %d"
#: src/core/screen.c:580
#: src/core/screen.c:521
#, 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 ""
#: src/core/screen.c:665
#: src/core/screen.c:606
#, c-format
msgid "Screen %d on display %s is invalid\n"
msgid "Screen %d on display '%s' is invalid\n"
msgstr ""
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr ""
#: src/wayland/meta-wayland-tablet-pad.c:563
#: src/wayland/meta-wayland-tablet-pad.c:595
#, c-format
msgid "Mode Switch: Mode %d"
msgstr ""
#: src/x11/session.c:1815
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 &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
msgstr ""
#: src/x11/window-props.c:559
#: src/x11/window-props.c:548
#, c-format
msgid "%s (on %s)"
msgstr "%s (%s жерінде)"

120
po/lt.po
View File

@@ -6,16 +6,16 @@
# Tomas Kuliavas <tokul@users.sourceforge.net>, 2003.
# Žygimantas Beručka <zygis@gnome.org>, 2004-2007.
# Gintautas Miliauskas <gintautas@miliauskas.lt>, 2007-2009, 2010.
# Aurimas Černius <aurisc4@gmail.com>, 2013, 2014, 2015, 2016, 2017.
# Aurimas Černius <aurisc4@gmail.com>, 2013, 2014, 2015, 2016.
#
msgid ""
msgstr ""
"Project-Id-Version: lt\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-07-19 09:20+0000\n"
"PO-Revision-Date: 2017-07-24 23:59+0300\n"
"Last-Translator: Aurimas Černius <aurisc4@gmail.com>\n"
"POT-Creation-Date: 2017-03-02 18:41+0000\n"
"PO-Revision-Date: 2017-03-03 20:29+0200\n"
"Last-Translator: Moo\n"
"Language-Team: Lietuvių <gnome-lt@lists.akl.lt>\n"
"Language: lt\n"
"MIME-Version: 1.0\n"
@@ -23,7 +23,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
"%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Gtranslator 2.91.7\n"
"X-Generator: Poedit 1.8.11\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -401,56 +401,14 @@ msgstr ""
"Kai teigiama, nauji langai bus visada patalpinti aktyvaus monitoriaus ekrano "
"viduryje."
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Įjungti eksperimentines savybes"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Norėdami įjungti eksperimentines savybes, pridėkite į sąrašą raktinį žodį. "
"Ar savybė reikalauja kompozitoriaus paleidimo iš naujo priklauso nuo "
"konkrečios savybės. Nei viena eksperimentinė savybė privalo būti prieinama "
"ar konfigūruojama. Nesitikėkite, kad ką nors pridėjus į šį sąrašą, tai "
"išliks ir ateityje. Šiuo metu galimi raktažodžiai: • „monitor-config-"
"manager“ — naudoti naują monitorių konfigūracijos sistemą, kuria siekiama "
"pakeisti dabartinę. Tai leidžia programoms naudoti geriau konfigūruojamą "
"aukštesnio lygio API, taip pat galimybę konfigūruoti pagal loginę "
"monitoriaus skalę. • „scale-monitor-framebuffer“ — mutter numatytai išdėsto "
"loginius monitorius loginėje pikselių koordinačių erdvėje, tuo pat "
"ištempiant monitorių kadrų buferius vietoje langų turinio, tokiu būdu "
"valdant didelio tankio monitorius. Nereikalauja paleisti iš naujo. Taip pat "
"šiai savybei įjungti reikia, kad „monitor-config-manager“ būtų įjungta."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Pasirinkti langą iš tab iššokimo"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Atšaukti tab iššokimą"
#: data/org.gnome.mutter.gschema.xml.in:161
#| msgid "Switch monitor"
msgid "Switch monitor configurations"
msgstr "Perjungti monitorių konfigūracijas"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Suka integruotas monitorių konfigūracijas"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Persijungti į VT 1"
@@ -502,7 +460,7 @@ msgstr "Persijungti į VT 12"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1800
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Veiksenos perjungimas (Grupė %d)"
@@ -510,37 +468,37 @@ msgstr "Veiksenos perjungimas (Grupė %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1822
msgid "Switch monitor"
msgstr "Perjungti monitorių"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1824
msgid "Show on-screen help"
msgstr "Rodyti pagalbą ekrane"
#: src/backends/meta-monitor-manager.c:925
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Integruotas vaizduoklis"
#: src/backends/meta-monitor-manager.c:948
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Nežinomas"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Nežinomas vaizduoklis"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:958
#: src/backends/meta-monitor-manager.c:708
#, 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:476
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@@ -550,6 +508,30 @@ msgstr "Kita kompozicijos tvarkytuvė jau veikia ekrane %i vaizduoklyje „%s“
msgid "Bell event"
msgstr "Skambučio įvykis"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "%s neatsiliepia į komandas."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Programa neatsiliepia į komandas."
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr "Galite šiek tiek palaukti arba priverstinai uždaryti programą."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Priverstinai išeiti"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Laukti"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@@ -591,30 +573,6 @@ msgstr "Vykdyti kaip įdėtinį kompozitorių"
msgid "Run as a full display server, rather than nested"
msgstr "Vykdyti kaip visą vaizduoklio serverį, o ne įdėtinį"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "%s neatsiliepia į komandas."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Programa neatsiliepia į komandas."
#: 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 "Galite šiek tiek palaukti arba priverstinai uždaryti programą."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Priverstinai išeiti"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Laukti"
#: src/core/mutter.c:39
#, c-format
msgid ""

6199
po/ne.po

File diff suppressed because it is too large Load Diff

230
po/sl.po
View File

@@ -9,20 +9,19 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-07 10:01+0200\n"
"PO-Revision-Date: 2017-08-07 10:02+0200\n"
"POT-Creation-Date: 2017-02-14 08:48+0100\n"
"PO-Revision-Date: 2017-02-14 08:48+0100\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"Language: sl_SI\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
"%100==4 ? 3 : 0);\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Generator: Poedit 2.0.1\n"
"X-Generator: Poedit 1.8.9\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -275,15 +274,15 @@ msgstr "Spremenilnik, ki naj se uporabi za upravljanje oken"
#: 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. Its 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 ""
"Ta vrednost določa »prekrivno plast«, ki združuje predogled okna in "
"zaganjalnik programa. Vrednost je zamišljena kot »ključ oken« na strojni "
"opremi računalnika. Pričakovano je, da je vrednost določena privzeto ali pa "
"ni določena."
"Ta vrednost določa \"prevleko\", ki združuje predogled okna in zaganjalnik "
"programa. Vrednost je zamišljena kot \"ključ oken\" na strojni opremi "
"računalnika. Pričakovano je, da je vrednost določena privzeto ali pa ni "
"določena."
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
@@ -318,7 +317,7 @@ msgstr "Število delovnih površin je spremenljivo"
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether theres 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 ""
@@ -356,12 +355,12 @@ msgstr "Zamakni spremembe žarišča, dokler se kazalnik še premika"
#: 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 ""
"Izbrana možnost omogoča, da se žarišče, v kolikor je izbran način »sloppy« "
"ali »miška«, ne spremeni takoj ob izbiri okna. Žarišče se spremeni, ko se "
"Izbrana možnost omogoča, da se žarišče, v kolikor je izbran način \"sloppy\" "
"ali \"miška\", ne spremeni takoj ob izbiri okna. Žarišče se spremeni, ko se "
"kazalnik preneha premikati."
#: data/org.gnome.mutter.gschema.xml.in:79
@@ -370,11 +369,11 @@ msgstr "Prilagodljiva obroba pravokotnika"
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the themes 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 ""
"Delež skupne prilagodljive obrobe. V kolikor vidni robovi teme niso dovolj, "
"so dodane nevidne obrobe za dodatno prilagajanje."
"so dodane nevidne obrobe, za dodatno prilagajanje."
#: data/org.gnome.mutter.gschema.xml.in:89
msgid "Auto maximize nearly monitor sized windows"
@@ -399,53 +398,14 @@ msgid ""
msgstr ""
"Izbrana možnost določa, da bo novo okno vedno v središču dejavnega zaslona."
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Omogoči preizkusne možnosti"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Za omogočanje preizkusnih možnosti, dodajte ključno besedo možnosti na "
"seznam. Ali zahteva možnost ponovni zagon sestavljalnika, je odvisno od "
"posamezne možnosti. Te možnosti niso zahtevane niti nastavljive. Trenutno so "
"na voljo ključne besede: • »monitor-config-manager« uporablja nov sistem "
"nastavitev, ki naj bi zamenjal obstoječega. Omogoča večjo nastavljivost API, "
"za uporabo pri prigramih za nastavitve lastnosti zaslona. • »scale-monitor-"
"framebuffer« določi privzeto rabo sistema mutter za logične zaslone v "
"logičnem točkovnem koordinatnem prostoru, pri čemer prilagaja predpomnilnik "
"in ne vsebine za upravljanje z zasloni HiDPI. Možnost ne zahteva ponovnega "
"zagona. Za omogočanje te možnosti, mora biti omogočena tudi možnost »monitor-"
"config-manager«."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Izbor okna iz pojavnega zavihka"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Prekliči pojavni zavihek"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Nastavitve nadzornika preklopa"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Zavrti vgrajene nastavitve zaslona"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Preklopi na VT 1"
@@ -494,14 +454,10 @@ msgstr "Preklopi na VT 11"
msgid "Switch to VT 12"
msgstr "Preklopi na VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Ponovno omogoči tipkovne bližnjice"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1759
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Preklop načina (skupina %d)"
@@ -509,99 +465,59 @@ msgstr "Preklop načina (skupina %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Nadzornik preklopa"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Pokaži zaslonsko pomoč"
#: src/backends/meta-monitor-manager.c:927
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Vgrajen zaslon"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Neznano"
#: src/backends/meta-monitor-manager.c:952
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Neznan zaslon"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:960
#: src/backends/meta-monitor-manager.c:708
#, 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:476
#: src/compositor/compositor.c:471
#, 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 ""
"Drug upravljalnik sestavljanja je že zagnan na zaslonu %i prikaza »%s«."
"Drug upravljalnik sestavljanja je že zagnan na zaslonu %i prikaza \"%s\"."
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Dogodek zvonjenja"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Odpiranje zaslona »%s« okenskega sistema X je spodletelo\n"
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Onemogoči povezavo z upravljalnikom sej"
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Zamenjaj trenutni upravljalnik oken"
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Navedite ID upravljanja seje"
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Zaslon X za uporabo"
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Začni sejo iz shranjene datoteke"
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "Uskladi klice X"
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Zaženi izbirnik wayland"
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Zaženi kot gnezden vpisovalnik"
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "Zaženi kot polni strežnik zaslona in ne vstavljeno"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "Okno »%s« se ne odziva."
msgstr "%s se ne odziva."
#: src/core/meta-close-dialog-default.c:149
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Program se ne odziva."
#: src/core/meta-close-dialog-default.c:154
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@@ -609,26 +525,68 @@ msgstr ""
"Lahko še malo počakate, če program morda spet začne delovati, ali pa vsilite "
"končanje delovanja."
#: src/core/meta-close-dialog-default.c:161
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Vsili konec"
#: src/core/meta-close-dialog-default.c:161
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Počakaj"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Ni mogoče odpreti zaslona '%s' okenskega sistema X\n"
#: src/core/main.c:187
msgid "Disable connection to session manager"
msgstr "Onemogoči povezavo z upravljalnikom sej"
#: src/core/main.c:193
msgid "Replace the running window manager"
msgstr "Zamenjaj trenutni upravljalnik oken"
#: src/core/main.c:199
msgid "Specify session management ID"
msgstr "Navedite ID upravljanja seje"
#: src/core/main.c:204
msgid "X Display to use"
msgstr "Zaslon X za uporabo"
#: src/core/main.c:210
msgid "Initialize session from savefile"
msgstr "Začni sejo iz shranjene datoteke"
#: src/core/main.c:216
msgid "Make X calls synchronous"
msgstr "Uskladi klice X"
#: src/core/main.c:223
msgid "Run as a wayland compositor"
msgstr "Zaženi izbirnik wayland"
#: src/core/main.c:229
msgid "Run as a nested compositor"
msgstr "Zaženi kot gnezden vpisovalnik"
#: src/core/main.c:237
msgid "Run as a full display server, rather than nested"
msgstr "Zaženi kot polni strežnik zaslona in ne vstavljeno"
#: src/core/mutter.c:39
#, c-format
msgid ""
"mutter %s\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright (C) 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"
"Avtorske pravice pridržane (C) 2001-%d Havoc Pennington, Red Hat in drugi\n"
"To je prosta programska oprema; za pogoje kopiranja si oglejte dovoljenje.\n"
"To je prosta programska oprema; za pogoje kopiranja si poglejte izvorno "
"kodo.\n"
"Program je na voljo BREZ KAKRŠNIHKOLI ZAGOTOVIL.\n"
#: src/core/mutter.c:53
@@ -648,16 +606,16 @@ msgstr "Delovna površina %d"
#: src/core/screen.c:580
#, 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 ""
"Zaslon »%s« že ima določen upravljalnik oken; poskušajte uporabiti možnost --"
"replace za zamenjavo trenutnega upravljalnika zaslona."
"Zaslon \"%s\" že ima določen upravljalnik oken; poskušajte uporabiti možnost "
"--replace za zamenjavo trenutnega upravljalnika zaslona."
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display %s is invalid\n"
msgstr "Zaslon %d na prikazu »%s« ni veljaven\n"
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Zaslon %d na prikazu '%s' ni veljaven\n"
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
@@ -672,11 +630,11 @@ msgstr "Način preklopa: način %d"
# G:2 K:6 O:0
#: src/x11/session.c:1815
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 &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
msgstr ""
"Ta okna ne podpirajo možnosti »shranjevanja trenutnih nastavitev«, zato jih "
"bo treba ob naslednji prijavi zagnati ročno."
"Ta okna ne podpirajo možnosti &quot;shranjevanja trenutnih nastavitev&quot;, "
"zato jih bo treba ob naslednji prijavi zagnati ročno."
#: src/x11/window-props.c:559
#, c-format

170
po/sr.po
View File

@@ -9,12 +9,12 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=mutter"
"&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-13 15:47+0000\n"
"PO-Revision-Date: 2017-08-15 20:40+0200\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-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-21 07:16+0200\n"
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
"Language-Team: српски <gnome-sr@googlegroups.org>\n"
"Language-Team: Serbian <(nothing)>\n"
"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -272,6 +272,11 @@ msgid "Modifier to use for extended window management operations"
msgstr "Тастер који се користи за проширене радње управника прозорима"
#: 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."
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 "
@@ -317,14 +322,18 @@ msgid "Workspaces are managed dynamically"
msgstr "Радним просторима се управља динамички"
#: data/org.gnome.mutter.gschema.xml.in:41
#| msgid ""
#| "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)."
msgid ""
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
"Одређује да ли се радним просторима управља динамички или ће постојати "
"стални број радних простора (одређен бројем радних простора у „org.gnome."
"desktop.wm.preferences“)."
"стални број радних простора (одређен бројем радних простора у "
"„org.gnome.desktop.wm.preferences“)."
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
@@ -355,6 +364,10 @@ msgid "Delay focus changes until the pointer stops moving"
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."
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 "
@@ -369,6 +382,9 @@ msgid "Draggable border width"
msgstr "Ширина ивице за превлачење"
#: data/org.gnome.mutter.gschema.xml.in:80
#| msgid ""
#| "The amount of total draggable borders. If the theme's visible borders are "
#| "not enough, invisible borders will be added to meet this value."
msgid ""
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
@@ -400,56 +416,14 @@ msgstr ""
"Ако је изабрано, нови прозори ће увек бити постављени на средину радног "
"екрана монитора."
#: 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. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Да укључите експерименталне функције, додајте кључну реч функције на списак. "
"Да ли функција захтева поновно покретање састављача зависи од дате функције. "
"Није потребно да нека експериментална функција буде и даље доступна или "
"подесива. Немојте очекивати да додавање било чега у овом подешавању буде "
"будући доказ. Тренутно могуће кључне речи су: • „monitor-config-manager“ — "
"користи нови систем подешавања монитора, који треба да замени стари. Ово "
"омогућава да АПИ подешавања вишег нивоа буде коришћен програмима подешавања, "
"као и могућност подешавања скале монитора на нивоу логике. • „scale-monitor-"
"framebuffer“ — чини да матер пређе на распоред логичких монитора у логичком "
"координатном простору пиксела, док врши сразмеравање оквира монитора уместо "
"садржаја прозора, за управљање ХиДПИ мониторима. Не захтева поновно "
"покретање. Такође је потребно укључити „monitor-config-manager“ да би ова "
"функција била укључена."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Бира прозор из језичка искакања"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Отказивање језичка искакања"
#: data/org.gnome.mutter.gschema.xml.in:161
#| msgid "Switch monitor"
msgid "Switch monitor configurations"
msgstr "Мења подешавања монитора"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Заокреће уграђена подешавања монитора"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Прелазак на ВТ 1"
@@ -498,53 +472,53 @@ msgstr "Прелазак на ВТ 11"
msgid "Switch to VT 12"
msgstr "Прелазак на ВТ 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Поново укључивање пречица"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1759
#, c-format
#| msgid "Mode Switch: Mode %d"
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:2141
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Промени монитор"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Прикажи помоћ на екрану"
#: src/backends/meta-monitor-manager.c:927
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Уграђени дисплеј"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Непознато"
#: src/backends/meta-monitor-manager.c:952
#: src/backends/meta-monitor-manager.c:700
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:960
#: src/backends/meta-monitor-manager.c:708
#, 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:476
#: src/compositor/compositor.c:471
#, c-format
#| msgid ""
#| "Another compositing manager is already running on screen %i on display "
#| "\"%s\"."
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
@@ -554,8 +528,35 @@ msgstr ""
msgid "Bell event"
msgstr "Звонца"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ не даје одзив."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Програм не даје одзив."
#: src/core/delete.c:134
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 "_Force Quit"
msgstr "_Приморај излаз"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Сачекај"
#: src/core/display.c:608
#, c-format
#| msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display “%s”\n"
msgstr "Нисам успео да отворим екран „%s“ Икс система прозора\n"
@@ -595,34 +596,14 @@ msgstr "Ради као угнеждени саставник"
msgid "Run as a full display server, rather than nested"
msgstr "Ради као пуни сервер приказа, уместо као угнеждени"
#. 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/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Програм не даје одзив."
#: 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/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Приморај излаз"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Сачекај"
#: src/core/mutter.c:39
#, c-format
#| msgid ""
#| "mutter %s\n"
#| "Copyright (C) 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"
msgid ""
"mutter %s\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
@@ -651,15 +632,19 @@ msgstr "%d. радни простор"
#: src/core/screen.c:580
#, c-format
#| msgid ""
#| "Display \"%s\" already has a window manager; try using the --replace "
#| "option to replace the current window manager."
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr ""
"Приказ „%s“ већ има управника прозора; пробајте да користите опцију „--"
"replace“ да замените тренутног управника прозора."
"Приказ „%s“ већ има управника прозора; пробајте да користите опцију "
"„--replace“ да замените тренутног управника прозора."
#: src/core/screen.c:665
#, c-format
#| msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display “%s” is invalid\n"
msgstr "Приказ „%d“ на екрану „%s“ није исправан\n"
@@ -673,6 +658,9 @@ msgid "Mode Switch: Mode %d"
msgstr "Режим прекидача: Режим %d"
#: src/x11/session.c:1815
#| msgid ""
#| "These windows do not support &quot;save current setup&quot; and will have "
#| "to be restarted manually next time you log in."
msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."

View File

@@ -9,12 +9,12 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=mutter"
"&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-13 15:47+0000\n"
"PO-Revision-Date: 2017-08-15 20:40+0200\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-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-21 07:16+0200\n"
"Last-Translator: Miroslav Nikolić <miroslavnikolic@rocketmail.com>\n"
"Language-Team: srpski <gnome-sr@googlegroups.org>\n"
"Language-Team: Serbian <(nothing)>\n"
"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -272,6 +272,11 @@ msgid "Modifier to use for extended window management operations"
msgstr "Taster koji se koristi za proširene radnje upravnika prozorima"
#: 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."
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 "
@@ -317,14 +322,18 @@ msgid "Workspaces are managed dynamically"
msgstr "Radnim prostorima se upravlja dinamički"
#: data/org.gnome.mutter.gschema.xml.in:41
#| msgid ""
#| "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)."
msgid ""
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
"Određuje da li se radnim prostorima upravlja dinamički ili će postojati "
"stalni broj radnih prostora (određen brojem radnih prostora u „org.gnome."
"desktop.wm.preferences“)."
"stalni broj radnih prostora (određen brojem radnih prostora u "
"„org.gnome.desktop.wm.preferences“)."
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
@@ -355,6 +364,10 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Zastoj prvog plana se menja dok se pokazivač ne zaustavi"
#: 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."
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 "
@@ -369,6 +382,9 @@ msgid "Draggable border width"
msgstr "Širina ivice za prevlačenje"
#: data/org.gnome.mutter.gschema.xml.in:80
#| msgid ""
#| "The amount of total draggable borders. If the theme's visible borders are "
#| "not enough, invisible borders will be added to meet this value."
msgid ""
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
@@ -400,56 +416,14 @@ msgstr ""
"Ako je izabrano, novi prozori će uvek biti postavljeni na sredinu radnog "
"ekrana monitora."
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Uključuje eksperimentalne funkcije"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Da uključite eksperimentalne funkcije, dodajte ključnu reč funkcije na spisak. "
"Da li funkcija zahteva ponovno pokretanje sastavljača zavisi od date funkcije. "
"Nije potrebno da neka eksperimentalna funkcija bude i dalje dostupna ili "
"podesiva. Nemojte očekivati da dodavanje bilo čega u ovom podešavanju bude "
"budući dokaz. Trenutno moguće ključne reči su: • „monitor-config-manager“ — "
"koristi novi sistem podešavanja monitora, koji treba da zameni stari. Ovo "
"omogućava da API podešavanja višeg nivoa bude korišćen programima podešavanja, "
"kao i mogućnost podešavanja skale monitora na nivou logike. • „scale-monitor-"
"framebuffer“ — čini da mater pređe na raspored logičkih monitora u logičkom "
"koordinatnom prostoru piksela, dok vrši srazmeravanje okvira monitora umesto "
"sadržaja prozora, za upravljanje HiDPI monitorima. Ne zahteva ponovno "
"pokretanje. Takođe je potrebno uključiti „monitor-config-manager“ da bi ova "
"funkcija bila uključena."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Bira prozor iz jezička iskakanja"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Otkazivanje jezička iskakanja"
#: data/org.gnome.mutter.gschema.xml.in:161
#| msgid "Switch monitor"
msgid "Switch monitor configurations"
msgstr "Menja podešavanja monitora"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Zaokreće ugrađena podešavanja monitora"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Prelazak na VT 1"
@@ -498,53 +472,53 @@ msgstr "Prelazak na VT 11"
msgid "Switch to VT 12"
msgstr "Prelazak na VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Ponovo uključivanje prečica"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1759
#, c-format
#| msgid "Mode Switch: Mode %d"
msgid "Mode Switch (Group %d)"
msgstr "Režim prekidača (grupa %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Promeni monitor"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Prikaži pomoć na ekranu"
#: src/backends/meta-monitor-manager.c:927
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Ugrađeni displej"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Nepoznato"
#: src/backends/meta-monitor-manager.c:952
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Nepoznat displej"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:960
#: src/backends/meta-monitor-manager.c:708
#, 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:476
#: src/compositor/compositor.c:471
#, c-format
#| msgid ""
#| "Another compositing manager is already running on screen %i on display "
#| "\"%s\"."
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
@@ -554,8 +528,35 @@ msgstr ""
msgid "Bell event"
msgstr "Zvonca"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ ne daje odziv."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Program ne daje odziv."
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Možete malo sačekati dok se program ne sabere ili primorati program da "
"kompletno prekine sa radom."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Primoraj izlaz"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Sačekaj"
#: src/core/display.c:608
#, c-format
#| msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display “%s”\n"
msgstr "Nisam uspeo da otvorim ekran „%s“ Iks sistema prozora\n"
@@ -595,34 +596,14 @@ msgstr "Radi kao ugneždeni sastavnik"
msgid "Run as a full display server, rather than nested"
msgstr "Radi kao puni server prikaza, umesto kao ugneždeni"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ ne daje odziv."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Program ne daje odziv."
#: 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 ""
"Možete malo sačekati dok se program ne sabere ili primorati program da "
"kompletno prekine sa radom."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Primoraj izlaz"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Sačekaj"
#: src/core/mutter.c:39
#, c-format
#| msgid ""
#| "mutter %s\n"
#| "Copyright (C) 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"
msgid ""
"mutter %s\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
@@ -651,15 +632,19 @@ msgstr "%d. radni prostor"
#: src/core/screen.c:580
#, c-format
#| msgid ""
#| "Display \"%s\" already has a window manager; try using the --replace "
#| "option to replace the current window manager."
msgid ""
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr ""
"Prikaz „%s“ već ima upravnika prozora; probajte da koristite opciju „--"
"replace“ da zamenite trenutnog upravnika prozora."
"Prikaz „%s“ već ima upravnika prozora; probajte da koristite opciju "
"„--replace“ da zamenite trenutnog upravnika prozora."
#: src/core/screen.c:665
#, c-format
#| msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display “%s” is invalid\n"
msgstr "Prikaz „%d“ na ekranu „%s“ nije ispravan\n"
@@ -673,6 +658,9 @@ msgid "Mode Switch: Mode %d"
msgstr "Režim prekidača: Režim %d"
#: src/x11/session.c:1815
#| msgid ""
#| "These windows do not support &quot;save current setup&quot; and will have "
#| "to be restarted manually next time you log in."
msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."

142
po/tr.po
View File

@@ -6,26 +6,25 @@
# Baris Cicek <baris@teamforce.name.tr>, 2004, 2005, 2008, 2009.
# İlker DAĞLI <ilker@ilkerdagli.info>, 2011.
# Muhammed EKEN <gnome@m-eken.com>, 2011.
# Muhammet Kara <muhammetk@gmail.com>, 2011, 2012, 2014, 2015, 2016.
# Furkan Ahmet Kara <furkanahmetkara.fk@gmail.com>, 2017.
# Emin Tufan Çetin <etcetin@gmail.com>, 2017.
# Muhammet Kara <muhammetk@gmail.com>, 2011, 2012, 2014, 2015, 2016, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-13 15:47+0000\n"
"PO-Revision-Date: 2017-08-13 18:55+0300\n"
"Last-Translator: Muhammet Kara <muhammetk@gmail.com>\n"
"Language-Team: Turkish <gnometurk@gnome.org>\n"
"POT-Creation-Date: 2017-05-11 12:29+0000\n"
"PO-Revision-Date: 2017-05-13 17:23+0300\n"
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n"
"Language-Team: Türkçe <>\n"
"Language: tr\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-DamnedLies-Scope: partial\n"
"X-Generator: Gtranslator 2.91.7\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -278,6 +277,11 @@ msgid "Modifier to use for extended window management operations"
msgstr "Genişletilmiş pencere yönetimi işlemleri için kullanılacak değiştirici"
#: 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."
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 "
@@ -362,6 +366,10 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Odak değişikliklerini işaretçi hareketi durana kadar ertele"
#: 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."
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 "
@@ -418,46 +426,29 @@ msgid ""
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “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. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
"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."
msgstr ""
"Deneysel özellikleri etkinleştirmek için özelliğin anahtar sözcüğünü listeye "
"ekleyin. Özelliğin yeniden başlatmayı gerektirip gerektirmeyeceği verilen "
"özelliğe bağlıdır. Hiçbir deneysel özellik hala kullanılabilir veya "
"yapılandırılabilir olmak zorunda değildir. Bu ayara eklenecek herhangi bir "
"şeyin gelecekte olabilecek değişikliklerden etkilenmeyeceğini düşünmeyin. Şu "
"anda kullanılabilir anahtar sözcükler: • “monitor-config-manager” — "
"eskisinin yerini alması amaçlanan yeni monitör yapılandırma sistemini "
"kullan. Bu, yapılandırma uygulamaları tarafından kullanılmak üzere daha "
"ksek düzeyde bir yapılandırma API'sini etkinleştirir ve ayrıca mantıksal "
"monitör ölçeğinde yapılandırma yapmaya olanak tanır.• “scale-monitor-"
"framebuffer” — mutterin HiDPI monitörleri yönetmesi için pencere içeriği "
"yerine monitör çerçeve arabelleğini ölçeklendirirken, mantıksal monitörleri "
"mantıksal piksel koordinat aralığına yerleştirmesini öntanımlı yapar."
"anda kullanılabilir anahtar sözcükler: • “scale-monitor-framebuffer” — "
"mutterin HiDPI monitörleri yönetmesi için pencere içeriği yerine monitör "
"çerçeve arabelleğini ölçeklendirirken, mantıksal monitörleri mantıksal "
"piksel koordinat aralığına yerleştirmesini öntanımlı yapar."
#: data/org.gnome.mutter.gschema.xml.in:151
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "Pencereyi, sekme açılır penceresinden seç"
#: data/org.gnome.mutter.gschema.xml.in:156
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Sekmeyi yeni pencerede açmayı iptal et"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Monitör yapılandırmaları arasında geçiş yap"
#: data/org.gnome.mutter.gschema.xml.in:166
#| msgid "Switch monitor configurations"
msgid "Rotates the built-in monitor configuration"
msgstr "Yerleşik monitör yapılandırmaları arasında geçiş yapar"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "VT 1e geç"
@@ -506,14 +497,10 @@ msgstr "VT 11e geç"
msgid "Switch to VT 12"
msgstr "VT 12ye geç"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:2118
#: src/backends/meta-input-settings.c:1848
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Kip anahtarı (Group %d)"
@@ -521,30 +508,30 @@ msgstr "Kip anahtarı (Group %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
#: src/backends/meta-input-settings.c:1870
msgid "Switch monitor"
msgstr "Monitör değiştir"
#: src/backends/meta-input-settings.c:2143
#: src/backends/meta-input-settings.c:1872
msgid "Show on-screen help"
msgstr "Ekranda yardımı göster"
#: src/backends/meta-monitor-manager.c:927
#: src/backends/meta-monitor-manager.c:783
msgid "Built-in display"
msgstr "Yerleşik ekran"
#: src/backends/meta-monitor-manager.c:950
#: src/backends/meta-monitor-manager.c:806
msgid "Unknown"
msgstr "Bilinmiyor"
#: src/backends/meta-monitor-manager.c:952
#: src/backends/meta-monitor-manager.c:808
msgid "Unknown Display"
msgstr "Bilinmeyen Ekran"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:960
#: src/backends/meta-monitor-manager.c:816
#, c-format
msgid "%s %s"
msgstr "%s %s"
@@ -553,16 +540,44 @@ msgstr "%s %s"
#. * we have no way to get it to exit
#: src/compositor/compositor.c:476
#, c-format
#| msgid ""
#| "Another compositing manager is already running on screen %i on display "
#| "\"%s\"."
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
"“%2$s” monitöründeki %1$i ekranında zaten başka bir birleştirme yöneticisi "
"çalışıyor."
"“%2$s” monitöründeki %1$i ekranında zaten başka bir birleştirme yöneticisi çalışıyor."
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Etkinlik zili"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” yanıt vermiyor."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Uygulama cevap vermiyor"
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Uygulamanın devam etmesi için bir müddet bekleyi seçebilirsiniz ya da "
"uygulamanın tamamen çıkması için onu zorlayabilirsiniz."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Sonlandır"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Bekle"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@@ -604,34 +619,14 @@ msgstr "Yuvalanmış dizgici olarak çalıştır"
msgid "Run as a full display server, rather than nested"
msgstr "İç içe değil tam ekran sunucusu olarak çalıştır"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” yanıt vermiyor."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Uygulama cevap vermiyor"
#: 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 ""
"Uygulamanın devam etmesi için bir müddet bekleyi seçebilirsiniz ya da "
"uygulamanın tamamen çıkması için onu zorlayabilirsiniz."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Sonlandır"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Bekle"
#: src/core/mutter.c:39
#, c-format
#| msgid ""
#| "mutter %s\n"
#| "Copyright (C) 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"
msgid ""
"mutter %s\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
@@ -670,6 +665,7 @@ msgstr ""
#: src/core/screen.c:665
#, c-format
#| msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display “%s” is invalid\n"
msgstr "“%2$s” monitöründeki %1$d ekranı geçersiz\n"

View File

@@ -38,8 +38,6 @@ mutter_test_unit_tests_SOURCES = \
tests/meta-backend-test.h \
tests/meta-monitor-manager-test.c \
tests/meta-monitor-manager-test.h \
tests/monitor-config-migration-unit-tests.c \
tests/monitor-config-migration-unit-tests.h \
tests/monitor-store-unit-tests.c \
tests/monitor-store-unit-tests.h \
tests/monitor-test-utils.c \

View File

@@ -71,10 +71,6 @@ mutter_built_sources += \
tablet-unstable-v2-server-protocol.h \
xdg-foreign-unstable-v1-protocol.c \
xdg-foreign-unstable-v1-server-protocol.h \
linux-dmabuf-unstable-v1-protocol.c \
linux-dmabuf-unstable-v1-server-protocol.h \
keyboard-shortcuts-inhibit-unstable-v1-protocol.c \
keyboard-shortcuts-inhibit-unstable-v1-server-protocol.h \
$(NULL)
endif
@@ -86,7 +82,6 @@ wayland_protocols = \
libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
backends/meta-backend.c \
meta/meta-backend.h \
meta/meta-settings.h \
backends/meta-backend-private.h \
backends/meta-barrier.c \
backends/meta-barrier-private.h \
@@ -109,10 +104,10 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
backends/meta-input-settings-private.h \
backends/meta-logical-monitor.c \
backends/meta-logical-monitor.h \
backends/meta-monitor-config.c \
backends/meta-monitor-config.h \
backends/meta-monitor-config-manager.c \
backends/meta-monitor-config-manager.h \
backends/meta-monitor-config-migration.c \
backends/meta-monitor-config-migration.h \
backends/meta-monitor-config-store.c \
backends/meta-monitor-config-store.h \
backends/meta-monitor.c \
@@ -122,12 +117,8 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
backends/meta-monitor-manager-private.h \
backends/meta-monitor-manager-dummy.c \
backends/meta-monitor-manager-dummy.h \
backends/meta-orientation-manager.c \
backends/meta-orientation-manager.h \
backends/meta-pointer-constraint.c \
backends/meta-pointer-constraint.h \
backends/meta-settings.c \
backends/meta-settings-private.h \
backends/meta-stage.h \
backends/meta-stage.c \
backends/meta-renderer.c \
@@ -235,10 +226,6 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
meta/meta-close-dialog.h \
core/meta-close-dialog-default.c \
core/meta-close-dialog-default-private.h \
core/meta-inhibit-shortcuts-dialog.c \
meta/meta-inhibit-shortcuts-dialog.h \
core/meta-inhibit-shortcuts-dialog-default.c \
core/meta-inhibit-shortcuts-dialog-default-private.h \
core/delete.c \
core/display.c \
core/display-private.h \
@@ -325,8 +312,6 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \
wayland/meta-xwayland-private.h \
wayland/meta-wayland-buffer.c \
wayland/meta-wayland-buffer.h \
wayland/meta-wayland-dma-buf.c \
wayland/meta-wayland-dma-buf.h \
wayland/meta-wayland-region.c \
wayland/meta-wayland-region.h \
wayland/meta-wayland-data-device.c \
@@ -394,10 +379,6 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \
wayland/meta-wayland-wl-shell.h \
wayland/meta-wayland-gtk-shell.c \
wayland/meta-wayland-gtk-shell.h \
wayland/meta-wayland-inhibit-shortcuts.c \
wayland/meta-wayland-inhibit-shortcuts.h \
wayland/meta-wayland-inhibit-shortcuts-dialog.c \
wayland/meta-wayland-inhibit-shortcuts-dialog.h \
$(NULL)
endif
@@ -459,13 +440,11 @@ libmutterinclude_headers = \
meta/meta-background-image.h \
meta/meta-background-group.h \
meta/meta-close-dialog.h \
meta/meta-inhibit-shortcuts-dialog.h \
meta/meta-cursor-tracker.h \
meta/meta-dnd.h \
meta/meta-idle-monitor.h \
meta/meta-plugin.h \
meta/meta-monitor-manager.h \
meta/meta-settings.h \
meta/meta-shaped-texture.h \
meta/meta-shadow-factory.h \
meta/meta-window-actor.h \
@@ -595,7 +574,7 @@ stamp-meta-enum-types.h: $(libmutterinclude_headers) meta-enum-types.h.in
$(AM_V_GEN) ( cd $(srcdir) && \
$(GLIB_MKENUMS) \
--template meta-enum-types.h.in \
$(libmutterinclude_headers) ) > xgen-teth && \
$(libmutterinclude_base_headers) ) >> xgen-teth && \
(cmp -s xgen-teth meta/meta-enum-types.h || cp xgen-teth meta/meta-enum-types.h) && \
rm -f xgen-teth && \
echo timestamp > $(@F)
@@ -604,7 +583,7 @@ meta-enum-types.c: stamp-meta-enum-types.h meta-enum-types.c.in
$(AM_V_GEN) ( cd $(srcdir) && \
$(GLIB_MKENUMS) \
--template meta-enum-types.c.in \
$(libmutterinclude_headers) ) > xgen-tetc && \
$(libmutterinclude_base_headers) ) >> xgen-tetc && \
cp xgen-tetc meta-enum-types.c && \
rm -f xgen-tetc
@@ -661,7 +640,3 @@ endef
$(AM_V_GEN)$(WAYLAND_SCANNER) code $< $@
%-server-protocol.h : $(srcdir)/wayland/protocol/%.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) server-header $< $@
keyboard-shortcuts-inhibit-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
keyboard-shortcuts-inhibit-unstable-v1-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) server-header < $< > $@

View File

@@ -34,12 +34,10 @@
#include <meta/meta-idle-monitor.h>
#include "meta-cursor-renderer.h"
#include "meta-monitor-manager-private.h"
#include "meta-orientation-manager.h"
#include "meta-input-settings-private.h"
#include "backends/meta-egl.h"
#include "backends/meta-pointer-constraint.h"
#include "backends/meta-renderer.h"
#include "backends/meta-settings-private.h"
#include "core/util-private.h"
#define DEFAULT_XKB_RULES_FILE "evdev"
@@ -61,7 +59,6 @@ struct _MetaBackendClass
MetaMonitorManager * (* create_monitor_manager) (MetaBackend *backend);
MetaCursorRenderer * (* create_cursor_renderer) (MetaBackend *backend);
MetaRenderer * (* create_renderer) (MetaBackend *backend);
MetaInputSettings * (* create_input_settings) (MetaBackend *backend);
gboolean (* grab_device) (MetaBackend *backend,
int device_id,
@@ -83,8 +80,6 @@ struct _MetaBackendClass
struct xkb_keymap * (* get_keymap) (MetaBackend *backend);
xkb_layout_index_t (* get_keymap_layout_group) (MetaBackend *backend);
void (* lock_layout_group) (MetaBackend *backend,
guint idx);
@@ -102,8 +97,17 @@ struct _MetaBackendClass
};
typedef enum _MetaExperimentalFeature
{
META_EXPERIMENTAL_FEATURE_NONE = 0,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
META_EXPERIMENTAL_FEATURE_MONITOR_CONFIG_MANAGER = (1 << 1)
} MetaExperimentalFeature;
void meta_init_backend (GType backend_gtype);
void meta_backend_display_opened (MetaBackend *backend);
ClutterBackend * meta_backend_get_clutter_backend (MetaBackend *backend);
MetaIdleMonitor * meta_backend_get_idle_monitor (MetaBackend *backend,
@@ -113,12 +117,10 @@ void meta_backend_foreach_device_monitor (MetaBackend *backend,
gpointer user_data);
MetaMonitorManager * meta_backend_get_monitor_manager (MetaBackend *backend);
MetaOrientationManager * meta_backend_get_orientation_manager (MetaBackend *backend);
MetaCursorTracker * meta_backend_get_cursor_tracker (MetaBackend *backend);
MetaCursorRenderer * meta_backend_get_cursor_renderer (MetaBackend *backend);
MetaRenderer * meta_backend_get_renderer (MetaBackend *backend);
MetaEgl * meta_backend_get_egl (MetaBackend *backend);
MetaSettings * meta_backend_get_settings (MetaBackend *backend);
gboolean meta_backend_grab_device (MetaBackend *backend,
int device_id,
@@ -135,8 +137,6 @@ MetaLogicalMonitor * meta_backend_get_current_logical_monitor (MetaBackend *back
struct xkb_keymap * meta_backend_get_keymap (MetaBackend *backend);
xkb_layout_index_t meta_backend_get_keymap_layout_group (MetaBackend *backend);
void meta_backend_update_last_device (MetaBackend *backend,
int device_id);
@@ -155,6 +155,16 @@ ClutterBackend * meta_backend_get_clutter_backend (MetaBackend *backend);
void meta_backend_monitors_changed (MetaBackend *backend);
gboolean meta_backend_is_experimental_feature_enabled (MetaBackend *backend,
MetaExperimentalFeature feature);
MetaExperimentalFeature meta_backend_get_experimental_features (MetaBackend *backend);
void meta_backend_override_experimental_features (MetaBackend *backend);
void meta_backend_enable_experimental_feature (MetaBackend *backend,
MetaExperimentalFeature feature);
gboolean meta_is_stage_views_enabled (void);
gboolean meta_is_stage_views_scaled (void);

View File

@@ -43,15 +43,15 @@
#include "backends/meta-idle-monitor-private.h"
#include "backends/meta-logical-monitor.h"
#include "backends/meta-monitor-manager-dummy.h"
#include "backends/meta-settings-private.h"
#define META_IDLE_MONITOR_CORE_DEVICE 0
#include "ui/theme-private.h"
enum
{
KEYMAP_CHANGED,
KEYMAP_LAYOUT_GROUP_CHANGED,
LAST_DEVICE_CHANGED,
EXPERIMENTAL_FEATURES_CHANGED,
UI_SCALING_FACTOR_CHANGED,
N_SIGNALS
};
@@ -78,13 +78,15 @@ meta_get_backend (void)
struct _MetaBackendPrivate
{
MetaMonitorManager *monitor_manager;
MetaOrientationManager *orientation_manager;
MetaCursorTracker *cursor_tracker;
MetaCursorRenderer *cursor_renderer;
MetaInputSettings *input_settings;
MetaRenderer *renderer;
MetaEgl *egl;
MetaSettings *settings;
GSettings *mutter_settings;
MetaExperimentalFeature experimental_features;
gboolean experimental_features_overridden;
ClutterBackend *clutter_backend;
ClutterActor *stage;
@@ -97,6 +99,8 @@ struct _MetaBackendPrivate
MetaPointerConstraint *client_pointer_constraint;
MetaDnd *dnd;
int ui_scaling_factor;
};
typedef struct _MetaBackendPrivate MetaBackendPrivate;
@@ -115,7 +119,6 @@ meta_backend_finalize (GObject *object)
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
g_clear_object (&priv->monitor_manager);
g_clear_object (&priv->orientation_manager);
g_clear_object (&priv->input_settings);
if (priv->device_update_idle_id)
@@ -123,8 +126,6 @@ meta_backend_finalize (GObject *object)
g_hash_table_destroy (priv->device_monitors);
g_clear_object (&priv->settings);
G_OBJECT_CLASS (meta_backend_parent_class)->finalize (object);
}
@@ -154,10 +155,28 @@ center_pointer (MetaBackend *backend)
primary->rect.y + primary->rect.height / 2);
}
static gboolean
meta_backend_update_ui_scaling_factor (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
int ui_scaling_factor;
ui_scaling_factor = meta_backend_get_ui_scaling_factor (backend);
if (ui_scaling_factor != priv->ui_scaling_factor)
{
priv->ui_scaling_factor = ui_scaling_factor;
return TRUE;
}
else
{
return FALSE;
}
}
void
meta_backend_monitors_changed (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
@@ -175,7 +194,8 @@ meta_backend_monitors_changed (MetaBackend *backend)
center_pointer (backend);
}
meta_settings_update_ui_scaling_factor (priv->settings);
if (meta_backend_update_ui_scaling_factor (backend))
meta_backend_notify_ui_scaling_factor_changed (backend);
}
void
@@ -225,16 +245,6 @@ destroy_device_monitor (MetaBackend *backend,
g_hash_table_remove (priv->device_monitors, &device_id);
}
static void
meta_backend_monitor_device (MetaBackend *backend,
ClutterInputDevice *device)
{
int device_id;
device_id = clutter_input_device_get_device_id (device);
create_device_monitor (backend, device_id);
}
static void
on_device_added (ClutterDeviceManager *device_manager,
ClutterInputDevice *device,
@@ -342,56 +352,10 @@ create_monitor_manager (MetaBackend *backend)
return META_BACKEND_GET_CLASS (backend)->create_monitor_manager (backend);
}
static void
create_device_monitors (MetaBackend *backend,
ClutterDeviceManager *device_manager)
{
const GSList *devices;
const GSList *l;
create_device_monitor (backend, META_IDLE_MONITOR_CORE_DEVICE);
devices = clutter_device_manager_peek_devices (device_manager);
for (l = devices; l; l = l->next)
{
ClutterInputDevice *device = l->data;
meta_backend_monitor_device (backend, device);
}
}
static void
set_initial_pointer_visibility (MetaBackend *backend,
ClutterDeviceManager *device_manager)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
const GSList *devices;
const GSList *l;
gboolean has_touchscreen = FALSE;
devices = clutter_device_manager_peek_devices (device_manager);
for (l = devices; l; l = l->next)
{
ClutterInputDevice *device = l->data;
has_touchscreen |= device_is_slave_touchscreen (device);
}
meta_cursor_tracker_set_pointer_visible (priv->cursor_tracker,
!has_touchscreen);
}
static MetaInputSettings *
meta_backend_create_input_settings (MetaBackend *backend)
{
return META_BACKEND_GET_CLASS (backend)->create_input_settings (backend);
}
static void
meta_backend_real_post_init (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
ClutterDeviceManager *device_manager = clutter_device_manager_get_default ();
priv->stage = meta_stage_new ();
clutter_actor_realize (priv->stage);
@@ -401,22 +365,45 @@ meta_backend_real_post_init (MetaBackend *backend)
meta_backend_sync_screen_size (backend);
meta_backend_update_ui_scaling_factor (backend);
priv->cursor_renderer = META_BACKEND_GET_CLASS (backend)->create_cursor_renderer (backend);
priv->device_monitors =
g_hash_table_new_full (g_int_hash, g_int_equal,
NULL, (GDestroyNotify) g_object_unref);
create_device_monitors (backend, device_manager);
{
MetaCursorTracker *cursor_tracker;
ClutterDeviceManager *manager;
gboolean has_touchscreen = FALSE;
GSList *devices, *l;
g_signal_connect_object (device_manager, "device-added",
G_CALLBACK (on_device_added), backend, 0);
g_signal_connect_object (device_manager, "device-removed",
G_CALLBACK (on_device_removed), backend, 0);
/* Create the core device monitor. */
create_device_monitor (backend, 0);
set_initial_pointer_visibility (backend, device_manager);
manager = clutter_device_manager_get_default ();
g_signal_connect_object (manager, "device-added",
G_CALLBACK (on_device_added), backend, 0);
g_signal_connect_object (manager, "device-removed",
G_CALLBACK (on_device_removed), backend, 0);
priv->input_settings = meta_backend_create_input_settings (backend);
devices = clutter_device_manager_list_devices (manager);
for (l = devices; l != NULL; l = l->next)
{
ClutterInputDevice *device = l->data;
on_device_added (manager, device, backend);
has_touchscreen |= device_is_slave_touchscreen (device);
}
cursor_tracker = priv->cursor_tracker;
meta_cursor_tracker_set_pointer_visible (cursor_tracker, !has_touchscreen);
g_slist_free (devices);
}
priv->input_settings = meta_input_settings_create ();
center_pointer (backend);
}
@@ -462,6 +449,105 @@ meta_backend_real_get_relative_motion_deltas (MetaBackend *backend,
return FALSE;
}
static gboolean
experimental_features_handler (GVariant *features_variant,
gpointer *result,
gpointer data)
{
MetaBackend *backend = data;
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
GVariantIter features_iter;
char *feature;
MetaExperimentalFeature features = META_EXPERIMENTAL_FEATURE_NONE;
if (priv->experimental_features_overridden)
{
*result = GINT_TO_POINTER (FALSE);
return TRUE;
}
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, "monitor-config-manager"))
features |= META_EXPERIMENTAL_FEATURE_MONITOR_CONFIG_MANAGER;
else
g_info ("Unknown experimental feature '%s'\n", feature);
}
if (features != priv->experimental_features)
{
priv->experimental_features = features;
*result = GINT_TO_POINTER (TRUE);
}
else
{
*result = GINT_TO_POINTER (FALSE);
}
return TRUE;
}
static gboolean
update_experimental_features (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return GPOINTER_TO_INT (g_settings_get_mapped (priv->mutter_settings,
"experimental-features",
experimental_features_handler,
backend));
}
static void
mutter_settings_changed (GSettings *settings,
gchar *key,
MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
MetaExperimentalFeature old_experimental_features;
gboolean changed;
if (!g_str_equal (key, "experimental-features"))
return;
old_experimental_features = priv->experimental_features;
changed = update_experimental_features (backend);
if (changed)
g_signal_emit (backend, signals[EXPERIMENTAL_FEATURES_CHANGED], 0,
(unsigned int) old_experimental_features);
}
gboolean
meta_backend_is_experimental_feature_enabled (MetaBackend *backend,
MetaExperimentalFeature feature)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return !!(priv->experimental_features & feature);
}
void
meta_backend_override_experimental_features (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
priv->experimental_features = META_EXPERIMENTAL_FEATURE_NONE;
priv->experimental_features_overridden = TRUE;
}
void
meta_backend_enable_experimental_feature (MetaBackend *backend,
MetaExperimentalFeature feature)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
priv->experimental_features |= feature;
}
static void
meta_backend_class_init (MetaBackendClass *klass)
{
@@ -498,6 +584,20 @@ meta_backend_class_init (MetaBackendClass *klass)
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_INT);
signals[EXPERIMENTAL_FEATURES_CHANGED] =
g_signal_new ("experimental-features-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_UINT);
signals[UI_SCALING_FACTOR_CHANGED] =
g_signal_new ("ui-scaling-factor-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
mutter_stage_views = g_getenv ("MUTTER_STAGE_VIEWS");
stage_views_disabled = g_strcmp0 (mutter_stage_views, "0") == 0;
@@ -511,7 +611,11 @@ meta_backend_initable_init (GInitable *initable,
MetaBackend *backend = META_BACKEND (initable);
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
priv->settings = meta_settings_new (backend);
priv->mutter_settings = g_settings_new ("org.gnome.mutter");
g_signal_connect (priv->mutter_settings, "changed",
G_CALLBACK (mutter_settings_changed),
backend);
update_experimental_features (backend);
priv->egl = g_object_new (META_TYPE_EGL, NULL);
@@ -528,8 +632,6 @@ meta_backend_initable_init (GInitable *initable,
priv->dnd = g_object_new (META_TYPE_DND, NULL);
priv->orientation_manager = g_object_new (META_TYPE_ORIENTATION_MANAGER, NULL);
return TRUE;
}
@@ -548,11 +650,7 @@ meta_backend_init (MetaBackend *backend)
static void
meta_backend_post_init (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
META_BACKEND_GET_CLASS (backend)->post_init (backend);
meta_settings_post_init (priv->settings);
}
/**
@@ -578,17 +676,6 @@ meta_backend_get_monitor_manager (MetaBackend *backend)
return priv->monitor_manager;
}
/**
* meta_backend_get_orientation_manager: (skip)
*/
MetaOrientationManager *
meta_backend_get_orientation_manager (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return priv->orientation_manager;
}
MetaCursorTracker *
meta_backend_get_cursor_tracker (MetaBackend *backend)
{
@@ -611,8 +698,7 @@ meta_backend_get_cursor_renderer (MetaBackend *backend)
/**
* meta_backend_get_renderer: (skip)
*/
MetaRenderer *
meta_backend_get_renderer (MetaBackend *backend)
MetaRenderer * meta_backend_get_renderer (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
@@ -622,25 +708,13 @@ meta_backend_get_renderer (MetaBackend *backend)
/**
* meta_backend_get_egl: (skip)
*/
MetaEgl *
meta_backend_get_egl (MetaBackend *backend)
MetaEgl * meta_backend_get_egl (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return priv->egl;
}
/**
* meta_backend_get_settings: (skip)
*/
MetaSettings *
meta_backend_get_settings (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return priv->settings;
}
/**
* meta_backend_grab_device: (skip)
*/
@@ -699,12 +773,6 @@ meta_backend_get_keymap (MetaBackend *backend)
return META_BACKEND_GET_CLASS (backend)->get_keymap (backend);
}
xkb_layout_index_t
meta_backend_get_keymap_layout_group (MetaBackend *backend)
{
return META_BACKEND_GET_CLASS (backend)->get_keymap_layout_group (backend);
}
void
meta_backend_lock_layout_group (MetaBackend *backend,
guint idx)
@@ -942,6 +1010,29 @@ meta_clutter_init (void)
meta_backend_post_init (_backend);
}
static void
xft_dpi_changed (GtkSettings *settings,
GParamSpec *pspec,
MetaBackend *backend)
{
meta_backend_update_ui_scaling_factor (backend);
meta_backend_notify_ui_scaling_factor_changed (backend);
}
void
meta_backend_display_opened (MetaBackend *backend)
{
/*
* gdk-window-scaling-factor is not exported to gtk-settings
* because it is handled inside gdk, so we use gtk-xft-dpi instead
* which also changes when the scale factor changes.
*
* TODO: Don't rely on GtkSettings for this
*/
g_signal_connect (gtk_settings_get_default (), "notify::gtk-xft-dpi",
G_CALLBACK (xft_dpi_changed), backend);
}
gboolean
meta_is_stage_views_enabled (void)
{
@@ -1004,3 +1095,46 @@ meta_backend_notify_keymap_layout_group_changed (MetaBackend *backend,
g_signal_emit (backend, signals[KEYMAP_LAYOUT_GROUP_CHANGED], 0,
locked_group);
}
static int
calculate_ui_scaling_factor (MetaBackend *backend)
{
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
GList *logical_monitors;
GList *l;
int max_scale = 1;
logical_monitors =
meta_monitor_manager_get_logical_monitors (monitor_manager);
for (l = logical_monitors; l; l = l->next)
{
MetaLogicalMonitor *logical_monitor = l->data;
max_scale = MAX (logical_monitor->scale, max_scale);
}
return max_scale;
}
int
meta_backend_get_ui_scaling_factor (MetaBackend *backend)
{
if (meta_is_stage_views_scaled ())
{
return 1;
}
else
{
if (meta_is_monitor_config_manager_enabled ())
return calculate_ui_scaling_factor (backend);
else
return meta_theme_get_window_scaling_factor ();
}
}
void
meta_backend_notify_ui_scaling_factor_changed (MetaBackend *backend)
{
g_signal_emit (backend, signals[UI_SCALING_FACTOR_CHANGED], 0);
}

View File

@@ -37,8 +37,7 @@
struct _MetaCursorRendererPrivate
{
float current_x;
float current_y;
int current_x, current_y;
MetaCursorSprite *displayed_cursor;
MetaOverlay *stage_overlay;
@@ -70,7 +69,7 @@ queue_redraw (MetaCursorRenderer *renderer,
MetaBackend *backend = meta_get_backend ();
ClutterActor *stage = meta_backend_get_stage (backend);
CoglTexture *texture;
ClutterRect rect = { 0 };
MetaRectangle rect = { 0 };
if (cursor_sprite)
rect = meta_cursor_renderer_calculate_rect (renderer, cursor_sprite);
@@ -160,7 +159,7 @@ meta_cursor_renderer_init (MetaCursorRenderer *renderer)
NULL);
}
ClutterRect
MetaRectangle
meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite)
{
@@ -173,22 +172,18 @@ meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
texture = meta_cursor_sprite_get_cogl_texture (cursor_sprite);
if (!texture)
return (ClutterRect) { 0 };
return (MetaRectangle) { 0 };
meta_cursor_sprite_get_hotspot (cursor_sprite, &hot_x, &hot_y);
texture_scale = meta_cursor_sprite_get_texture_scale (cursor_sprite);
width = cogl_texture_get_width (texture);
height = cogl_texture_get_height (texture);
return (ClutterRect) {
.origin = {
.x = priv->current_x - (hot_x * texture_scale),
.y = priv->current_y - (hot_y * texture_scale)
},
.size = {
.width = width * texture_scale,
.height = height * texture_scale
}
return (MetaRectangle) {
.x = (int)roundf (priv->current_x - (hot_x * texture_scale)),
.y = (int)roundf (priv->current_y - (hot_y * texture_scale)),
.width = (int)roundf (width * texture_scale),
.height = (int)roundf (height * texture_scale),
};
}
@@ -202,8 +197,8 @@ update_cursor (MetaCursorRenderer *renderer,
if (cursor_sprite)
meta_cursor_sprite_prepare_at (cursor_sprite,
(int) priv->current_x,
(int) priv->current_y);
priv->current_x,
priv->current_y);
handled_by_backend =
META_CURSOR_RENDERER_GET_CLASS (renderer)->update_cursor (renderer,
@@ -251,8 +246,7 @@ meta_cursor_renderer_force_update (MetaCursorRenderer *renderer)
void
meta_cursor_renderer_set_position (MetaCursorRenderer *renderer,
float x,
float y)
int x, int y)
{
MetaCursorRendererPrivate *priv = meta_cursor_renderer_get_instance_private (renderer);

View File

@@ -60,14 +60,13 @@ void meta_cursor_renderer_set_cursor (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite);
void meta_cursor_renderer_set_position (MetaCursorRenderer *renderer,
float x,
float y);
int x, int y);
void meta_cursor_renderer_force_update (MetaCursorRenderer *renderer);
MetaCursorSprite * meta_cursor_renderer_get_cursor (MetaCursorRenderer *renderer);
ClutterRect meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite);
MetaRectangle meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite);
#ifdef HAVE_WAYLAND
void meta_cursor_renderer_realize_cursor_from_wl_buffer (MetaCursorRenderer *renderer,

View File

@@ -62,8 +62,8 @@ void meta_cursor_tracker_set_root_cursor (MetaCursorTracker *tracker,
MetaCursorSprite *cursor_sprite);
void meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
float new_x,
float new_y);
int new_x,
int new_y);
MetaCursorSprite * meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker);

View File

@@ -350,8 +350,8 @@ meta_cursor_tracker_set_root_cursor (MetaCursorTracker *tracker,
void
meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
float new_x,
float new_y)
int new_x,
int new_y)
{
MetaBackend *backend = meta_get_backend ();
MetaCursorRenderer *cursor_renderer =

View File

@@ -66,9 +66,6 @@ struct _MetaEgl
PFNEGLSTREAMCONSUMERACQUIREKHRPROC eglStreamConsumerAcquireKHR;
PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC eglStreamConsumerAcquireAttribNV;
PFNEGLQUERYDMABUFFORMATSEXTPROC eglQueryDmaBufFormatsEXT;
PFNEGLQUERYDMABUFMODIFIERSEXTPROC eglQueryDmaBufModifiersEXT;
};
G_DEFINE_TYPE (MetaEgl, meta_egl, G_TYPE_OBJECT)
@@ -714,51 +711,6 @@ meta_egl_stream_consumer_acquire (MetaEgl *egl,
return TRUE;
}
gboolean
meta_egl_query_dma_buf_formats (MetaEgl *egl,
EGLDisplay display,
EGLint max_formats,
EGLint *formats,
EGLint *num_formats,
GError **error)
{
if (!is_egl_proc_valid (egl->eglQueryDmaBufFormatsEXT, error))
return FALSE;
if (!egl->eglQueryDmaBufFormatsEXT (display, max_formats, formats,
num_formats))
{
set_egl_error (error);
return FALSE;
}
return TRUE;
}
gboolean
meta_egl_query_dma_buf_modifiers (MetaEgl *egl,
EGLDisplay display,
EGLint format,
EGLint max_modifiers,
EGLuint64KHR *modifiers,
EGLBoolean *external_only,
EGLint *num_modifiers,
GError **error)
{
if (!is_egl_proc_valid (egl->eglQueryDmaBufModifiersEXT, error))
return FALSE;
if (!egl->eglQueryDmaBufModifiersEXT (display, format, max_modifiers,
modifiers, external_only,
num_modifiers))
{
set_egl_error (error);
return FALSE;
}
return TRUE;
}
#define GET_EGL_PROC_ADDR(proc) \
egl->proc = (void *) eglGetProcAddress (#proc);
@@ -801,9 +753,6 @@ meta_egl_constructed (GObject *object)
GET_EGL_PROC_ADDR (eglStreamConsumerAcquireKHR);
GET_EGL_PROC_ADDR (eglStreamConsumerAcquireAttribNV);
GET_EGL_PROC_ADDR (eglQueryDmaBufFormatsEXT);
GET_EGL_PROC_ADDR (eglQueryDmaBufModifiersEXT);
}
#undef GET_EGL_PROC_ADDR

View File

@@ -167,20 +167,4 @@ gboolean meta_egl_stream_consumer_gl_texture_external (MetaEgl *egl,
EGLStreamKHR stream,
GError **error);
gboolean meta_egl_query_dma_buf_formats (MetaEgl *egl,
EGLDisplay display,
EGLint max_formats,
EGLint *formats,
EGLint *num_formats,
GError **error);
gboolean meta_egl_query_dma_buf_modifiers (MetaEgl *egl,
EGLDisplay display,
EGLint format,
EGLint max_modifiers,
EGLuint64KHR *modifiers,
EGLBoolean *external_only,
EGLint *num_formats,
GError **error);
#endif /* META_EGL_H */

View File

@@ -31,9 +31,20 @@
#include <libwacom/libwacom.h>
#endif
#define META_TYPE_INPUT_SETTINGS (meta_input_settings_get_type ())
G_DECLARE_DERIVABLE_TYPE (MetaInputSettings, meta_input_settings,
META, INPUT_SETTINGS, GObject)
#define META_TYPE_INPUT_SETTINGS (meta_input_settings_get_type ())
#define META_INPUT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_INPUT_SETTINGS, MetaInputSettings))
#define META_INPUT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_INPUT_SETTINGS, MetaInputSettingsClass))
#define META_IS_INPUT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_INPUT_SETTINGS))
#define META_IS_INPUT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_INPUT_SETTINGS))
#define META_INPUT_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_INPUT_SETTINGS, MetaInputSettingsClass))
typedef struct _MetaInputSettings MetaInputSettings;
typedef struct _MetaInputSettingsClass MetaInputSettingsClass;
struct _MetaInputSettings
{
GObject parent_instance;
};
struct _MetaInputSettingsClass
{
@@ -54,12 +65,6 @@ struct _MetaInputSettingsClass
void (* set_tap_enabled) (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled);
void (* set_tap_and_drag_enabled) (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled);
void (* set_disable_while_typing) (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled);
void (* set_invert_scroll) (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean inverted);
@@ -112,10 +117,15 @@ struct _MetaInputSettingsClass
ClutterInputDeviceTool *tool,
GDesktopStylusButtonAction primary,
GDesktopStylusButtonAction secondary);
gboolean (* has_two_finger_scroll) (MetaInputSettings *settings,
ClutterInputDevice *device);
};
GType meta_input_settings_get_type (void) G_GNUC_CONST;
MetaInputSettings * meta_input_settings_create (void);
GSettings * meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
ClutterInputDevice *device);
MetaLogicalMonitor * meta_input_settings_get_tablet_logical_monitor (MetaInputSettings *settings,
@@ -128,12 +138,11 @@ gboolean meta_input_settings_is_pad_button_grabbed (MetaIn
ClutterInputDevice *pad,
guint button);
gboolean meta_input_settings_handle_pad_event (MetaInputSettings *input_settings,
const ClutterEvent *event);
gchar * meta_input_settings_get_pad_action_label (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
MetaPadActionType action,
guint number);
gboolean meta_input_settings_handle_pad_button (MetaInputSettings *input_settings,
const ClutterPadButtonEvent *event);
gchar * meta_input_settings_get_pad_button_action_label (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
guint button);
#ifdef HAVE_LIBWACOM
WacomDevice * meta_input_settings_get_tablet_wacom_device (MetaInputSettings *settings,

View File

@@ -33,6 +33,12 @@
#include "meta-input-settings-private.h"
#include "backends/meta-logical-monitor.h"
#include "backends/meta-monitor.h"
#include "x11/meta-input-settings-x11.h"
#ifdef HAVE_NATIVE_BACKEND
#include "native/meta-backend-native.h"
#include "native/meta-input-settings-native.h"
#endif
#include <glib/gi18n-lib.h>
#include <meta/util.h>
@@ -47,11 +53,9 @@ struct _DeviceMappingInfo
MetaInputSettings *input_settings;
ClutterInputDevice *device;
GSettings *settings;
guint changed_id;
#ifdef HAVE_LIBWACOM
WacomDevice *wacom_device;
#endif
guint *group_modes;
};
struct _MetaInputSettingsPrivate
@@ -75,14 +79,6 @@ struct _MetaInputSettingsPrivate
#endif
GHashTable *two_finger_devices;
/* Pad ring/strip emission */
struct {
ClutterInputDevice *pad;
MetaPadActionType action;
guint number;
gdouble value;
} last_pad_action_info;
};
typedef void (*ConfigBoolFunc) (MetaInputSettings *input_settings,
@@ -95,14 +91,6 @@ typedef void (*ConfigUintFunc) (MetaInputSettings *input_settings,
ClutterInputDevice *device,
guint value);
typedef enum {
META_PAD_DIRECTION_NONE = -1,
META_PAD_DIRECTION_UP = 0,
META_PAD_DIRECTION_DOWN,
META_PAD_DIRECTION_CW,
META_PAD_DIRECTION_CCW,
} MetaPadDirection;
G_DEFINE_TYPE_WITH_PRIVATE (MetaInputSettings, meta_input_settings, G_TYPE_OBJECT)
static GSList *
@@ -460,44 +448,6 @@ update_device_natural_scroll (MetaInputSettings *input_settings,
}
}
static void
update_touchpad_disable_while_typing (MetaInputSettings *input_settings,
ClutterInputDevice *device)
{
GSettings *settings;
MetaInputSettingsClass *input_settings_class;
MetaInputSettingsPrivate *priv;
gboolean enabled;
const gchar *key = "disable-while-typing";
if (device &&
clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
return;
priv = meta_input_settings_get_instance_private (input_settings);
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
enabled = g_settings_get_boolean (priv->touchpad_settings, key);
if (device)
{
settings = get_settings_for_device_type (input_settings,
clutter_input_device_get_device_type (device));
if (!settings)
return;
settings_device_set_bool_setting (input_settings, device,
input_settings_class->set_disable_while_typing,
enabled);
}
else
{
settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE,
input_settings_class->set_disable_while_typing,
enabled);
}
}
static void
update_touchpad_tap_enabled (MetaInputSettings *input_settings,
ClutterInputDevice *device)
@@ -528,36 +478,6 @@ update_touchpad_tap_enabled (MetaInputSettings *input_settings,
}
}
static void
update_touchpad_tap_and_drag_enabled (MetaInputSettings *input_settings,
ClutterInputDevice *device)
{
MetaInputSettingsClass *input_settings_class;
MetaInputSettingsPrivate *priv;
gboolean enabled;
if (device &&
clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
return;
priv = meta_input_settings_get_instance_private (input_settings);
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
enabled = g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
if (device)
{
settings_device_set_bool_setting (input_settings, device,
input_settings_class->set_tap_and_drag_enabled,
enabled);
}
else
{
settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE,
input_settings_class->set_tap_and_drag_enabled,
enabled);
}
}
static void
update_touchpad_edge_scroll (MetaInputSettings *input_settings,
ClutterInputDevice *device)
@@ -780,7 +700,7 @@ logical_monitor_has_monitor (MetaMonitorManager *monitor_manager,
GList *monitors;
GList *l;
monitors = meta_logical_monitor_get_monitors (logical_monitor);
monitors = meta_monitor_manager_get_monitors (monitor_manager);
for (l = monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
@@ -905,7 +825,7 @@ update_device_display (MetaInputSettings *input_settings,
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
/* If mapping is relative, the device can move on all displays */
if (clutter_input_device_get_device_type (device) == CLUTTER_TOUCHSCREEN_DEVICE ||
if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE ||
clutter_input_device_get_mapping_mode (device) ==
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE)
logical_monitor = meta_input_settings_find_logical_monitor (input_settings,
@@ -1069,10 +989,6 @@ meta_input_settings_changed_cb (GSettings *settings,
update_device_natural_scroll (input_settings, NULL);
else if (strcmp (key, "tap-to-click") == 0)
update_touchpad_tap_enabled (input_settings, NULL);
else if (strcmp (key, "tap-and_drag") == 0)
update_touchpad_tap_and_drag_enabled (input_settings, NULL);
else if (strcmp(key, "disable-while-typing") == 0)
update_touchpad_disable_while_typing (input_settings, NULL);
else if (strcmp (key, "send-events") == 0)
update_touchpad_send_events (input_settings, NULL);
else if (strcmp (key, "edge-scrolling-enabled") == 0)
@@ -1119,15 +1035,10 @@ static void
apply_mappable_device_settings (MetaInputSettings *input_settings,
DeviceMappingInfo *info)
{
ClutterInputDeviceType device_type;
update_device_display (input_settings, info->settings, info->device);
device_type = clutter_input_device_get_device_type (info->device);
if (device_type == CLUTTER_TABLET_DEVICE ||
device_type == CLUTTER_PEN_DEVICE ||
device_type == CLUTTER_ERASER_DEVICE ||
device_type == CLUTTER_PAD_DEVICE)
if (clutter_input_device_get_device_type (info->device) == CLUTTER_TABLET_DEVICE ||
clutter_input_device_get_device_type (info->device) == CLUTTER_PAD_DEVICE)
{
update_tablet_mapping (input_settings, info->settings, info->device);
update_tablet_area (input_settings, info->settings, info->device);
@@ -1210,58 +1121,20 @@ lookup_tool_settings (ClutterInputDeviceTool *tool,
}
static GSettings *
lookup_pad_action_settings (ClutterInputDevice *device,
MetaPadActionType action,
guint number,
MetaPadDirection direction,
gint mode)
lookup_pad_button_settings (ClutterInputDevice *device,
guint button)
{
const gchar *vendor, *product, *action_type, *detail_type = NULL;
const gchar *vendor, *product;
GSettings *settings;
GString *path;
gchar action_label;
gchar *path;
vendor = clutter_input_device_get_vendor_id (device);
product = clutter_input_device_get_product_id (device);
action_label = 'A' + number;
switch (action)
{
case META_PAD_ACTION_BUTTON:
action_type = "button";
break;
case META_PAD_ACTION_RING:
g_assert (direction == META_PAD_DIRECTION_CW ||
direction == META_PAD_DIRECTION_CCW);
action_type = "ring";
detail_type = (direction == META_PAD_DIRECTION_CW) ? "cw" : "ccw";
break;
case META_PAD_ACTION_STRIP:
g_assert (direction == META_PAD_DIRECTION_UP ||
direction == META_PAD_DIRECTION_DOWN);
action_type = "strip";
detail_type = (direction == META_PAD_DIRECTION_UP) ? "up" : "down";
break;
default:
return NULL;
}
path = g_string_new (NULL);
g_string_append_printf (path, "/org/gnome/desktop/peripherals/tablets/%s:%s/%s%c",
vendor, product, action_type, action_label);
if (detail_type)
g_string_append_printf (path, "-%s", detail_type);
if (mode >= 0)
g_string_append_printf (path, "-mode-%d", mode);
g_string_append_c (path, '/');
path = g_strdup_printf ("/org/gnome/desktop/peripherals/tablets/%s:%s/button%c/",
vendor, product, 'A' + button);
settings = g_settings_new_with_path ("org.gnome.desktop.peripherals.tablet.pad-button",
path->str);
g_string_free (path, TRUE);
path);
g_free (path);
return settings;
}
@@ -1290,9 +1163,7 @@ device_mapping_info_free (DeviceMappingInfo *info)
if (info->wacom_device)
libwacom_destroy (info->wacom_device);
#endif
g_signal_handler_disconnect (info->settings, info->changed_id);
g_object_unref (info->settings);
g_free (info->group_modes);
g_slice_free (DeviceMappingInfo, info);
}
@@ -1336,15 +1207,8 @@ check_add_mappable_device (MetaInputSettings *input_settings,
}
#endif
if (clutter_input_device_get_device_type (device) == CLUTTER_PAD_DEVICE)
{
info->group_modes =
g_new0 (guint, clutter_input_device_get_n_mode_groups (device));
}
info->changed_id = g_signal_connect (settings, "changed",
G_CALLBACK (mapped_device_changed_cb),
info);
g_signal_connect (settings, "changed",
G_CALLBACK (mapped_device_changed_cb), info);
g_hash_table_insert (priv->mappable_devices, device, info);
@@ -1370,8 +1234,6 @@ apply_device_settings (MetaInputSettings *input_settings,
update_touchpad_left_handed (input_settings, device);
update_touchpad_tap_enabled (input_settings, device);
update_touchpad_tap_and_drag_enabled (input_settings, device);
update_touchpad_disable_while_typing (input_settings, device);
update_touchpad_send_events (input_settings, device);
update_touchpad_two_finger_scroll (input_settings, device);
update_touchpad_edge_scroll (input_settings, device);
@@ -1616,6 +1478,23 @@ meta_input_settings_init (MetaInputSettings *settings)
priv->two_finger_devices = g_hash_table_new (NULL, NULL);
}
MetaInputSettings *
meta_input_settings_create (void)
{
#ifdef HAVE_NATIVE_BACKEND
MetaBackend *backend;
backend = meta_get_backend ();
if (META_IS_BACKEND_NATIVE (backend))
return g_object_new (META_TYPE_INPUT_SETTINGS_NATIVE, NULL);
#endif
if (!meta_is_wayland_compositor ())
return g_object_new (META_TYPE_INPUT_SETTINGS_X11, NULL);
return NULL;
}
GSettings *
meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
ClutterInputDevice *device)
@@ -1684,8 +1563,7 @@ meta_input_settings_get_pad_button_action (MetaInputSettings *input_settings,
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (pad),
G_DESKTOP_PAD_BUTTON_ACTION_NONE);
settings = lookup_pad_action_settings (pad, META_PAD_ACTION_BUTTON,
button, META_PAD_DIRECTION_NONE, -1);
settings = lookup_pad_button_settings (pad, button);
action = g_settings_get_enum (settings, "action");
g_object_unref (settings);
@@ -1741,7 +1619,7 @@ cycle_logical_monitors (MetaInputSettings *settings,
if (l->next)
*next_logical_monitor = l->next->data;
else
*next_logical_monitor = NULL;
*next_logical_monitor = logical_monitors->data;
}
return TRUE;
@@ -1834,20 +1712,24 @@ emulate_modifiers (ClutterVirtualInputDevice *device,
static void
meta_input_settings_emulate_keybinding (MetaInputSettings *input_settings,
const gchar *accel,
ClutterInputDevice *pad,
guint button,
gboolean is_press)
{
MetaInputSettingsPrivate *priv;
ClutterKeyState state;
GSettings *settings;
guint key, mods;
if (!accel || !*accel)
return;
gchar *accel;
priv = meta_input_settings_get_instance_private (input_settings);
settings = lookup_pad_button_settings (pad, button);
accel = g_settings_get_string (settings, "keybinding");
g_object_unref (settings);
/* FIXME: This is appalling */
gtk_accelerator_parse (accel, &key, &mods);
g_free (accel);
if (!priv->virtual_pad_keyboard)
{
@@ -1884,21 +1766,20 @@ meta_input_settings_is_pad_button_grabbed (MetaInputSettings *input_settings,
G_DESKTOP_PAD_BUTTON_ACTION_NONE);
}
static gboolean
gboolean
meta_input_settings_handle_pad_button (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
const ClutterPadButtonEvent *event)
{
GDesktopPadButtonAction action;
ClutterInputDevice *pad;
gint button, group, mode;
gboolean is_press;
GSettings *settings;
gchar *accel;
g_return_val_if_fail (META_IS_INPUT_SETTINGS (input_settings), FALSE);
g_return_val_if_fail (event->type == CLUTTER_PAD_BUTTON_PRESS ||
event->type == CLUTTER_PAD_BUTTON_RELEASE, FALSE);
pad = clutter_event_get_source_device ((ClutterEvent *) event);
button = event->button;
mode = event->mode;
group = clutter_input_device_get_mode_switch_button_group (pad, button);
@@ -1908,19 +1789,18 @@ meta_input_settings_handle_pad_button (MetaInputSettings *input_settin
{
guint n_modes = clutter_input_device_get_group_n_modes (pad, group);
const gchar *pretty_name = NULL;
#ifdef HAVE_LIBWACOM
MetaInputSettingsPrivate *priv;
DeviceMappingInfo *info;
priv = meta_input_settings_get_instance_private (input_settings);
info = g_hash_table_lookup (priv->mappable_devices, pad);
#ifdef HAVE_LIBWACOM
if (info && info->wacom_device)
pretty_name = libwacom_get_name (info->wacom_device);
#endif
meta_display_notify_pad_group_switch (meta_get_display (), pad,
pretty_name, group, mode, n_modes);
info->group_modes[group] = mode;
}
action = meta_input_settings_get_pad_button_action (input_settings, pad, button);
@@ -1936,12 +1816,8 @@ meta_input_settings_handle_pad_button (MetaInputSettings *input_settin
meta_display_request_pad_osd (meta_get_display (), pad, FALSE);
return TRUE;
case G_DESKTOP_PAD_BUTTON_ACTION_KEYBINDING:
settings = lookup_pad_action_settings (pad, META_PAD_ACTION_BUTTON,
button, META_PAD_DIRECTION_NONE, -1);
accel = g_settings_get_string (settings, "keybinding");
meta_input_settings_emulate_keybinding (input_settings, accel, is_press);
g_object_unref (settings);
g_free (accel);
meta_input_settings_emulate_keybinding (input_settings, pad,
button, is_press);
return TRUE;
case G_DESKTOP_PAD_BUTTON_ACTION_NONE:
default:
@@ -1949,189 +1825,10 @@ meta_input_settings_handle_pad_button (MetaInputSettings *input_settin
}
}
static gboolean
meta_input_settings_handle_pad_action (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
MetaPadActionType action,
guint number,
MetaPadDirection direction,
guint mode)
{
GSettings *settings;
gboolean handled = FALSE;
gchar *accel;
settings = lookup_pad_action_settings (pad, action, number, direction, mode);
accel = g_settings_get_string (settings, "keybinding");
if (accel && *accel)
{
meta_input_settings_emulate_keybinding (input_settings, accel, TRUE);
meta_input_settings_emulate_keybinding (input_settings, accel, FALSE);
handled = TRUE;
}
g_object_unref (settings);
g_free (accel);
return handled;
}
static gboolean
meta_input_settings_get_pad_action_direction (MetaInputSettings *input_settings,
const ClutterEvent *event,
MetaPadDirection *direction)
{
MetaInputSettingsPrivate *priv;
ClutterInputDevice *pad = clutter_event_get_device (event);
MetaPadActionType pad_action;
gboolean has_direction = FALSE;
MetaPadDirection inc_dir, dec_dir;
guint number;
gdouble value;
priv = meta_input_settings_get_instance_private (input_settings);
*direction = META_PAD_DIRECTION_NONE;
switch (event->type)
{
case CLUTTER_PAD_RING:
pad_action = META_PAD_ACTION_RING;
number = event->pad_ring.ring_number;
value = event->pad_ring.angle;
inc_dir = META_PAD_DIRECTION_CW;
dec_dir = META_PAD_DIRECTION_CCW;
break;
case CLUTTER_PAD_STRIP:
pad_action = META_PAD_ACTION_STRIP;
number = event->pad_strip.strip_number;
value = event->pad_strip.value;
inc_dir = META_PAD_DIRECTION_DOWN;
dec_dir = META_PAD_DIRECTION_UP;
break;
default:
return FALSE;
}
if (priv->last_pad_action_info.pad == pad &&
priv->last_pad_action_info.action == pad_action &&
priv->last_pad_action_info.number == number &&
value >= 0 && priv->last_pad_action_info.value >= 0)
{
*direction = (value - priv->last_pad_action_info.value) > 0 ?
inc_dir : dec_dir;
has_direction = TRUE;
}
priv->last_pad_action_info.pad = pad;
priv->last_pad_action_info.action = pad_action;
priv->last_pad_action_info.number = number;
priv->last_pad_action_info.value = value;
return has_direction;
}
gboolean
meta_input_settings_handle_pad_event (MetaInputSettings *input_settings,
const ClutterEvent *event)
{
ClutterInputDevice *pad;
MetaPadDirection direction = META_PAD_DIRECTION_NONE;
pad = clutter_event_get_source_device ((ClutterEvent *) event);
switch (event->type)
{
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
return meta_input_settings_handle_pad_button (input_settings, pad,
&event->pad_button);
case CLUTTER_PAD_RING:
if (!meta_input_settings_get_pad_action_direction (input_settings,
event, &direction))
return FALSE;
return meta_input_settings_handle_pad_action (input_settings, pad,
META_PAD_ACTION_RING,
event->pad_ring.ring_number,
direction,
event->pad_ring.mode);
case CLUTTER_PAD_STRIP:
if (!meta_input_settings_get_pad_action_direction (input_settings,
event, &direction))
return FALSE;
return meta_input_settings_handle_pad_action (input_settings, pad,
META_PAD_ACTION_STRIP,
event->pad_strip.strip_number,
direction,
event->pad_strip.mode);
default:
return FALSE;
}
}
static gchar *
compose_directional_action_label (GSettings *direction1,
GSettings *direction2)
{
gchar *accel1, *accel2, *str = NULL;
accel1 = g_settings_get_string (direction1, "keybinding");
accel2 = g_settings_get_string (direction2, "keybinding");
if (accel1 && *accel1 && accel2 && *accel2)
str = g_strdup_printf ("%s / %s", accel1, accel2);
g_free (accel1);
g_free (accel2);
return str;
}
static gchar *
meta_input_settings_get_ring_label (MetaInputSettings *settings,
ClutterInputDevice *pad,
guint number,
guint mode)
{
GSettings *settings1, *settings2;
gchar *label;
/* We only allow keybinding actions with those */
settings1 = lookup_pad_action_settings (pad, META_PAD_ACTION_RING, number,
META_PAD_DIRECTION_CW, mode);
settings2 = lookup_pad_action_settings (pad, META_PAD_ACTION_RING, number,
META_PAD_DIRECTION_CCW, mode);
label = compose_directional_action_label (settings1, settings2);
g_object_unref (settings1);
g_object_unref (settings2);
return label;
}
static gchar *
meta_input_settings_get_strip_label (MetaInputSettings *settings,
ClutterInputDevice *pad,
guint number,
guint mode)
{
GSettings *settings1, *settings2;
gchar *label;
/* We only allow keybinding actions with those */
settings1 = lookup_pad_action_settings (pad, META_PAD_ACTION_STRIP, number,
META_PAD_DIRECTION_UP, mode);
settings2 = lookup_pad_action_settings (pad, META_PAD_ACTION_STRIP, number,
META_PAD_DIRECTION_DOWN, mode);
label = compose_directional_action_label (settings1, settings2);
g_object_unref (settings1);
g_object_unref (settings2);
return label;
}
static gchar *
meta_input_settings_get_button_label (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
guint button)
gchar *
meta_input_settings_get_pad_button_action_label (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
guint button)
{
GDesktopPadButtonAction action;
gint group;
@@ -2160,8 +1857,7 @@ meta_input_settings_get_button_label (MetaInputSettings *input_settings,
GSettings *settings;
gchar *accel;
settings = lookup_pad_action_settings (pad, META_PAD_ACTION_BUTTON,
button, META_PAD_DIRECTION_NONE, -1);
settings = lookup_pad_button_settings (pad, button);
accel = g_settings_get_string (settings, "keybinding");
g_object_unref (settings);
@@ -2179,55 +1875,3 @@ meta_input_settings_get_button_label (MetaInputSettings *input_settings,
return NULL;
}
}
static guint
get_current_pad_mode (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
MetaPadActionType action_type,
guint number)
{
MetaInputSettingsPrivate *priv;
DeviceMappingInfo *info;
guint group = 0, n_groups;
priv = meta_input_settings_get_instance_private (input_settings);
info = g_hash_table_lookup (priv->mappable_devices, pad);
n_groups = clutter_input_device_get_n_mode_groups (pad);
if (!info->group_modes || n_groups == 0)
return 0;
if (action_type == META_PAD_ACTION_RING ||
action_type == META_PAD_ACTION_STRIP)
{
/* Assume features are evenly distributed in groups */
group = number % n_groups;
}
return info->group_modes[group];
}
gchar *
meta_input_settings_get_pad_action_label (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
MetaPadActionType action_type,
guint number)
{
guint mode;
switch (action_type)
{
case META_PAD_ACTION_BUTTON:
return meta_input_settings_get_button_label (input_settings, pad, number);
case META_PAD_ACTION_RING:
mode = get_current_pad_mode (input_settings, pad, action_type, number);
return meta_input_settings_get_ring_label (input_settings, pad,
number, mode);
case META_PAD_ACTION_STRIP:
mode = get_current_pad_mode (input_settings, pad, action_type, number);
return meta_input_settings_get_strip_label (input_settings, pad,
number, mode);
}
return NULL;
}

View File

@@ -107,15 +107,21 @@ MetaLogicalMonitor *
meta_logical_monitor_new_derived (MetaMonitorManager *monitor_manager,
MetaMonitor *monitor,
MetaRectangle *layout,
float scale,
int monitor_number)
{
MetaLogicalMonitor *logical_monitor;
MetaOutput *main_output;
MetaMonitorMode *monitor_mode;
int scale;
MetaMonitorTransform transform;
logical_monitor = g_object_new (META_TYPE_LOGICAL_MONITOR, NULL);
monitor_mode = meta_monitor_get_current_mode (monitor);
scale = meta_monitor_manager_calculate_monitor_mode_scale (monitor_manager,
monitor,
monitor_mode);
transform = derive_monitor_transform (monitor);
main_output = meta_monitor_get_main_output (monitor);
@@ -175,24 +181,12 @@ meta_logical_monitor_make_primary (MetaLogicalMonitor *logical_monitor)
logical_monitor->is_primary = TRUE;
}
float
int
meta_logical_monitor_get_scale (MetaLogicalMonitor *logical_monitor)
{
return logical_monitor->scale;
}
MetaMonitorTransform
meta_logical_monitor_get_transform (MetaLogicalMonitor *logical_monitor)
{
return logical_monitor->transform;
}
MetaRectangle
meta_logical_monitor_get_layout (MetaLogicalMonitor *logical_monitor)
{
return logical_monitor->rect;
}
GList *
meta_logical_monitor_get_monitors (MetaLogicalMonitor *logical_monitor)
{

View File

@@ -40,7 +40,7 @@ struct _MetaLogicalMonitor
gboolean is_primary;
gboolean is_presentation; /* XXX: not yet used */
gboolean in_fullscreen;
float scale;
int scale;
MetaMonitorTransform transform;
/* The primary or first output for this monitor, 0 if we can't figure out.
@@ -68,7 +68,6 @@ MetaLogicalMonitor * meta_logical_monitor_new (MetaMonitorManager *monitor
MetaLogicalMonitor * meta_logical_monitor_new_derived (MetaMonitorManager *monitor_manager,
MetaMonitor *monitor,
MetaRectangle *layout,
float scale,
int monitor_number);
void meta_logical_monitor_add_monitor (MetaLogicalMonitor *logical_monitor,
@@ -78,11 +77,7 @@ gboolean meta_logical_monitor_is_primary (MetaLogicalMonitor *logical_monitor);
void meta_logical_monitor_make_primary (MetaLogicalMonitor *logical_monitor);
float meta_logical_monitor_get_scale (MetaLogicalMonitor *logical_monitor);
MetaMonitorTransform meta_logical_monitor_get_transform (MetaLogicalMonitor *logical_monitor);
MetaRectangle meta_logical_monitor_get_layout (MetaLogicalMonitor *logical_monitor);
int meta_logical_monitor_get_scale (MetaLogicalMonitor *logical_monitor);
GList * meta_logical_monitor_get_monitors (MetaLogicalMonitor *logical_monitor);

View File

@@ -23,13 +23,10 @@
#include "backends/meta-monitor-config-manager.h"
#include "backends/meta-monitor-config-migration.h"
#include "backends/meta-monitor-config-store.h"
#include "backends/meta-monitor-manager-private.h"
#include "core/boxes-private.h"
#define CONFIG_HISTORY_MAX_SIZE 3
struct _MetaMonitorConfigManager
{
GObject parent;
@@ -39,7 +36,7 @@ struct _MetaMonitorConfigManager
MetaMonitorConfigStore *config_store;
MetaMonitorsConfig *current_config;
GQueue config_history;
MetaMonitorsConfig *previous_config;
};
G_DEFINE_TYPE (MetaMonitorConfigManager, meta_monitor_config_manager,
@@ -48,12 +45,6 @@ G_DEFINE_TYPE (MetaMonitorConfigManager, meta_monitor_config_manager,
G_DEFINE_TYPE (MetaMonitorsConfig, meta_monitors_config,
G_TYPE_OBJECT)
static void
meta_crtc_info_free (MetaCrtcInfo *info);
static void
meta_output_info_free (MetaOutputInfo *info);
MetaMonitorConfigManager *
meta_monitor_config_manager_new (MetaMonitorManager *monitor_manager)
{
@@ -364,12 +355,10 @@ create_key_for_current_state (MetaMonitorManager *monitor_manager)
MetaMonitorsConfig *
meta_monitor_config_manager_get_stored (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
MetaMonitorsConfigKey *config_key;
MetaMonitorsConfig *config;
GError *error = NULL;
config_key = create_key_for_current_state (monitor_manager);
config_key = create_key_for_current_state (config_manager->monitor_manager);
if (!config_key)
return NULL;
@@ -377,22 +366,6 @@ meta_monitor_config_manager_get_stored (MetaMonitorConfigManager *config_manager
config_key);
meta_monitors_config_key_free (config_key);
if (!config)
return NULL;
if (config->flags & META_MONITORS_CONFIG_FLAG_MIGRATED)
{
if (!meta_finish_monitors_config_migration (monitor_manager, config,
&error))
{
g_warning ("Failed to finish monitors config migration: %s",
error->message);
g_error_free (error);
meta_monitor_config_store_remove (config_manager->config_store, config);
return NULL;
}
}
return config;
}
@@ -510,26 +483,19 @@ create_preferred_logical_monitor_config (MetaMonitorManager *monitor_ma
MetaMonitor *monitor,
int x,
int y,
MetaLogicalMonitorConfig *primary_logical_monitor_config,
MetaLogicalMonitorLayoutMode layout_mode)
{
MetaMonitorMode *mode;
int width, height;
float scale;
int scale;
MetaMonitorConfig *monitor_config;
MetaLogicalMonitorConfig *logical_monitor_config;
mode = meta_monitor_get_preferred_mode (monitor);
meta_monitor_mode_get_resolution (mode, &width, &height);
if ((meta_monitor_manager_get_capabilities (monitor_manager) &
META_MONITOR_MANAGER_CAPABILITY_GLOBAL_SCALE_REQUIRED) &&
primary_logical_monitor_config)
scale = primary_logical_monitor_config->scale;
else
scale = meta_monitor_manager_calculate_monitor_mode_scale (monitor_manager,
monitor,
mode);
scale = meta_monitor_manager_calculate_monitor_mode_scale (monitor_manager,
monitor,
mode);
switch (layout_mode)
{
@@ -580,7 +546,6 @@ meta_monitor_config_manager_create_linear (MetaMonitorConfigManager *config_mana
create_preferred_logical_monitor_config (monitor_manager,
primary_monitor,
0, 0,
NULL,
layout_mode);
primary_logical_monitor_config->is_primary = TRUE;
logical_monitor_configs = g_list_append (NULL,
@@ -604,7 +569,6 @@ meta_monitor_config_manager_create_linear (MetaMonitorConfigManager *config_mana
create_preferred_logical_monitor_config (monitor_manager,
monitor,
x, 0,
primary_logical_monitor_config,
layout_mode);
logical_monitor_configs = g_list_append (logical_monitor_configs,
logical_monitor_config);
@@ -612,8 +576,7 @@ meta_monitor_config_manager_create_linear (MetaMonitorConfigManager *config_mana
x += logical_monitor_config->layout.width;
}
return meta_monitors_config_new (logical_monitor_configs, layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
return meta_monitors_config_new (logical_monitor_configs, layout_mode);
}
MetaMonitorsConfig *
@@ -635,14 +598,12 @@ meta_monitor_config_manager_create_fallback (MetaMonitorConfigManager *config_ma
create_preferred_logical_monitor_config (monitor_manager,
primary_monitor,
0, 0,
NULL,
layout_mode);
primary_logical_monitor_config->is_primary = TRUE;
logical_monitor_configs = g_list_append (NULL,
primary_logical_monitor_config);
return meta_monitors_config_new (logical_monitor_configs, layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
return meta_monitors_config_new (logical_monitor_configs, layout_mode);
}
MetaMonitorsConfig *
@@ -654,7 +615,6 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
MetaLogicalMonitorLayoutMode layout_mode;
GList *logical_monitor_configs;
GList *region;
int x, y;
GList *monitors;
GList *l;
@@ -662,30 +622,16 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
if (!primary_monitor)
return NULL;
if (!meta_monitor_get_suggested_position (primary_monitor, &x, &y))
return NULL;
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
primary_logical_monitor_config =
create_preferred_logical_monitor_config (monitor_manager,
primary_monitor,
x, y,
NULL,
layout_mode);
primary_logical_monitor_config->is_primary = TRUE;
logical_monitor_configs = g_list_append (NULL,
primary_logical_monitor_config);
region = g_list_prepend (NULL, &primary_logical_monitor_config->layout);
logical_monitor_configs = NULL;
region = NULL;
monitors = meta_monitor_manager_get_monitors (monitor_manager);
for (l = monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
MetaLogicalMonitorConfig *logical_monitor_config;
if (monitor == primary_monitor)
continue;
int x, y;
if (!meta_monitor_get_suggested_position (monitor, &x, &y))
continue;
@@ -694,7 +640,6 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
create_preferred_logical_monitor_config (monitor_manager,
monitor,
x, y,
primary_logical_monitor_config,
layout_mode);
logical_monitor_configs = g_list_append (logical_monitor_configs,
logical_monitor_config);
@@ -710,6 +655,9 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
}
region = g_list_prepend (region, &logical_monitor_config->layout);
if (monitor == primary_monitor)
primary_logical_monitor_config = logical_monitor_config;
}
g_list_free (region);
@@ -717,288 +665,21 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
if (!logical_monitor_configs)
return NULL;
return meta_monitors_config_new (logical_monitor_configs, layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
if (!primary_logical_monitor_config)
primary_logical_monitor_config =
g_list_first (logical_monitor_configs)->data;
static MetaMonitorsConfig *
create_for_builtin_display_rotation (MetaMonitorConfigManager *config_manager,
gboolean rotate,
MetaMonitorTransform transform)
{
MetaLogicalMonitorConfig *logical_monitor_config;
MetaLogicalMonitorConfig *current_logical_monitor_config;
MetaMonitorConfig *monitor_config;
MetaMonitorConfig *current_monitor_config;
if (!meta_monitor_manager_get_is_builtin_display_on (config_manager->monitor_manager))
return NULL;
if (!config_manager->current_config)
return NULL;
if (g_list_length (config_manager->current_config->logical_monitor_configs) != 1)
return NULL;
current_logical_monitor_config = config_manager->current_config->logical_monitor_configs->data;
if (rotate)
transform = (current_logical_monitor_config->transform + 1) % META_MONITOR_TRANSFORM_FLIPPED;
if (current_logical_monitor_config->transform == transform)
return NULL;
if (g_list_length (current_logical_monitor_config->monitor_configs) != 1)
return NULL;
current_monitor_config = current_logical_monitor_config->monitor_configs->data;
monitor_config = g_new0 (MetaMonitorConfig, 1);
*monitor_config = (MetaMonitorConfig) {
.monitor_spec = meta_monitor_spec_clone (current_monitor_config->monitor_spec),
.mode_spec = g_memdup (current_monitor_config->mode_spec, sizeof (MetaMonitorModeSpec)),
.enable_underscanning = current_monitor_config->enable_underscanning
};
logical_monitor_config = g_memdup (current_logical_monitor_config, sizeof (MetaLogicalMonitorConfig));
logical_monitor_config->monitor_configs = g_list_append (NULL, monitor_config);
logical_monitor_config->transform = transform;
return meta_monitors_config_new (g_list_append (NULL, logical_monitor_config),
config_manager->current_config->layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
MetaMonitorsConfig *
meta_monitor_config_manager_create_for_orientation (MetaMonitorConfigManager *config_manager,
MetaMonitorTransform transform)
{
return create_for_builtin_display_rotation (config_manager, FALSE, transform);
}
MetaMonitorsConfig *
meta_monitor_config_manager_create_for_rotate_monitor (MetaMonitorConfigManager *config_manager)
{
return create_for_builtin_display_rotation (config_manager, TRUE, META_MONITOR_TRANSFORM_NORMAL);
}
static MetaMonitorsConfig *
create_for_switch_config_all_mirror (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
MetaLogicalMonitorLayoutMode layout_mode;
MetaLogicalMonitorConfig *logical_monitor_config = NULL;
GList *monitor_configs = NULL;
gint common_mode_w = 0, common_mode_h = 0;
float best_scale = 1.0;
MetaMonitor *monitor;
GList *modes;
GList *monitors;
GList *l;
monitors = meta_monitor_manager_get_monitors (monitor_manager);
monitor = monitors->data;
modes = meta_monitor_get_modes (monitor);
for (l = modes; l; l = l->next)
{
MetaMonitorMode *mode = l->data;
gboolean common_mode_size = TRUE;
gint mode_w, mode_h;
GList *ll;
meta_monitor_mode_get_resolution (mode, &mode_w, &mode_h);
for (ll = monitors->next; ll; ll = ll->next)
{
MetaMonitor *monitor_b = ll->data;
gboolean have_same_mode_size = FALSE;
GList *mm;
for (mm = meta_monitor_get_modes (monitor_b); mm; mm = mm->next)
{
MetaMonitorMode *mode_b = mm->data;
gint mode_b_w, mode_b_h;
meta_monitor_mode_get_resolution (mode_b, &mode_b_w, &mode_b_h);
if (mode_w == mode_b_w &&
mode_h == mode_b_h)
{
have_same_mode_size = TRUE;
break;
}
}
if (!have_same_mode_size)
{
common_mode_size = FALSE;
break;
}
}
if (common_mode_size &&
common_mode_w * common_mode_h < mode_w * mode_h)
{
common_mode_w = mode_w;
common_mode_h = mode_h;
}
}
if (common_mode_w == 0 || common_mode_h == 0)
return NULL;
for (l = monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
MetaMonitorMode *mode = NULL;
GList *ll;
float scale;
for (ll = meta_monitor_get_modes (monitor); ll; ll = ll->next)
{
gint mode_w, mode_h;
mode = ll->data;
meta_monitor_mode_get_resolution (mode, &mode_w, &mode_h);
if (mode_w == common_mode_w && mode_h == common_mode_h)
break;
}
if (!mode)
continue;
scale = meta_monitor_manager_calculate_monitor_mode_scale (monitor_manager, monitor, mode);
best_scale = MAX (best_scale, scale);
monitor_configs = g_list_prepend (monitor_configs, create_monitor_config (monitor, mode));
}
logical_monitor_config = g_new0 (MetaLogicalMonitorConfig, 1);
*logical_monitor_config = (MetaLogicalMonitorConfig) {
.layout = (MetaRectangle) {
.x = 0,
.y = 0,
.width = common_mode_w,
.height = common_mode_h
},
.scale = best_scale,
.monitor_configs = monitor_configs
};
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
return meta_monitors_config_new (g_list_append (NULL, logical_monitor_config),
layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
static MetaMonitorsConfig *
create_for_switch_config_external (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
GList *logical_monitor_configs = NULL;
int x = 0;
MetaLogicalMonitorLayoutMode layout_mode;
GList *monitors;
GList *l;
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
monitors = meta_monitor_manager_get_monitors (monitor_manager);
for (l = monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
MetaLogicalMonitorConfig *logical_monitor_config;
if (meta_monitor_is_laptop_panel (monitor))
continue;
logical_monitor_config =
create_preferred_logical_monitor_config (monitor_manager,
monitor,
x, 0,
NULL,
layout_mode);
logical_monitor_configs = g_list_append (logical_monitor_configs,
logical_monitor_config);
if (x == 0)
logical_monitor_config->is_primary = TRUE;
x += logical_monitor_config->layout.width;
}
return meta_monitors_config_new (logical_monitor_configs, layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
static MetaMonitorsConfig *
create_for_switch_config_builtin (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
MetaLogicalMonitorLayoutMode layout_mode;
GList *logical_monitor_configs;
MetaLogicalMonitorConfig *primary_logical_monitor_config;
MetaMonitor *monitor;
monitor = meta_monitor_manager_get_laptop_panel (monitor_manager);
if (!monitor)
return NULL;
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
primary_logical_monitor_config =
create_preferred_logical_monitor_config (monitor_manager,
monitor,
0, 0,
NULL,
layout_mode);
primary_logical_monitor_config->is_primary = TRUE;
logical_monitor_configs = g_list_append (NULL,
primary_logical_monitor_config);
return meta_monitors_config_new (logical_monitor_configs, layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
MetaMonitorsConfig *
meta_monitor_config_manager_create_for_switch_config (MetaMonitorConfigManager *config_manager,
MetaMonitorSwitchConfigType config_type)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
if (!meta_monitor_manager_can_switch_config (monitor_manager))
return NULL;
switch (config_type)
{
case META_MONITOR_SWITCH_CONFIG_ALL_MIRROR:
return create_for_switch_config_all_mirror (config_manager);
case META_MONITOR_SWITCH_CONFIG_ALL_LINEAR:
return meta_monitor_config_manager_create_linear (config_manager);
case META_MONITOR_SWITCH_CONFIG_EXTERNAL:
return create_for_switch_config_external (config_manager);
case META_MONITOR_SWITCH_CONFIG_BUILTIN:
return create_for_switch_config_builtin (config_manager);
case META_MONITOR_SWITCH_CONFIG_UNKNOWN:
g_warn_if_reached ();
break;
}
return NULL;
return meta_monitors_config_new (logical_monitor_configs, layout_mode);
}
void
meta_monitor_config_manager_set_current (MetaMonitorConfigManager *config_manager,
MetaMonitorsConfig *config)
{
if (config_manager->current_config)
{
g_queue_push_head (&config_manager->config_history,
g_object_ref (config_manager->current_config));
if (g_queue_get_length (&config_manager->config_history) >
CONFIG_HISTORY_MAX_SIZE)
g_object_unref (g_queue_pop_tail (&config_manager->config_history));
}
g_set_object (&config_manager->previous_config,
config_manager->current_config);
g_set_object (&config_manager->current_config, config);
}
@@ -1017,23 +698,10 @@ meta_monitor_config_manager_get_current (MetaMonitorConfigManager *config_manage
return config_manager->current_config;
}
MetaMonitorsConfig *
meta_monitor_config_manager_pop_previous (MetaMonitorConfigManager *config_manager)
{
return g_queue_pop_head (&config_manager->config_history);
}
MetaMonitorsConfig *
meta_monitor_config_manager_get_previous (MetaMonitorConfigManager *config_manager)
{
return g_queue_peek_head (&config_manager->config_history);
}
void
meta_monitor_config_manager_clear_history (MetaMonitorConfigManager *config_manager)
{
g_queue_foreach (&config_manager->config_history, (GFunc) g_object_unref, NULL);
g_queue_clear (&config_manager->config_history);
return config_manager->previous_config;
}
static void
@@ -1043,7 +711,7 @@ meta_monitor_config_manager_dispose (GObject *object)
META_MONITOR_CONFIG_MANAGER (object);
g_clear_object (&config_manager->current_config);
meta_monitor_config_manager_clear_history (config_manager);
g_clear_object (&config_manager->previous_config);
G_OBJECT_CLASS (meta_monitor_config_manager_parent_class)->dispose (object);
}
@@ -1051,7 +719,6 @@ meta_monitor_config_manager_dispose (GObject *object)
static void
meta_monitor_config_manager_init (MetaMonitorConfigManager *config_manager)
{
g_queue_init (&config_manager->config_history);
}
static void
@@ -1168,8 +835,7 @@ meta_monitors_config_key_equal (gconstpointer data_a,
MetaMonitorsConfig *
meta_monitors_config_new (GList *logical_monitor_configs,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitorsConfigFlag flags)
MetaLogicalMonitorLayoutMode layout_mode)
{
MetaMonitorsConfig *config;
@@ -1177,7 +843,6 @@ meta_monitors_config_new (GList *logical_monitor_configs,
config->logical_monitor_configs = logical_monitor_configs;
config->key = meta_monitors_config_key_new (logical_monitor_configs);
config->layout_mode = layout_mode;
config->flags = flags;
return config;
}
@@ -1205,19 +870,6 @@ meta_monitors_config_class_init (MetaMonitorsConfigClass *klass)
object_class->finalize = meta_monitors_config_finalize;
}
static void
meta_crtc_info_free (MetaCrtcInfo *info)
{
g_ptr_array_free (info->outputs, TRUE);
g_slice_free (MetaCrtcInfo, info);
}
static void
meta_output_info_free (MetaOutputInfo *info)
{
g_slice_free (MetaOutputInfo, info);
}
gboolean
meta_verify_monitor_mode_spec (MetaMonitorModeSpec *monitor_mode_spec,
GError **error)
@@ -1274,13 +926,20 @@ meta_verify_monitor_config (MetaMonitorConfig *monitor_config,
gboolean
meta_verify_logical_monitor_config (MetaLogicalMonitorConfig *logical_monitor_config,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitorManager *monitor_manager,
GError **error)
{
GList *l;
int expected_mode_width = 0;
int expected_mode_height = 0;
if (logical_monitor_config->scale < 1)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Invalid logical monitor config scale %d",
logical_monitor_config->scale);
return FALSE;
}
if (logical_monitor_config->layout.x < 0 ||
logical_monitor_config->layout.y < 0)
{
@@ -1312,10 +971,8 @@ meta_verify_logical_monitor_config (MetaLogicalMonitorConfig *logical_monitor
switch (layout_mode)
{
case META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL:
expected_mode_width = roundf (expected_mode_width *
logical_monitor_config->scale);
expected_mode_height = roundf (expected_mode_height *
logical_monitor_config->scale);
expected_mode_width *= logical_monitor_config->scale;
expected_mode_height *= logical_monitor_config->scale;
break;
case META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL:
break;
@@ -1367,14 +1024,12 @@ has_adjecent_neighbour (MetaMonitorsConfig *config,
gboolean
meta_verify_monitors_config (MetaMonitorsConfig *config,
MetaMonitorManager *monitor_manager,
GError **error)
{
int min_x, min_y;
gboolean has_primary;
GList *region;
GList *l;
gboolean global_scale_required;
if (!config->logical_monitor_configs)
{
@@ -1383,10 +1038,6 @@ meta_verify_monitors_config (MetaMonitorsConfig *config,
return FALSE;
}
global_scale_required =
!!(meta_monitor_manager_get_capabilities (monitor_manager) &
META_MONITOR_MANAGER_CAPABILITY_GLOBAL_SCALE_REQUIRED);
min_x = INT_MAX;
min_y = INT_MAX;
region = NULL;
@@ -1395,21 +1046,6 @@ meta_verify_monitors_config (MetaMonitorsConfig *config,
{
MetaLogicalMonitorConfig *logical_monitor_config = l->data;
if (global_scale_required)
{
MetaLogicalMonitorConfig *prev_logical_monitor_config =
l->prev ? l->prev->data : NULL;
if (prev_logical_monitor_config &&
(prev_logical_monitor_config->scale !=
logical_monitor_config->scale))
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Logical monitor scales must be identical");
return FALSE;
}
}
if (meta_rectangle_overlaps_with_region (region,
&logical_monitor_config->layout))
{

View File

@@ -41,7 +41,7 @@ typedef struct _MetaLogicalMonitorConfig
MetaRectangle layout;
GList *monitor_configs;
MetaMonitorTransform transform;
float scale;
int scale;
gboolean is_primary;
gboolean is_presentation;
} MetaLogicalMonitorConfig;
@@ -51,12 +51,6 @@ typedef struct _MetaMonitorsConfigKey
GList *monitor_specs;
} MetaMonitorsConfigKey;
typedef enum _MetaMonitorsConfigFlag
{
META_MONITORS_CONFIG_FLAG_NONE = 0,
META_MONITORS_CONFIG_FLAG_MIGRATED = (1 << 0),
} MetaMonitorsConfigFlag;
struct _MetaMonitorsConfig
{
GObject parent;
@@ -64,8 +58,6 @@ struct _MetaMonitorsConfig
MetaMonitorsConfigKey *key;
GList *logical_monitor_configs;
MetaMonitorsConfigFlag flags;
MetaLogicalMonitorLayoutMode layout_mode;
};
@@ -91,30 +83,17 @@ MetaMonitorsConfig * meta_monitor_config_manager_create_fallback (MetaMonitorCon
MetaMonitorsConfig * meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_create_for_orientation (MetaMonitorConfigManager *config_manager,
MetaMonitorTransform transform);
MetaMonitorsConfig * meta_monitor_config_manager_create_for_rotate_monitor (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_create_for_switch_config (MetaMonitorConfigManager *config_manager,
MetaMonitorSwitchConfigType config_type);
void meta_monitor_config_manager_set_current (MetaMonitorConfigManager *config_manager,
MetaMonitorsConfig *config);
MetaMonitorsConfig * meta_monitor_config_manager_get_current (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_pop_previous (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_get_previous (MetaMonitorConfigManager *config_manager);
void meta_monitor_config_manager_clear_history (MetaMonitorConfigManager *config_manager);
void meta_monitor_config_manager_save_current (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitors_config_new (GList *logical_monitor_configs,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitorsConfigFlag flags);
MetaLogicalMonitorLayoutMode layout_mode);
unsigned int meta_monitors_config_key_hash (gconstpointer config_key);
@@ -138,11 +117,9 @@ gboolean meta_verify_monitor_config (MetaMonitorConfig *monitor_config,
gboolean meta_verify_logical_monitor_config (MetaLogicalMonitorConfig *logical_monitor_config,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitorManager *monitor_manager,
GError **error);
gboolean meta_verify_monitors_config (MetaMonitorsConfig *config,
MetaMonitorManager *monitor_manager,
GError **error);
#endif /* META_MONITOR_CONFIG_MANAGER_H */

File diff suppressed because it is too large Load Diff

View File

@@ -1,38 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2017 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_MONITOR_CONFIG_MIGRATION_H
#define META_MONITOR_CONFIG_MIGRATION_H
#include "backends/meta-monitor-manager-private.h"
gboolean meta_migrate_old_monitors_config (MetaMonitorConfigStore *config_store,
GFile *in_file,
GError **error);
gboolean meta_migrate_old_user_monitors_config (MetaMonitorConfigStore *config_store,
GError **error);
gboolean meta_finish_monitors_config_migration (MetaMonitorManager *monitor_manager,
MetaMonitorsConfig *config,
GError **error);
#endif /* META_MONITOR_CONFIG_MIGRATION_H */

View File

@@ -27,7 +27,6 @@
#include <string.h>
#include "backends/meta-monitor-config-manager.h"
#include "backends/meta-monitor-config-migration.h"
#define MONITORS_CONFIG_XML_FORMAT_VERSION 2
@@ -54,7 +53,6 @@
* <width>1920</width>
* <height>1080</height>
* <rate>60.049972534179688</rate>
* <flag>interlace</flag>
* </mode>
* </monitor>
* <transform>
@@ -110,27 +108,14 @@ struct _MetaMonitorConfigStore
GCancellable *save_cancellable;
GFile *user_file;
GFile *custom_read_file;
GFile *custom_write_file;
GFile *custom_file;
};
#define META_MONITOR_CONFIG_STORE_ERROR (meta_monitor_config_store_error_quark ())
static GQuark meta_monitor_config_store_error_quark (void);
enum
{
META_MONITOR_CONFIG_STORE_ERROR_NEEDS_MIGRATION
};
G_DEFINE_QUARK (meta-monitor-config-store-error-quark,
meta_monitor_config_store_error)
typedef enum
{
STATE_INITIAL,
STATE_MONITORS,
STATE_CONFIGURATION,
STATE_MIGRATED,
STATE_LOGICAL_MONITOR,
STATE_LOGICAL_MONITOR_X,
STATE_LOGICAL_MONITOR_Y,
@@ -150,7 +135,6 @@ typedef enum
STATE_MONITOR_MODE_WIDTH,
STATE_MONITOR_MODE_HEIGHT,
STATE_MONITOR_MODE_RATE,
STATE_MONITOR_MODE_FLAG,
STATE_MONITOR_UNDERSCANNING
} ParserState;
@@ -159,7 +143,6 @@ typedef struct
ParserState state;
MetaMonitorConfigStore *config_store;
gboolean current_was_migrated;
GList *current_logical_monitor_configs;
MetaMonitorSpec *current_monitor_spec;
gboolean current_transform_flipped;
@@ -204,14 +187,7 @@ handle_start_element (GMarkupParseContext *context,
"Missing config file format version");
}
if (g_str_equal (version, "1"))
{
g_set_error_literal (error,
META_MONITOR_CONFIG_STORE_ERROR,
META_MONITOR_CONFIG_STORE_ERROR_NEEDS_MIGRATION,
"monitors.xml has the old format");
return;
}
/* TODO: Handle converting version 1 configuration files. */
if (!g_str_equal (version, QUOTE (MONITORS_CONFIG_XML_FORMAT_VERSION)))
{
@@ -234,40 +210,22 @@ handle_start_element (GMarkupParseContext *context,
}
parser->state = STATE_CONFIGURATION;
parser->current_was_migrated = FALSE;
return;
}
case STATE_CONFIGURATION:
{
if (g_str_equal (element_name, "logicalmonitor"))
{
parser->current_logical_monitor_config =
g_new0 (MetaLogicalMonitorConfig, 1);
parser->state = STATE_LOGICAL_MONITOR;
}
else if (g_str_equal (element_name, "migrated"))
{
parser->current_was_migrated = TRUE;
parser->state = STATE_MIGRATED;
}
else
if (!g_str_equal (element_name, "logicalmonitor"))
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid configuration element '%s'", element_name);
return;
}
return;
}
parser->current_logical_monitor_config =
g_new0 (MetaLogicalMonitorConfig, 1);
case STATE_MIGRATED:
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Unexpected element '%s'", element_name);
parser->state = STATE_LOGICAL_MONITOR;
return;
}
@@ -426,10 +384,6 @@ handle_start_element (GMarkupParseContext *context,
{
parser->state = STATE_MONITOR_MODE_RATE;
}
else if (g_str_equal (element_name, "flag"))
{
parser->state = STATE_MONITOR_MODE_FLAG;
}
else
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
@@ -443,7 +397,6 @@ handle_start_element (GMarkupParseContext *context,
case STATE_MONITOR_MODE_WIDTH:
case STATE_MONITOR_MODE_HEIGHT:
case STATE_MONITOR_MODE_RATE:
case STATE_MONITOR_MODE_FLAG:
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid mode sub element '%s'", element_name);
@@ -500,8 +453,8 @@ derive_logical_monitor_layout (MetaLogicalMonitorConfig *logical_monitor_conf
switch (layout_mode)
{
case META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL:
width = roundf (width / logical_monitor_config->scale);
height = roundf (height / logical_monitor_config->scale);
width /= logical_monitor_config->scale;
height /= logical_monitor_config->scale;
break;
case META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL:
break;
@@ -586,7 +539,6 @@ handle_end_element (GMarkupParseContext *context,
case STATE_MONITOR_MODE_WIDTH:
case STATE_MONITOR_MODE_HEIGHT:
case STATE_MONITOR_MODE_RATE:
case STATE_MONITOR_MODE_FLAG:
{
parser->state = STATE_MONITOR_MODE;
return;
@@ -643,9 +595,7 @@ handle_end_element (GMarkupParseContext *context,
g_assert (g_str_equal (element_name, "logicalmonitor"));
if (parser->current_was_migrated)
logical_monitor_config->scale = -1;
else if (logical_monitor_config->scale == 0)
if (logical_monitor_config->scale == 0)
logical_monitor_config->scale = 1;
parser->current_logical_monitor_configs =
@@ -657,29 +607,17 @@ handle_end_element (GMarkupParseContext *context,
return;
}
case STATE_MIGRATED:
{
g_assert (g_str_equal (element_name, "migrated"));
parser->state = STATE_CONFIGURATION;
return;
}
case STATE_CONFIGURATION:
{
MetaMonitorConfigStore *store = parser->config_store;
MetaMonitorsConfig *config;
GList *l;
MetaLogicalMonitorLayoutMode layout_mode;
MetaMonitorsConfigFlag config_flags = META_MONITORS_CONFIG_FLAG_NONE;
g_assert (g_str_equal (element_name, "configuration"));
if (parser->current_was_migrated)
layout_mode = META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL;
else
layout_mode =
meta_monitor_manager_get_default_layout_mode (store->monitor_manager);
layout_mode =
meta_monitor_manager_get_default_layout_mode (store->monitor_manager);
for (l = parser->current_logical_monitor_configs; l; l = l->next)
{
@@ -692,23 +630,17 @@ handle_end_element (GMarkupParseContext *context,
if (!meta_verify_logical_monitor_config (logical_monitor_config,
layout_mode,
store->monitor_manager,
error))
return;
}
if (parser->current_was_migrated)
config_flags |= META_MONITORS_CONFIG_FLAG_MIGRATED;
config =
meta_monitors_config_new (parser->current_logical_monitor_configs,
layout_mode,
config_flags);
layout_mode);
parser->current_logical_monitor_configs = NULL;
if (!meta_verify_monitors_config (config, store->monitor_manager,
error))
if (!meta_verify_monitors_config (config, error))
{
g_object_unref (config);
return;
@@ -843,7 +775,6 @@ handle_text (GMarkupParseContext *context,
case STATE_INITIAL:
case STATE_MONITORS:
case STATE_CONFIGURATION:
case STATE_MIGRATED:
case STATE_LOGICAL_MONITOR:
case STATE_MONITOR:
case STATE_MONITOR_SPEC:
@@ -896,14 +827,14 @@ handle_text (GMarkupParseContext *context,
case STATE_LOGICAL_MONITOR_SCALE:
{
if (!read_float (text, text_len,
&parser->current_logical_monitor_config->scale, error))
if (!read_int (text, text_len,
&parser->current_logical_monitor_config->scale, error))
return;
if (parser->current_logical_monitor_config->scale <= 0.0)
if (parser->current_logical_monitor_config->scale <= 0)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Logical monitor scale '%g' invalid",
"Logical monitor scale '%d' invalid",
parser->current_logical_monitor_config->scale);
return;
}
@@ -976,22 +907,6 @@ handle_text (GMarkupParseContext *context,
return;
}
case STATE_MONITOR_MODE_FLAG:
{
if (strncmp (text, "interlace", text_len) == 0)
{
parser->current_monitor_mode_spec->flags |=
META_CRTC_MODE_FLAG_INTERLACE;
}
else
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"Invalid mode flag %.*s", (int) text_len, text);
}
return;
}
case STATE_MONITOR_UNDERSCANNING:
{
read_bool (text, text_len,
@@ -1090,8 +1005,6 @@ append_monitors (GString *buffer,
monitor_config->mode_spec->height);
g_string_append_printf (buffer, " <rate>%s</rate>\n",
rate_str);
if (monitor_config->mode_spec->flags & META_CRTC_MODE_FLAG_INTERLACE)
g_string_append_printf (buffer, " <flag>interlace</flag>\n");
g_string_append (buffer, " </mode>\n");
if (monitor_config->enable_underscanning)
g_string_append (buffer, " <underscanning>yes</underscanning>\n");
@@ -1153,21 +1066,15 @@ append_transform (GString *buffer,
static void
append_logical_monitor_xml (GString *buffer,
MetaMonitorsConfig *config,
MetaLogicalMonitorConfig *logical_monitor_config)
{
char scale_str[G_ASCII_DTOSTR_BUF_SIZE];
g_string_append (buffer, " <logicalmonitor>\n");
g_string_append_printf (buffer, " <x>%d</x>\n",
logical_monitor_config->layout.x);
g_string_append_printf (buffer, " <y>%d</y>\n",
logical_monitor_config->layout.y);
g_ascii_dtostr (scale_str, G_ASCII_DTOSTR_BUF_SIZE,
logical_monitor_config->scale);
if ((config->flags & META_MONITORS_CONFIG_FLAG_MIGRATED) == 0)
g_string_append_printf (buffer, " <scale>%s</scale>\n",
scale_str);
g_string_append_printf (buffer, " <scale>%d</scale>\n",
logical_monitor_config->scale);
if (logical_monitor_config->is_primary)
g_string_append (buffer, " <primary>yes</primary>\n");
if (logical_monitor_config->is_presentation)
@@ -1195,14 +1102,11 @@ generate_config_xml (MetaMonitorConfigStore *config_store)
g_string_append (buffer, " <configuration>\n");
if (config->flags & META_MONITORS_CONFIG_FLAG_MIGRATED)
g_string_append (buffer, " <migrated/>\n");
for (l = config->logical_monitor_configs; l; l = l->next)
{
MetaLogicalMonitorConfig *logical_monitor_config = l->data;
append_logical_monitor_xml (buffer, config, logical_monitor_config);
append_logical_monitor_xml (buffer, logical_monitor_config);
}
g_string_append (buffer, " </configuration>\n");
@@ -1268,31 +1172,6 @@ meta_monitor_config_store_save (MetaMonitorConfigStore *config_store)
.buffer = buffer
};
/*
* Custom write file is only ever used by the test suite, and the test suite
* will want to have be able to read back the content immediately, so for
* custom write files, do the content replacement synchronously.
*/
if (config_store->custom_write_file)
{
GError *error = NULL;
if (!g_file_replace_contents (config_store->custom_write_file,
buffer->str, buffer->len,
NULL,
FALSE,
G_FILE_CREATE_REPLACE_DESTINATION,
NULL,
NULL,
&error))
{
g_warning ("Saving monitor configuration failed: %s\n",
error->message);
g_error_free (error);
}
return;
}
g_file_replace_contents_async (config_store->user_file,
buffer->str, buffer->len,
NULL,
@@ -1302,18 +1181,6 @@ meta_monitor_config_store_save (MetaMonitorConfigStore *config_store)
saved_cb, data);
}
static void
maybe_save_configs (MetaMonitorConfigStore *config_store)
{
/*
* If a custom file is used, it means we are run by the test suite. When this
* is done, avoid replacing the user configuration file with test data,
* except if a custom write file is set as well.
*/
if (!config_store->custom_read_file || config_store->custom_write_file)
meta_monitor_config_store_save (config_store);
}
void
meta_monitor_config_store_add (MetaMonitorConfigStore *config_store,
MetaMonitorsConfig *config)
@@ -1321,33 +1188,21 @@ meta_monitor_config_store_add (MetaMonitorConfigStore *config_store,
g_hash_table_replace (config_store->configs,
config->key, g_object_ref (config));
maybe_save_configs (config_store);
}
void
meta_monitor_config_store_remove (MetaMonitorConfigStore *config_store,
MetaMonitorsConfig *config)
{
g_hash_table_remove (config_store->configs, config->key);
maybe_save_configs (config_store);
if (!config_store->custom_file)
meta_monitor_config_store_save (config_store);
}
gboolean
meta_monitor_config_store_set_custom (MetaMonitorConfigStore *config_store,
const char *read_path,
const char *write_path,
const char *path,
GError **error)
{
g_clear_object (&config_store->custom_read_file);
g_clear_object (&config_store->custom_write_file);
g_clear_object (&config_store->custom_file);
g_hash_table_remove_all (config_store->configs);
config_store->custom_read_file = g_file_new_for_path (read_path);
if (write_path)
config_store->custom_write_file = g_file_new_for_path (write_path);
config_store->custom_file = g_file_new_for_path (path);
return read_config_file (config_store, config_store->custom_read_file, error);
return read_config_file (config_store, config_store->custom_file, error);
}
int
@@ -1356,12 +1211,6 @@ meta_monitor_config_store_get_config_count (MetaMonitorConfigStore *config_store
return (int) g_hash_table_size (config_store->configs);
}
MetaMonitorManager *
meta_monitor_config_store_get_monitor_manager (MetaMonitorConfigStore *config_store)
{
return config_store->monitor_manager;
}
MetaMonitorConfigStore *
meta_monitor_config_store_new (MetaMonitorManager *monitor_manager)
{
@@ -1378,7 +1227,7 @@ meta_monitor_config_store_constructed (GObject *object)
GError *error = NULL;
user_file_path = g_build_filename (g_get_user_config_dir (),
"monitors.xml",
"monitors-experimental.xml",
NULL);
config_store->user_file = g_file_new_for_path (user_file_path);
@@ -1386,23 +1235,9 @@ meta_monitor_config_store_constructed (GObject *object)
{
if (!read_config_file (config_store, config_store->user_file, &error))
{
if (error->domain == META_MONITOR_CONFIG_STORE_ERROR &&
error->code == META_MONITOR_CONFIG_STORE_ERROR_NEEDS_MIGRATION)
{
g_clear_error (&error);
if (!meta_migrate_old_user_monitors_config (config_store, &error))
{
g_warning ("Failed to migrate old monitors config file: %s",
error->message);
g_error_free (error);
}
}
else
{
g_warning ("Failed to read monitors config file '%s': %s",
user_file_path, error->message);
g_error_free (error);
}
g_warning ("Failed to read monitors config file '%s': %s",
user_file_path, error->message);
g_error_free (error);
}
}
@@ -1417,8 +1252,7 @@ meta_monitor_config_store_dispose (GObject *object)
g_clear_pointer (&config_store->configs, g_hash_table_destroy);
g_clear_object (&config_store->user_file);
g_clear_object (&config_store->custom_read_file);
g_clear_object (&config_store->custom_write_file);
g_clear_object (&config_store->custom_file);
G_OBJECT_CLASS (meta_monitor_config_store_parent_class)->dispose (object);
}

View File

@@ -38,16 +38,10 @@ MetaMonitorsConfig * meta_monitor_config_store_lookup (MetaMonitorConfigStore *c
void meta_monitor_config_store_add (MetaMonitorConfigStore *config_store,
MetaMonitorsConfig *config);
void meta_monitor_config_store_remove (MetaMonitorConfigStore *config_store,
MetaMonitorsConfig *config);
gboolean meta_monitor_config_store_set_custom (MetaMonitorConfigStore *config_store,
const char *read_path,
const char *write_path,
const char *path,
GError **error);
int meta_monitor_config_store_get_config_count (MetaMonitorConfigStore *config_store);
MetaMonitorManager * meta_monitor_config_store_get_monitor_manager (MetaMonitorConfigStore *config_store);
#endif /* META_MONITOR_CONFIG_STORE_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,52 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2003 Rob Adams
* Copyright (C) 2004-2006 Elijah Newren
* Copyright (C) 2013 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef META_MONITOR_CONFIG_H
#define META_MONITOR_CONFIG_H
#include "meta-monitor-manager-private.h"
#define META_TYPE_MONITOR_CONFIG (meta_monitor_config_get_type ())
G_DECLARE_FINAL_TYPE (MetaMonitorConfig, meta_monitor_config,
META, MONITOR_CONFIG, GObject)
MetaMonitorConfig *meta_monitor_config_new (MetaMonitorManager *manager);
gboolean meta_monitor_config_apply_stored (MetaMonitorConfig *config,
MetaMonitorManager *manager);
void meta_monitor_config_make_default (MetaMonitorConfig *config,
MetaMonitorManager *manager);
void meta_monitor_config_update_current (MetaMonitorConfig *config,
MetaMonitorManager *manager);
void meta_monitor_config_make_persistent (MetaMonitorConfig *config);
void meta_monitor_config_restore_previous (MetaMonitorConfig *config,
MetaMonitorManager *manager);
gboolean meta_monitor_config_get_is_builtin_display_on (MetaMonitorConfig *config);
void meta_monitor_config_lid_is_closed_changed (MetaMonitorConfig *self,
MetaMonitorManager *manager);
#endif /* META_MONITOR_CONFIG_H */

View File

@@ -31,7 +31,6 @@
#include <meta/util.h>
#include "backends/meta-backend-private.h"
#include "backends/meta-monitor.h"
#include "backends/meta-monitor-config-manager.h"
#define ALL_TRANSFORMS ((1 << (META_MONITOR_TRANSFORM_FLIPPED_270 + 1)) - 1)
@@ -41,6 +40,11 @@
#define MAX_CRTCS (MAX_MONITORS * 2)
#define MAX_MODES (MAX_MONITORS * 4)
static float supported_scales_dummy[] = {
1.0,
2.0
};
struct _MetaMonitorManagerDummy
{
MetaMonitorManager parent_instance;
@@ -55,7 +59,7 @@ struct _MetaMonitorManagerDummyClass
typedef struct _MetaOutputDummy
{
float scale;
int scale;
} MetaOutputDummy;
G_DEFINE_TYPE (MetaMonitorManagerDummy, meta_monitor_manager_dummy, META_TYPE_MONITOR_MANAGER);
@@ -70,7 +74,7 @@ static void
append_monitor (GArray *modes,
GArray *crtcs,
GArray *outputs,
float scale)
int scale)
{
MetaCrtcMode modes_decl[] = {
{
@@ -242,7 +246,7 @@ static void
meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
{
unsigned int num_monitors = 1;
float *monitor_scales = NULL;
int *monitor_scales = NULL;
const char *num_monitors_str;
const char *monitor_scales_str;
const char *tiled_monitors_str;
@@ -294,9 +298,9 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
}
}
monitor_scales = g_newa (typeof (*monitor_scales), num_monitors);
monitor_scales = g_newa (int, num_monitors);
for (i = 0; i < num_monitors; i++)
monitor_scales[i] = 1.0;
monitor_scales[i] = 1;
monitor_scales_str = getenv ("MUTTER_DEBUG_DUMMY_MONITOR_SCALES");
if (monitor_scales_str)
@@ -309,9 +313,11 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
"of monitors (defaults to 1).\n");
for (i = 0; i < num_monitors && scales_str_list[i]; i++)
{
float scale = g_ascii_strtod (scales_str_list[i], NULL);
monitor_scales[i] = scale;
int scale = g_ascii_strtoll (scales_str_list[i], NULL, 10);
if (scale == 1 || scale == 2)
monitor_scales[i] = scale;
else
meta_warning ("Invalid dummy monitor scale");
}
g_strfreev (scales_str_list);
}
@@ -350,15 +356,10 @@ meta_monitor_manager_dummy_ensure_initial_config (MetaMonitorManager *manager)
config = meta_monitor_manager_ensure_configured (manager);
if (meta_is_stage_views_enabled ())
if (meta_is_monitor_config_manager_enabled ())
meta_monitor_manager_update_logical_state (manager, config);
else
{
MetaMonitorManagerDeriveFlag flags =
META_MONITOR_MANAGER_DERIVE_FLAG_NONE;
meta_monitor_manager_update_logical_state_derived (manager, flags);
}
meta_monitor_manager_update_logical_state_derived (manager);
}
static void
@@ -539,6 +540,38 @@ meta_monitor_manager_dummy_apply_monitors_config (MetaMonitorManager *manag
return TRUE;
}
static void
legacy_calculate_screen_size (MetaMonitorManager *manager)
{
unsigned int i;
int width = 0, height = 0;
for (i = 0; i < manager->n_crtcs; i++)
{
MetaCrtc *crtc = &manager->crtcs[i];
width = MAX (width, crtc->rect.x + crtc->rect.width);
height = MAX (height, crtc->rect.y + crtc->rect.height);
}
manager->screen_width = width;
manager->screen_height = height;
}
static void
meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs)
{
apply_crtc_assignments (manager, crtcs, n_crtcs, outputs, n_outputs);
legacy_calculate_screen_size (manager);
meta_monitor_manager_rebuild_derived (manager);
}
static gboolean
meta_monitor_manager_dummy_is_transform_handled (MetaMonitorManager *manager,
MetaCrtc *crtc,
@@ -549,7 +582,7 @@ meta_monitor_manager_dummy_is_transform_handled (MetaMonitorManager *manager,
return manager_dummy->is_transform_handled;
}
static float
static int
meta_monitor_manager_dummy_calculate_monitor_mode_scale (MetaMonitorManager *manager,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
@@ -563,53 +596,35 @@ meta_monitor_manager_dummy_calculate_monitor_mode_scale (MetaMonitorManager *man
return output_dummy->scale;
}
static float *
meta_monitor_manager_dummy_calculate_supported_scales (MetaMonitorManager *manager,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
int *n_supported_scales)
static void
meta_monitor_manager_dummy_get_supported_scales (MetaMonitorManager *manager,
float **scales,
int *n_scales)
{
MetaMonitorScalesConstraint constraints =
META_MONITOR_SCALES_CONSTRAINT_NONE;
switch (layout_mode)
{
case META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL:
break;
case META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL:
constraints |= META_MONITOR_SCALES_CONSTRAINT_NO_FRAC;
break;
}
return meta_monitor_calculate_supported_scales (monitor, monitor_mode,
constraints,
n_supported_scales);
*scales = supported_scales_dummy;
*n_scales = G_N_ELEMENTS (supported_scales_dummy);
}
static gboolean
is_monitor_framebuffers_scaled (void)
{
MetaBackend *backend = meta_get_backend ();
MetaSettings *settings = meta_backend_get_settings (backend);
return meta_settings_is_experimental_feature_enabled (
settings,
return meta_backend_is_experimental_feature_enabled (
backend,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER);
}
static MetaMonitorManagerCapability
meta_monitor_manager_dummy_get_capabilities (MetaMonitorManager *manager)
{
MetaBackend *backend = meta_get_backend ();
MetaSettings *settings = meta_backend_get_settings (backend);
MetaMonitorManagerCapability capabilities =
META_MONITOR_MANAGER_CAPABILITY_NONE;
capabilities |= META_MONITOR_MANAGER_CAPABILITY_MIRRORING;
if (meta_settings_is_experimental_feature_enabled (
settings,
if (meta_backend_is_experimental_feature_enabled (
meta_get_backend (),
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER))
capabilities |= META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE;
@@ -650,9 +665,10 @@ meta_monitor_manager_dummy_class_init (MetaMonitorManagerDummyClass *klass)
manager_class->read_current = meta_monitor_manager_dummy_read_current;
manager_class->ensure_initial_config = meta_monitor_manager_dummy_ensure_initial_config;
manager_class->apply_monitors_config = meta_monitor_manager_dummy_apply_monitors_config;
manager_class->apply_configuration = meta_monitor_manager_dummy_apply_config;
manager_class->is_transform_handled = meta_monitor_manager_dummy_is_transform_handled;
manager_class->calculate_monitor_mode_scale = meta_monitor_manager_dummy_calculate_monitor_mode_scale;
manager_class->calculate_supported_scales = meta_monitor_manager_dummy_calculate_supported_scales;
manager_class->get_supported_scales = meta_monitor_manager_dummy_get_supported_scales;
manager_class->get_capabilities = meta_monitor_manager_dummy_get_capabilities;
manager_class->get_max_screen_size = meta_monitor_manager_dummy_get_max_screen_size;
manager_class->get_default_layout_mode = meta_monitor_manager_dummy_get_default_layout_mode;

View File

@@ -48,6 +48,7 @@
#include "meta-dbus-display-config.h"
#include "meta-cursor.h"
typedef struct _MetaMonitorConfig MetaMonitorConfig;
typedef struct _MetaMonitorConfigManager MetaMonitorConfigManager;
typedef struct _MetaMonitorConfigStore MetaMonitorConfigStore;
typedef struct _MetaMonitorsConfig MetaMonitorsConfig;
@@ -71,8 +72,7 @@ typedef enum _MetaMonitorManagerCapability
{
META_MONITOR_MANAGER_CAPABILITY_NONE = 0,
META_MONITOR_MANAGER_CAPABILITY_MIRRORING = (1 << 0),
META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE = (1 << 1),
META_MONITOR_MANAGER_CAPABILITY_GLOBAL_SCALE_REQUIRED = (1 << 2)
META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE = (1 << 1)
} MetaMonitorManagerCapability;
/* Equivalent to the 'method' enum in org.gnome.Mutter.DisplayConfig */
@@ -90,12 +90,6 @@ typedef enum _MetaLogicalMonitorLayoutMode
META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL = 2
} MetaLogicalMonitorLayoutMode;
typedef enum _MetaMonitorManagerDeriveFlag
{
META_MONITOR_MANAGER_DERIVE_FLAG_NONE = 0,
META_MONITOR_MANAGER_DERIVE_FLAG_CONFIGURED_SCALE = (1 << 0)
} MetaMonitorManagerDeriveFlag;
typedef enum
{
META_MONITOR_TRANSFORM_NORMAL,
@@ -130,28 +124,6 @@ typedef enum
META_CONNECTOR_TYPE_DSI = 16,
} MetaConnectorType;
/* Same as KMS mode flags and X11 randr flags */
typedef enum
{
META_CRTC_MODE_FLAG_NONE = 0,
META_CRTC_MODE_FLAG_PHSYNC = (1 << 0),
META_CRTC_MODE_FLAG_NHSYNC = (1 << 1),
META_CRTC_MODE_FLAG_PVSYNC = (1 << 2),
META_CRTC_MODE_FLAG_NVSYNC = (1 << 3),
META_CRTC_MODE_FLAG_INTERLACE = (1 << 4),
META_CRTC_MODE_FLAG_DBLSCAN = (1 << 5),
META_CRTC_MODE_FLAG_CSYNC = (1 << 6),
META_CRTC_MODE_FLAG_PCSYNC = (1 << 7),
META_CRTC_MODE_FLAG_NCSYNC = (1 << 8),
META_CRTC_MODE_FLAG_HSKEW = (1 << 9),
META_CRTC_MODE_FLAG_BCAST = (1 << 10),
META_CRTC_MODE_FLAG_PIXMUX = (1 << 11),
META_CRTC_MODE_FLAG_DBLCLK = (1 << 12),
META_CRTC_MODE_FLAG_CLKDIV2 = (1 << 13),
META_CRTC_MODE_FLAG_MASK = 0x3fff
} MetaCrtcModeFlag;
struct _MetaTileInfo
{
guint32 group_id;
@@ -252,7 +224,7 @@ struct _MetaCrtcMode
int width;
int height;
float refresh_rate;
MetaCrtcModeFlag flags;
guint32 flags;
gpointer driver_private;
GDestroyNotify driver_notify;
@@ -260,9 +232,11 @@ struct _MetaCrtcMode
/*
* MetaCrtcInfo:
* This represents the writable part of a CRTC, as deserialized from DBus
* or built by MetaMonitorConfig
*
* A representation of a CRTC configuration, generated by
* MetaMonitorConfigManager.
* Note: differently from the other structures in this file, MetaCrtcInfo
* is handled by pointer. This is to accomodate the usage in MetaMonitorConfig
*/
struct _MetaCrtcInfo
{
@@ -276,9 +250,7 @@ struct _MetaCrtcInfo
/*
* MetaOutputInfo:
*
* A representation of a connector configuration, generated by
* MetaMonitorConfigManager.
* this is the same as MetaCrtcInfo, but for outputs
*/
struct _MetaOutputInfo
{
@@ -288,6 +260,12 @@ struct _MetaOutputInfo
gboolean is_underscanning;
};
typedef enum _MetaMonitorConfigSystem
{
META_MONITOR_CONFIG_SYSTEM_LEGACY,
META_MONITOR_CONFIG_SYSTEM_MANAGER
} MetaMonitorConfigSystem;
#define META_TYPE_MONITOR_MANAGER (meta_monitor_manager_get_type ())
#define META_MONITOR_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_MONITOR_MANAGER, MetaMonitorManager))
#define META_MONITOR_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_MONITOR_MANAGER, MetaMonitorManagerClass))
@@ -336,16 +314,17 @@ struct _MetaMonitorManager
int dbus_name_id;
MetaMonitorConfigSystem pending_persistent_system;
int persistent_timeout_id;
MetaMonitorConfig *legacy_config;
MetaMonitorConfigManager *config_manager;
GnomePnpIds *pnp_ids;
UpClient *up_client;
gulong experimental_features_changed_handler_id;
MetaMonitorSwitchConfigType current_switch_config;
};
struct _MetaMonitorManagerClass
@@ -368,6 +347,12 @@ struct _MetaMonitorManagerClass
MetaMonitorsConfigMethod ,
GError **);
void (*apply_configuration) (MetaMonitorManager *,
MetaCrtcInfo **,
unsigned int ,
MetaOutputInfo **,
unsigned int);
void (*set_power_save_mode) (MetaMonitorManager *,
MetaPowerSave);
@@ -398,15 +383,13 @@ struct _MetaMonitorManagerClass
MetaCrtc *,
MetaMonitorTransform);
float (*calculate_monitor_mode_scale) (MetaMonitorManager *,
MetaMonitor *,
MetaMonitorMode *);
int (*calculate_monitor_mode_scale) (MetaMonitorManager *,
MetaMonitor *,
MetaMonitorMode *);
float * (*calculate_supported_scales) (MetaMonitorManager *,
MetaLogicalMonitorLayoutMode ,
MetaMonitor *,
MetaMonitorMode *,
int *);
void (*get_supported_scales) (MetaMonitorManager *,
float **,
int *);
MetaMonitorManagerCapability (*get_capabilities) (MetaMonitorManager *);
@@ -417,10 +400,11 @@ struct _MetaMonitorManagerClass
MetaLogicalMonitorLayoutMode (*get_default_layout_mode) (MetaMonitorManager *);
};
gboolean meta_is_monitor_config_manager_enabled (void);
void meta_monitor_manager_rebuild (MetaMonitorManager *manager,
MetaMonitorsConfig *config);
void meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager,
MetaMonitorManagerDeriveFlag flags);
void meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager);
int meta_monitor_manager_get_num_logical_monitors (MetaMonitorManager *manager);
@@ -466,6 +450,12 @@ void meta_monitor_manager_get_screen_size (MetaMonitorManager *
int *width,
int *height);
void meta_monitor_manager_apply_configuration (MetaMonitorManager *manager,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs);
void meta_monitor_manager_confirm_configuration (MetaMonitorManager *manager,
gboolean ok);
@@ -473,6 +463,9 @@ void meta_output_parse_edid (MetaOutput *output,
GBytes *edid);
gboolean meta_output_is_laptop (MetaOutput *output);
void meta_crtc_info_free (MetaCrtcInfo *info);
void meta_output_info_free (MetaOutputInfo *info);
gboolean meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager);
void meta_monitor_manager_read_current_state (MetaMonitorManager *manager);
void meta_monitor_manager_on_hotplug (MetaMonitorManager *manager);
@@ -494,8 +487,7 @@ MetaMonitorsConfig * meta_monitor_manager_ensure_configured (MetaMonitorManager
void meta_monitor_manager_update_logical_state (MetaMonitorManager *manager,
MetaMonitorsConfig *config);
void meta_monitor_manager_update_logical_state_derived (MetaMonitorManager *manager,
MetaMonitorManagerDeriveFlag flags);
void meta_monitor_manager_update_logical_state_derived (MetaMonitorManager *manager);
gboolean meta_monitor_manager_is_lid_closed (MetaMonitorManager *manager);
@@ -503,25 +495,10 @@ void meta_monitor_manager_lid_is_closed_changed (MetaMonitorManage
gboolean meta_monitor_manager_is_headless (MetaMonitorManager *manager);
float meta_monitor_manager_calculate_monitor_mode_scale (MetaMonitorManager *manager,
int meta_monitor_manager_calculate_monitor_mode_scale (MetaMonitorManager *manager,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode);
float * meta_monitor_manager_calculate_supported_scales (MetaMonitorManager *,
MetaLogicalMonitorLayoutMode ,
MetaMonitor *,
MetaMonitorMode *,
int *);
gboolean meta_monitor_manager_is_scale_supported (MetaMonitorManager *manager,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
float scale);
MetaMonitorManagerCapability
meta_monitor_manager_get_capabilities (MetaMonitorManager *manager);
gboolean meta_monitor_manager_get_max_screen_size (MetaMonitorManager *manager,
int *max_width,
int *max_height);
@@ -529,8 +506,6 @@ gboolean meta_monitor_manager_get_max_screen_size (MetaMonitorManager
MetaLogicalMonitorLayoutMode
meta_monitor_manager_get_default_layout_mode (MetaMonitorManager *manager);
void meta_monitor_manager_rotate_monitor (MetaMonitorManager *manager);
void meta_monitor_manager_clear_output (MetaOutput *output);
void meta_monitor_manager_clear_mode (MetaCrtcMode *mode);
void meta_monitor_manager_clear_crtc (MetaCrtc *crtc);

File diff suppressed because it is too large Load Diff

View File

@@ -25,19 +25,9 @@
#include "backends/meta-backend-private.h"
#include "backends/meta-monitor-manager-private.h"
#include "backends/meta-settings-private.h"
#define SCALE_FACTORS_PER_INTEGER 4
#define MINIMUM_SCALE_FACTOR 1.0f
#define MAXIMUM_SCALE_FACTOR 4.0f
#define MINIMUM_LOGICAL_WIDTH 800
#define MINIMUM_LOGICAL_HEIGHT 600
#define HANDLED_CRTC_MODE_FLAGS (META_CRTC_MODE_FLAG_INTERLACE)
typedef struct _MetaMonitorMode
{
char *id;
MetaMonitorModeSpec spec;
MetaMonitorCrtcMode *crtc_modes;
} MetaMonitorMode;
@@ -51,11 +41,8 @@ typedef struct _MetaMonitorModeTiled
typedef struct _MetaMonitorPrivate
{
MetaMonitorManager *monitor_manager;
GList *outputs;
GList *modes;
GHashTable *mode_ids;
MetaMonitorMode *preferred_mode;
MetaMonitorMode *current_mode;
@@ -89,10 +76,6 @@ struct _MetaMonitorTiled
uint32_t tile_group_id;
/* The tile (0, 0) output. */
MetaOutput *origin_output;
/* The output enabled even when a non-tiled mode is used. */
MetaOutput *main_output;
};
@@ -159,7 +142,7 @@ meta_monitor_spec_free (MetaMonitorSpec *monitor_spec)
}
static void
meta_monitor_generate_spec (MetaMonitor *monitor)
meta_monitor_generate_id (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
MetaOutput *output = meta_monitor_get_main_output (monitor);
@@ -260,10 +243,11 @@ meta_monitor_get_current_resolution (MetaMonitor *monitor,
}
void
meta_monitor_derive_layout (MetaMonitor *monitor,
MetaRectangle *layout)
meta_monitor_derive_dimensions (MetaMonitor *monitor,
int *width,
int *height)
{
META_MONITOR_GET_CLASS (monitor)->derive_layout (monitor, layout);
META_MONITOR_GET_CLASS (monitor)->derive_dimensions (monitor, width, height);
}
void
@@ -338,7 +322,6 @@ meta_monitor_finalize (GObject *object)
MetaMonitor *monitor = META_MONITOR (object);
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
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);
@@ -347,9 +330,6 @@ meta_monitor_finalize (GObject *object)
static void
meta_monitor_init (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
priv->mode_ids = g_hash_table_new (g_str_hash, g_str_equal);
}
static void
@@ -360,39 +340,6 @@ meta_monitor_class_init (MetaMonitorClass *klass)
object_class->finalize = meta_monitor_finalize;
}
static char *
generate_mode_id (MetaMonitorModeSpec *monitor_mode_spec)
{
gboolean is_interlaced;
char refresh_rate_str[G_ASCII_DTOSTR_BUF_SIZE];
is_interlaced = !!(monitor_mode_spec->flags & META_CRTC_MODE_FLAG_INTERLACE);
g_ascii_dtostr (refresh_rate_str, G_ASCII_DTOSTR_BUF_SIZE,
monitor_mode_spec->refresh_rate);
return g_strdup_printf ("%dx%d%s@%s",
monitor_mode_spec->width,
monitor_mode_spec->height,
is_interlaced ? "i" : "",
refresh_rate_str);
}
static gboolean
meta_monitor_add_mode (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
if (g_hash_table_lookup (priv->mode_ids,
meta_monitor_mode_get_id (monitor_mode)))
return FALSE;
priv->modes = g_list_append (priv->modes, monitor_mode);
g_hash_table_insert (priv->mode_ids, monitor_mode->id, monitor_mode);
return TRUE;
}
static void
meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
{
@@ -412,10 +359,8 @@ meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
mode->spec = (MetaMonitorModeSpec) {
.width = crtc_mode->width,
.height = crtc_mode->height,
.refresh_rate = crtc_mode->refresh_rate,
.flags = crtc_mode->flags & HANDLED_CRTC_MODE_FLAGS
.refresh_rate = crtc_mode->refresh_rate
},
mode->id = generate_mode_id (&mode->spec);
mode->crtc_modes = g_new (MetaMonitorCrtcMode, 1);
mode->crtc_modes[0] = (MetaMonitorCrtcMode) {
.output = output,
@@ -427,14 +372,12 @@ meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
if (output->crtc && crtc_mode == output->crtc->current_mode)
monitor_priv->current_mode = mode;
if (!meta_monitor_add_mode (monitor, mode))
meta_monitor_mode_free (mode);
monitor_priv->modes = g_list_append (monitor_priv->modes, mode);
}
}
MetaMonitorNormal *
meta_monitor_normal_new (MetaMonitorManager *monitor_manager,
MetaOutput *output)
meta_monitor_normal_new (MetaOutput *output)
{
MetaMonitorNormal *monitor_normal;
MetaMonitor *monitor;
@@ -444,13 +387,11 @@ meta_monitor_normal_new (MetaMonitorManager *monitor_manager,
monitor = META_MONITOR (monitor_normal);
monitor_priv = meta_monitor_get_instance_private (monitor);
monitor_priv->monitor_manager = monitor_manager;
monitor_priv->outputs = g_list_append (NULL, output);
monitor_priv->winsys_id = output->winsys_id;
meta_monitor_generate_spec (monitor);
meta_monitor_normal_generate_modes (monitor_normal);
meta_monitor_generate_id (monitor);
return monitor_normal;
}
@@ -465,35 +406,15 @@ meta_monitor_normal_get_main_output (MetaMonitor *monitor)
}
static void
meta_monitor_normal_derive_layout (MetaMonitor *monitor,
MetaRectangle *layout)
meta_monitor_normal_derive_dimensions (MetaMonitor *monitor,
int *width,
int *height)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
*layout = (MetaRectangle) {
.x = output->crtc->rect.x,
.y = output->crtc->rect.y,
.width = output->crtc->rect.width,
.height = output->crtc->rect.height
};
}
static gboolean
meta_monitor_normal_get_suggested_position (MetaMonitor *monitor,
int *x,
int *y)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
if (output->suggested_x < 0 && output->suggested_y < 0)
return FALSE;
*x = output->suggested_x;
*y = output->suggested_y;
return TRUE;
*width = output->crtc->rect.width;
*height = output->crtc->rect.height;
}
static void
@@ -519,9 +440,8 @@ meta_monitor_normal_class_init (MetaMonitorNormalClass *klass)
MetaMonitorClass *monitor_class = META_MONITOR_CLASS (klass);
monitor_class->get_main_output = meta_monitor_normal_get_main_output;
monitor_class->derive_layout = meta_monitor_normal_derive_layout;
monitor_class->derive_dimensions = meta_monitor_normal_derive_dimensions;
monitor_class->calculate_crtc_pos = meta_monitor_normal_calculate_crtc_pos;
monitor_class->get_suggested_position = meta_monitor_normal_get_suggested_position;
}
uint32_t
@@ -535,8 +455,16 @@ meta_monitor_get_suggested_position (MetaMonitor *monitor,
int *x,
int *y)
{
return META_MONITOR_GET_CLASS (monitor)->get_suggested_position (monitor,
x, y);
MetaOutput *main_output;
main_output = meta_monitor_get_main_output (monitor);
if (main_output->suggested_x < 0 && main_output->suggested_y < 0)
return FALSE;
*x = main_output->suggested_x;
*y = main_output->suggested_y;
return TRUE;
}
static void
@@ -555,7 +483,7 @@ add_tiled_monitor_outputs (MetaMonitorManager *monitor_manager,
continue;
g_warn_if_fail (output->subpixel_order ==
monitor_tiled->origin_output->subpixel_order);
monitor_tiled->main_output->subpixel_order);
monitor_priv->outputs = g_list_append (monitor_priv->outputs, output);
}
@@ -675,157 +603,41 @@ is_monitor_mode_assigned (MetaMonitor *monitor,
return TRUE;
}
static gboolean
is_crtc_mode_tiled (MetaOutput *output,
MetaCrtcMode *crtc_mode)
{
return (crtc_mode->width == (int) output->tile_info.tile_w &&
crtc_mode->height == (int) output->tile_info.tile_h);
}
static MetaCrtcMode *
find_tiled_crtc_mode (MetaOutput *output,
MetaCrtcMode *reference_crtc_mode)
{
MetaCrtcMode *crtc_mode;
unsigned int i;
crtc_mode = output->preferred_mode;
if (is_crtc_mode_tiled (output, crtc_mode))
return crtc_mode;
for (i = 0; i < output->n_modes; i++)
{
crtc_mode = output->modes[i];
if (!is_crtc_mode_tiled (output, crtc_mode))
continue;
if (crtc_mode->refresh_rate != reference_crtc_mode->refresh_rate)
continue;
if (crtc_mode->flags != reference_crtc_mode->flags)
continue;
return crtc_mode;
}
return NULL;
}
static MetaMonitorMode *
create_tiled_monitor_mode (MetaMonitorTiled *monitor_tiled,
MetaCrtcMode *reference_crtc_mode,
gboolean *out_is_preferred)
create_tiled_monitor_mode (MetaMonitorTiled *monitor_tiled)
{
MetaMonitor *monitor = META_MONITOR (monitor_tiled);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaMonitorModeTiled *mode;
int width, height;
GList *l;
unsigned int i;
gboolean is_preferred = TRUE;
int i;
mode = g_new0 (MetaMonitorModeTiled, 1);
mode->is_tiled = TRUE;
meta_monitor_tiled_calculate_tiled_size (monitor, &width, &height);
mode->parent.spec = (MetaMonitorModeSpec) {
.width = width,
.height = height,
.refresh_rate = reference_crtc_mode->refresh_rate,
.flags = reference_crtc_mode->flags & HANDLED_CRTC_MODE_FLAGS
};
mode->parent.id = generate_mode_id (&mode->parent.spec);
meta_monitor_tiled_calculate_tiled_size (monitor,
&mode->parent.spec.width,
&mode->parent.spec.height);
mode->parent.crtc_modes = g_new0 (MetaMonitorCrtcMode,
g_list_length (monitor_priv->outputs));
for (l = monitor_priv->outputs, i = 0; l; l = l->next, i++)
{
MetaOutput *output = l->data;
MetaCrtcMode *tiled_crtc_mode;
tiled_crtc_mode = find_tiled_crtc_mode (output, reference_crtc_mode);
if (!tiled_crtc_mode)
{
g_warning ("No tiled mode found on %s", output->name);
meta_monitor_mode_free ((MetaMonitorMode *) mode);
return NULL;
}
MetaCrtcMode *preferred_crtc_mode = output->preferred_mode;
mode->parent.crtc_modes[i] = (MetaMonitorCrtcMode) {
.output = output,
.crtc_mode = tiled_crtc_mode
.crtc_mode = preferred_crtc_mode
};
is_preferred = is_preferred && tiled_crtc_mode == output->preferred_mode;
g_warn_if_fail (mode->parent.spec.refresh_rate == 0.0f ||
(mode->parent.spec.refresh_rate ==
preferred_crtc_mode->refresh_rate));
mode->parent.spec.refresh_rate = preferred_crtc_mode->refresh_rate;
}
*out_is_preferred = is_preferred;
return (MetaMonitorMode *) mode;
}
static void
generate_tiled_monitor_modes (MetaMonitorTiled *monitor_tiled)
{
MetaMonitor *monitor = META_MONITOR (monitor_tiled);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaOutput *main_output;
GList *tiled_modes = NULL;
unsigned int i;
MetaMonitorMode *best_mode = NULL;
GList *l;
main_output = meta_monitor_get_main_output (META_MONITOR (monitor_tiled));
for (i = 0; i < main_output->n_modes; i++)
{
MetaCrtcMode *reference_crtc_mode = main_output->modes[i];
MetaMonitorMode *mode;
gboolean is_preferred;
if (!is_crtc_mode_tiled (main_output, reference_crtc_mode))
continue;
mode = create_tiled_monitor_mode (monitor_tiled, reference_crtc_mode,
&is_preferred);
if (!mode)
continue;
tiled_modes = g_list_append (tiled_modes, mode);
if (is_monitor_mode_assigned (monitor, mode))
monitor_priv->current_mode = mode;
if (is_preferred)
monitor_priv->preferred_mode = mode;
}
while ((l = tiled_modes))
{
MetaMonitorMode *mode = l->data;
tiled_modes = g_list_remove_link (tiled_modes, l);
if (!meta_monitor_add_mode (monitor, mode))
{
meta_monitor_mode_free (mode);
continue;
}
if (!monitor_priv->preferred_mode)
{
if (!best_mode ||
mode->spec.refresh_rate > best_mode->spec.refresh_rate)
best_mode = mode;
}
}
if (best_mode)
monitor_priv->preferred_mode = best_mode;
return &mode->parent;
}
static MetaMonitorMode *
@@ -840,7 +652,12 @@ create_untiled_monitor_mode (MetaMonitorTiled *monitor_tiled,
GList *l;
int i;
if (is_crtc_mode_tiled (main_output, crtc_mode))
/*
* Assume modes with a resolution identical to the tile sizes are tiled
* modes.
*/
if (crtc_mode->width == (int) main_output->tile_info.tile_w &&
crtc_mode->height == (int) main_output->tile_info.tile_h)
return NULL;
mode = g_new0 (MetaMonitorModeTiled, 1);
@@ -849,12 +666,10 @@ create_untiled_monitor_mode (MetaMonitorTiled *monitor_tiled,
mode->parent.spec = (MetaMonitorModeSpec) {
.width = crtc_mode->width,
.height = crtc_mode->height,
.refresh_rate = crtc_mode->refresh_rate,
.flags = crtc_mode->flags & HANDLED_CRTC_MODE_FLAGS
.refresh_rate = crtc_mode->refresh_rate
};
mode->parent.id = generate_mode_id (&mode->parent.spec);
mode->parent.crtc_modes = g_new0 (MetaMonitorCrtcMode,
g_list_length (monitor_priv->outputs));
g_list_length (monitor_priv->outputs));
for (l = monitor_priv->outputs, i = 0; l; l = l->next, i++)
{
@@ -879,188 +694,42 @@ create_untiled_monitor_mode (MetaMonitorTiled *monitor_tiled,
return &mode->parent;
}
static int
count_untiled_crtc_modes (MetaOutput *output)
{
int count;
unsigned int i;
count = 0;
for (i = 0; i < output->n_modes; i++)
{
MetaCrtcMode *crtc_mode = output->modes[i];
if (!is_crtc_mode_tiled (output, crtc_mode))
count++;
}
return count;
}
static MetaOutput *
find_untiled_output (MetaMonitorTiled *monitor_tiled)
{
MetaMonitor *monitor = META_MONITOR (monitor_tiled);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaOutput *best_output;
int best_untiled_crtc_mode_count;
GList *l;
best_output = monitor_tiled->origin_output;
best_untiled_crtc_mode_count =
count_untiled_crtc_modes (monitor_tiled->origin_output);
for (l = monitor_priv->outputs; l; l = l->next)
{
MetaOutput *output = l->data;
int untiled_crtc_mode_count;
if (output == monitor_tiled->origin_output)
continue;
untiled_crtc_mode_count = count_untiled_crtc_modes (output);
if (untiled_crtc_mode_count > best_untiled_crtc_mode_count)
{
best_untiled_crtc_mode_count = untiled_crtc_mode_count;
best_output = output;
}
}
return best_output;
}
static void
generate_untiled_monitor_modes (MetaMonitorTiled *monitor_tiled)
{
MetaMonitor *monitor = META_MONITOR (monitor_tiled);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaOutput *main_output;
unsigned int i;
main_output = meta_monitor_get_main_output (monitor);
for (i = 0; i < main_output->n_modes; i++)
{
MetaCrtcMode *crtc_mode = main_output->modes[i];
MetaMonitorMode *mode;
mode = create_untiled_monitor_mode (monitor_tiled,
main_output,
crtc_mode);
if (!mode)
continue;
if (!meta_monitor_add_mode (monitor, mode))
{
meta_monitor_mode_free (mode);
continue;
}
if (is_monitor_mode_assigned (monitor, mode))
{
g_assert (!monitor_priv->current_mode);
monitor_priv->current_mode = mode;
}
if (!monitor_priv->preferred_mode &&
crtc_mode == main_output->preferred_mode)
monitor_priv->preferred_mode = mode;
}
}
static MetaMonitorMode *
find_best_mode (MetaMonitor *monitor)
{
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaMonitorMode *best_mode = NULL;
GList *l;
for (l = monitor_priv->modes; l; l = l->next)
{
MetaMonitorMode *mode = l->data;
int area, best_area;
if (!best_mode)
{
best_mode = mode;
continue;
}
area = mode->spec.width * mode->spec.height;
best_area = best_mode->spec.width * best_mode->spec.height;
if (area > best_area)
{
best_mode = mode;
continue;
}
if (mode->spec.refresh_rate > best_mode->spec.refresh_rate)
{
best_mode = mode;
continue;
}
}
return best_mode;
}
static void
meta_monitor_tiled_generate_modes (MetaMonitorTiled *monitor_tiled)
{
MetaMonitor *monitor = META_MONITOR (monitor_tiled);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaMonitorMode *mode;
MetaOutput *main_output;
unsigned int i;
/*
* Tiled monitors may look a bit different from each other, depending on the
* monitor itself, the driver, etc.
*
* On some, the tiled modes will be the preferred CRTC modes, and running
* untiled is done by only enabling (0, 0) tile. In this case, things are
* pretty straight forward.
*
* Other times a monitor may have some bogus mode preferred on the main tile,
* and an untiled mode preferred on the non-main tile, and there seems to be
* no guarantee that the (0, 0) tile is the one that should drive the
* non-tiled mode.
*
* To handle both these cases, the following hueristics are implemented:
*
* 1) Find all the tiled CRTC modes of the (0, 0) tile, and create tiled
* monitor modes for all tiles based on these.
* 2) If there is any tiled monitor mode combination where all CRTC modes
* are the preferred ones, that one is marked as preferred.
* 3) If there is no preferred mode determined so far, assume the tiled
* monitor mode with the highest refresh rate is preferred.
* 4) Find the tile with highest number of untiled CRTC modes available,
* assume this is the one driving the monitor in untiled mode, and
* create monitor modes for all untiled CRTC modes of that tile. If
* there is still no preferred mode, set any untiled mode as preferred
* if the CRTC mode is marked as such.
* 5) If at this point there is still no preferred mode, just pick the one
* with the highest number of pixels and highest refresh rate.
*
* Note that this ignores the preference if the preference is a non-tiled
* mode. This seems to be the case on some systems, where the user tends to
* manually set up the tiled mode anyway.
*/
mode = create_tiled_monitor_mode (monitor_tiled);
monitor_priv->modes = g_list_append (monitor_priv->modes, mode);
generate_tiled_monitor_modes (monitor_tiled);
monitor_priv->preferred_mode = mode;
if (!monitor_priv->preferred_mode)
g_warning ("Tiled monitor on %s didn't have any tiled modes",
monitor_priv->spec->connector);
if (is_monitor_mode_assigned (monitor, mode))
monitor_priv->current_mode = mode;
generate_untiled_monitor_modes (monitor_tiled);
if (!monitor_priv->preferred_mode)
main_output = meta_monitor_get_main_output (monitor);
for (i = 0; i < main_output->n_modes; i++)
{
g_warning ("Tiled monitor on %s didn't have a valid preferred mode",
monitor_priv->spec->connector);
monitor_priv->preferred_mode = find_best_mode (monitor);
MetaCrtcMode *crtc_mode = main_output->modes[i];
mode = create_untiled_monitor_mode (monitor_tiled,
main_output,
crtc_mode);
if (mode)
{
monitor_priv->modes = g_list_append (monitor_priv->modes, mode);
if (is_monitor_mode_assigned (monitor, mode))
{
g_assert (!monitor_priv->current_mode);
monitor_priv->current_mode = mode;
}
}
}
}
@@ -1076,22 +745,17 @@ meta_monitor_tiled_new (MetaMonitorManager *monitor_manager,
monitor = META_MONITOR (monitor_tiled);
monitor_priv = meta_monitor_get_instance_private (monitor);
monitor_priv->monitor_manager = monitor_manager;
monitor_tiled->tile_group_id = output->tile_info.group_id;
monitor_priv->winsys_id = output->winsys_id;
monitor_tiled->origin_output = output;
monitor_tiled->main_output = output;
add_tiled_monitor_outputs (monitor_manager, monitor_tiled);
monitor_tiled->main_output = find_untiled_output (monitor_tiled);
meta_monitor_generate_spec (monitor);
meta_monitor_manager_tiled_monitor_added (monitor_manager,
META_MONITOR (monitor_tiled));
meta_monitor_tiled_generate_modes (monitor_tiled);
meta_monitor_generate_id (monitor);
return monitor_tiled;
}
@@ -1105,8 +769,9 @@ meta_monitor_tiled_get_main_output (MetaMonitor *monitor)
}
static void
meta_monitor_derived_derive_layout (MetaMonitor *monitor,
MetaRectangle *layout)
meta_monitor_tiled_derive_dimensions (MetaMonitor *monitor,
int *out_width,
int *out_height)
{
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
@@ -1130,20 +795,8 @@ meta_monitor_derived_derive_layout (MetaMonitor *monitor,
max_y = MAX (output->crtc->rect.y + output->crtc->rect.height, max_y);
}
*layout = (MetaRectangle) {
.x = min_x,
.y = min_y,
.width = max_x - min_x,
.height = max_y - min_y
};
}
static gboolean
meta_monitor_tiled_get_suggested_position (MetaMonitor *monitor,
int *x,
int *y)
{
return FALSE;
*out_width = max_x - min_x;
*out_height = max_y - min_y;
}
static void
@@ -1171,12 +824,13 @@ meta_monitor_tiled_calculate_crtc_pos (MetaMonitor *monitor,
static void
meta_monitor_tiled_finalize (GObject *object)
{
MetaMonitor *monitor = META_MONITOR (object);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaMonitorTiled *monitor_tiled = META_MONITOR_TILED (object);
MetaBackend *backend = meta_get_backend ();
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
meta_monitor_manager_tiled_monitor_removed (monitor_priv->monitor_manager,
monitor);
meta_monitor_manager_tiled_monitor_removed (monitor_manager,
META_MONITOR (monitor_tiled));
}
static void
@@ -1193,15 +847,13 @@ meta_monitor_tiled_class_init (MetaMonitorTiledClass *klass)
object_class->finalize = meta_monitor_tiled_finalize;
monitor_class->get_main_output = meta_monitor_tiled_get_main_output;
monitor_class->derive_layout = meta_monitor_derived_derive_layout;
monitor_class->derive_dimensions = meta_monitor_tiled_derive_dimensions;
monitor_class->calculate_crtc_pos = meta_monitor_tiled_calculate_crtc_pos;
monitor_class->get_suggested_position = meta_monitor_tiled_get_suggested_position;
}
static void
meta_monitor_mode_free (MetaMonitorMode *monitor_mode)
{
g_free (monitor_mode->id);
g_free (monitor_mode->crtc_modes);
g_free (monitor_mode);
}
@@ -1225,15 +877,6 @@ meta_monitor_get_logical_monitor (MetaMonitor *monitor)
return NULL;
}
MetaMonitorMode *
meta_monitor_get_mode_from_id (MetaMonitor *monitor,
const char *monitor_mode_id)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
return g_hash_table_lookup (priv->mode_ids, monitor_mode_id);
}
static gboolean
meta_monitor_mode_spec_equals (MetaMonitorModeSpec *monitor_mode_spec,
MetaMonitorModeSpec *other_monitor_mode_spec)
@@ -1241,8 +884,7 @@ meta_monitor_mode_spec_equals (MetaMonitorModeSpec *monitor_mode_spec,
return (monitor_mode_spec->width == other_monitor_mode_spec->width &&
monitor_mode_spec->height == other_monitor_mode_spec->height &&
(monitor_mode_spec->refresh_rate ==
other_monitor_mode_spec->refresh_rate) &&
monitor_mode_spec->flags == other_monitor_mode_spec->flags);
other_monitor_mode_spec->refresh_rate));
}
MetaMonitorMode *
@@ -1334,221 +976,12 @@ meta_monitor_calculate_crtc_pos (MetaMonitor *monitor,
out_y);
}
/* The minimum resolution at which we turn on a window-scale of 2 */
#define HIDPI_LIMIT 192
/*
* The minimum screen height at which we turn on a window-scale of 2;
* below this there just isn't enough vertical real estate for GNOME
* apps to work, and it's better to just be tiny
*/
#define HIDPI_MIN_HEIGHT 1200
/* From http://en.wikipedia.org/wiki/4K_resolution#Resolutions_of_common_formats */
#define SMALLEST_4K_WIDTH 3656
static float
calculate_scale (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
int resolution_width, resolution_height;
int width_mm, height_mm;
int scale;
scale = 1.0;
meta_monitor_mode_get_resolution (monitor_mode,
&resolution_width,
&resolution_height);
if (resolution_height < HIDPI_MIN_HEIGHT)
goto out;
/* 4K TV */
switch (meta_monitor_get_connector_type (monitor))
{
case META_CONNECTOR_TYPE_HDMIA:
case META_CONNECTOR_TYPE_HDMIB:
if (resolution_width < SMALLEST_4K_WIDTH)
goto out;
break;
default:
break;
}
meta_monitor_get_physical_dimensions (monitor, &width_mm, &height_mm);
/*
* Somebody encoded the aspect ratio (16/9 or 16/10) instead of the physical
* size.
*/
if ((width_mm == 160 && height_mm == 90) ||
(width_mm == 160 && height_mm == 100) ||
(width_mm == 16 && height_mm == 9) ||
(width_mm == 16 && height_mm == 10))
goto out;
if (width_mm > 0 && height_mm > 0)
{
double dpi_x, dpi_y;
dpi_x = (double) resolution_width / (width_mm / 25.4);
dpi_y = (double) resolution_height / (height_mm / 25.4);
/*
* We don't completely trust these values so both must be high, and never
* pick higher ratio than 2 automatically.
*/
if (dpi_x > HIDPI_LIMIT && dpi_y > HIDPI_LIMIT)
scale = 2.0;
}
out:
return scale;
}
float
meta_monitor_calculate_mode_scale (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
MetaBackend *backend = meta_get_backend ();
MetaSettings *settings = meta_backend_get_settings (backend);
int global_scaling_factor;
if (meta_settings_get_global_scaling_factor (settings,
&global_scaling_factor))
return global_scaling_factor;
return calculate_scale (monitor, monitor_mode);
}
static float
get_closest_scale_factor_for_resolution (float width,
float height,
float scale,
float scale_step)
{
unsigned int i, j;
float scaled_h;
float scaled_w;
float best_scale;
int base_scaled_w;
gboolean limit_exceeded;
gboolean found_one;
best_scale = 0;
scaled_w = width / scale;
scaled_h = height / scale;
if (scale < MINIMUM_SCALE_FACTOR ||
scale > MAXIMUM_SCALE_FACTOR ||
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)
return scale;
i = 0;
found_one = FALSE;
limit_exceeded = FALSE;
base_scaled_w = floorf (scaled_w);
do
{
for (j = 0; j < 2; j++)
{
float current_scale;
int offset = i * (j ? 1 : -1);
scaled_w = base_scaled_w + offset;
current_scale = width / scaled_w;
scaled_h = height / current_scale;
if (current_scale >= scale + scale_step ||
current_scale <= scale - scale_step ||
current_scale < MINIMUM_SCALE_FACTOR ||
current_scale > MAXIMUM_SCALE_FACTOR)
{
limit_exceeded = TRUE;
continue;
}
if (floorf (scaled_h) == scaled_h)
{
found_one = TRUE;
if (fabsf (current_scale - scale) < fabsf (best_scale - scale))
best_scale = current_scale;
}
}
i++;
}
while (!found_one && !limit_exceeded);
out:
return best_scale;
}
float *
meta_monitor_calculate_supported_scales (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
MetaMonitorScalesConstraint constraints,
int *n_supported_scales)
{
unsigned int i, j;
int width, height;
float scale_steps;
GArray *supported_scales;
scale_steps = 1.0 / (float) SCALE_FACTORS_PER_INTEGER;
supported_scales = g_array_new (FALSE, FALSE, sizeof (float));
meta_monitor_mode_get_resolution (monitor_mode, &width, &height);
for (i = floorf (MINIMUM_SCALE_FACTOR);
i <= ceilf (MAXIMUM_SCALE_FACTOR);
i++)
{
for (j = 0; j < SCALE_FACTORS_PER_INTEGER; j++)
{
float scale;
float scale_value = i + j * scale_steps;
if ((constraints & META_MONITOR_SCALES_CONSTRAINT_NO_FRAC) &&
fmodf (scale_value, 1.0) != 0.0)
{
continue;
}
scale = get_closest_scale_factor_for_resolution (width,
height,
scale_value,
scale_steps);
if (scale > 0.0f)
g_array_append_val (supported_scales, scale);
}
}
*n_supported_scales = supported_scales->len;
return (float *) g_array_free (supported_scales, FALSE);
}
MetaMonitorModeSpec *
meta_monitor_mode_get_spec (MetaMonitorMode *monitor_mode)
{
return &monitor_mode->spec;
}
const char *
meta_monitor_mode_get_id (MetaMonitorMode *monitor_mode)
{
return monitor_mode->id;
}
void
meta_monitor_mode_get_resolution (MetaMonitorMode *monitor_mode,
int *width,
@@ -1564,12 +997,6 @@ meta_monitor_mode_get_refresh_rate (MetaMonitorMode *monitor_mode)
return monitor_mode->spec.refresh_rate;
}
MetaCrtcModeFlag
meta_monitor_mode_get_flags (MetaMonitorMode *monitor_mode)
{
return monitor_mode->spec.flags;
}
gboolean
meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
MetaMonitorMode *mode,

View File

@@ -39,7 +39,6 @@ typedef struct _MetaMonitorModeSpec
int width;
int height;
float refresh_rate;
MetaCrtcModeFlag flags;
} MetaMonitorModeSpec;
typedef struct _MetaMonitorCrtcMode
@@ -54,12 +53,6 @@ typedef gboolean (* MetaMonitorModeFunc) (MetaMonitor *monitor,
gpointer user_data,
GError **error);
typedef enum _MetaMonitorScalesConstraint
{
META_MONITOR_SCALES_CONSTRAINT_NONE = 0,
META_MONITOR_SCALES_CONSTRAINT_NO_FRAC = (1 << 0),
} MetaMonitorScalesConstraint;
#define META_TYPE_MONITOR (meta_monitor_get_type ())
G_DECLARE_DERIVABLE_TYPE (MetaMonitor, meta_monitor, META, MONITOR, GObject)
@@ -68,17 +61,15 @@ struct _MetaMonitorClass
GObjectClass parent_class;
MetaOutput * (* get_main_output) (MetaMonitor *monitor);
void (* derive_layout) (MetaMonitor *monitor,
MetaRectangle *layout);
void (* derive_dimensions) (MetaMonitor *monitor,
int *width,
int *height);
void (* calculate_crtc_pos) (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
MetaOutput *output,
MetaMonitorTransform crtc_transform,
int *out_x,
int *out_y);
gboolean (* get_suggested_position) (MetaMonitor *monitor,
int *width,
int *height);
};
#define META_TYPE_MONITOR_NORMAL (meta_monitor_normal_get_type ())
@@ -94,8 +85,7 @@ G_DECLARE_FINAL_TYPE (MetaMonitorTiled, meta_monitor_tiled,
MetaMonitorTiled * meta_monitor_tiled_new (MetaMonitorManager *monitor_manager,
MetaOutput *main_output);
MetaMonitorNormal * meta_monitor_normal_new (MetaMonitorManager *monitor_manager,
MetaOutput *output);
MetaMonitorNormal * meta_monitor_normal_new (MetaOutput *output);
MetaMonitorSpec * meta_monitor_get_spec (MetaMonitor *monitor);
@@ -117,8 +107,9 @@ void meta_monitor_get_current_resolution (MetaMonitor *monitor,
int *width,
int *height);
void meta_monitor_derive_layout (MetaMonitor *monitor,
MetaRectangle *layout);
void meta_monitor_derive_dimensions (MetaMonitor *monitor,
int *width,
int *height);
void meta_monitor_get_physical_dimensions (MetaMonitor *monitor,
int *width_mm,
@@ -144,9 +135,6 @@ gboolean meta_monitor_get_suggested_position (MetaMonitor *monitor,
MetaLogicalMonitor * meta_monitor_get_logical_monitor (MetaMonitor *monitor);
MetaMonitorMode * meta_monitor_get_mode_from_id (MetaMonitor *monitor,
const char *monitor_mode_id);
MetaMonitorMode * meta_monitor_get_mode_from_spec (MetaMonitor *monitor,
MetaMonitorModeSpec *monitor_mode_spec);
@@ -168,16 +156,6 @@ void meta_monitor_calculate_crtc_pos (MetaMonitor *monitor,
int *out_x,
int *out_y);
float meta_monitor_calculate_mode_scale (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode);
float * meta_monitor_calculate_supported_scales (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
MetaMonitorScalesConstraint constraints,
int *n_supported_scales);
const char * meta_monitor_mode_get_id (MetaMonitorMode *monitor_mode);
MetaMonitorModeSpec * meta_monitor_mode_get_spec (MetaMonitorMode *monitor_mode);
void meta_monitor_mode_get_resolution (MetaMonitorMode *monitor_mode,
@@ -186,8 +164,6 @@ void meta_monitor_mode_get_resolution (MetaMonitorMode *monitor_mode,
float meta_monitor_mode_get_refresh_rate (MetaMonitorMode *monitor_mode);
MetaCrtcModeFlag meta_monitor_mode_get_flags (MetaMonitorMode *monitor_mode);
gboolean meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
MetaMonitorMode *mode,
MetaMonitorModeFunc func,

View File

@@ -1,280 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2017 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include "config.h"
#include <gio/gio.h>
#include "backends/meta-orientation-manager.h"
enum
{
ORIENTATION_CHANGED,
N_SIGNALS
};
static guint signals[N_SIGNALS];
struct _MetaOrientationManager
{
GObject parent_instance;
GCancellable *cancellable;
guint iio_watch_id;
GDBusProxy *iio_proxy;
MetaOrientation prev_orientation;
MetaOrientation curr_orientation;
GSettings *settings;
};
G_DEFINE_TYPE (MetaOrientationManager, meta_orientation_manager, G_TYPE_OBJECT)
#define CONF_SCHEMA "org.gnome.settings-daemon.peripherals.touchscreen"
#define ORIENTATION_LOCK_KEY "orientation-lock"
static MetaOrientation
orientation_from_string (const char *orientation)
{
if (g_strcmp0 (orientation, "normal") == 0)
return META_ORIENTATION_NORMAL;
if (g_strcmp0 (orientation, "bottom-up") == 0)
return META_ORIENTATION_BOTTOM_UP;
if (g_strcmp0 (orientation, "left-up") == 0)
return META_ORIENTATION_LEFT_UP;
if (g_strcmp0 (orientation, "right-up") == 0)
return META_ORIENTATION_RIGHT_UP;
return META_ORIENTATION_UNDEFINED;
}
static void
read_iio_proxy (MetaOrientationManager *self)
{
gboolean has_accel = FALSE;
GVariant *v;
self->curr_orientation = META_ORIENTATION_UNDEFINED;
if (!self->iio_proxy)
return;
v = g_dbus_proxy_get_cached_property (self->iio_proxy, "HasAccelerometer");
if (v)
{
has_accel = g_variant_get_boolean (v);
g_variant_unref (v);
}
if (has_accel)
{
v = g_dbus_proxy_get_cached_property (self->iio_proxy, "AccelerometerOrientation");
if (v)
{
self->curr_orientation = orientation_from_string (g_variant_get_string (v, NULL));
g_variant_unref (v);
}
}
}
static void
sync_state (MetaOrientationManager *self)
{
read_iio_proxy (self);
if (self->prev_orientation == self->curr_orientation)
return;
self->prev_orientation = self->curr_orientation;
if (self->curr_orientation == META_ORIENTATION_UNDEFINED)
return;
if (g_settings_get_boolean (self->settings, ORIENTATION_LOCK_KEY))
return;
g_signal_emit (self, signals[ORIENTATION_CHANGED], 0);
}
static void
orientation_lock_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
sync_state (self);
}
static void
iio_properties_changed (GDBusProxy *proxy,
GVariant *changed_properties,
GStrv invalidated_properties,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
sync_state (self);
}
static void
accelerometer_claimed (GObject *source,
GAsyncResult *res,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
GVariant *v;
GError *error = NULL;
v = g_dbus_proxy_call_finish (G_DBUS_PROXY (source), res, &error);
if (!v)
{
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("Failed to claim accelerometer: %s", error->message);
g_error_free (error);
return;
}
g_variant_unref (v);
sync_state (self);
}
static void
iio_proxy_ready (GObject *source,
GAsyncResult *res,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
GDBusProxy *proxy;
GError *error = NULL;
proxy = g_dbus_proxy_new_finish (res, &error);
if (!proxy)
{
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("Failed to obtain IIO DBus proxy: %s", error->message);
g_error_free (error);
return;
}
self->iio_proxy = proxy;
g_signal_connect_object (self->iio_proxy, "g-properties-changed",
G_CALLBACK (iio_properties_changed), self, 0);
g_dbus_proxy_call (self->iio_proxy,
"ClaimAccelerometer",
NULL,
G_DBUS_CALL_FLAGS_NONE,
-1,
self->cancellable,
accelerometer_claimed,
self);
}
static void
iio_sensor_appeared_cb (GDBusConnection *connection,
const gchar *name,
const gchar *name_owner,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
self->cancellable = g_cancellable_new ();
g_dbus_proxy_new (connection,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
"net.hadess.SensorProxy",
"/net/hadess/SensorProxy",
"net.hadess.SensorProxy",
self->cancellable,
iio_proxy_ready,
self);
}
static void
iio_sensor_vanished_cb (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
g_cancellable_cancel (self->cancellable);
g_clear_object (&self->cancellable);
g_clear_object (&self->iio_proxy);
sync_state (self);
}
static void
meta_orientation_manager_init (MetaOrientationManager *self)
{
self->iio_watch_id = g_bus_watch_name (G_BUS_TYPE_SYSTEM,
"net.hadess.SensorProxy",
G_BUS_NAME_WATCHER_FLAGS_NONE,
iio_sensor_appeared_cb,
iio_sensor_vanished_cb,
self,
NULL);
self->settings = g_settings_new (CONF_SCHEMA);
g_signal_connect_object (self->settings, "changed::"ORIENTATION_LOCK_KEY,
G_CALLBACK (orientation_lock_changed), self, 0);
sync_state (self);
}
static void
meta_orientation_manager_finalize (GObject *object)
{
MetaOrientationManager *self = META_ORIENTATION_MANAGER (object);
g_cancellable_cancel (self->cancellable);
g_clear_object (&self->cancellable);
g_bus_unwatch_name (self->iio_watch_id);
g_clear_object (&self->iio_proxy);
g_clear_object (&self->settings);
G_OBJECT_CLASS (meta_orientation_manager_parent_class)->finalize (object);
}
static void
meta_orientation_manager_class_init (MetaOrientationManagerClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = meta_orientation_manager_finalize;
signals[ORIENTATION_CHANGED] =
g_signal_new ("orientation-changed",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
MetaOrientation
meta_orientation_manager_get_orientation (MetaOrientationManager *self)
{
return self->curr_orientation;
}

View File

@@ -1,40 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2017 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_ORIENTATION_MANAGER_H
#define META_ORIENTATION_MANAGER_H
typedef enum
{
META_ORIENTATION_UNDEFINED,
META_ORIENTATION_NORMAL,
META_ORIENTATION_BOTTOM_UP,
META_ORIENTATION_LEFT_UP,
META_ORIENTATION_RIGHT_UP
} MetaOrientation;
#define META_TYPE_ORIENTATION_MANAGER (meta_orientation_manager_get_type ())
G_DECLARE_FINAL_TYPE (MetaOrientationManager, meta_orientation_manager,
META, ORIENTATION_MANAGER, GObject)
MetaOrientation meta_orientation_manager_get_orientation (MetaOrientationManager *self);
#endif /* META_ORIENTATION_MANAGER_H */

View File

@@ -1,59 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2017 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_SETTINGS_PRIVATE_H
#define META_SETTINGS_PRIVATE_H
#include <glib-object.h>
#include "meta/meta-settings.h"
#include "meta/types.h"
typedef enum _MetaExperimentalFeature
{
META_EXPERIMENTAL_FEATURE_NONE = 0,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
} MetaExperimentalFeature;
#define META_TYPE_SETTINGS (meta_settings_get_type ())
G_DECLARE_FINAL_TYPE (MetaSettings, meta_settings,
META, SETTINGS, GObject)
MetaSettings * meta_settings_new (MetaBackend *backend);
void meta_settings_post_init (MetaSettings *settings);
void meta_settings_update_ui_scaling_factor (MetaSettings *settings);
gboolean meta_settings_get_global_scaling_factor (MetaSettings *settings,
int *scaing_factor);
gboolean meta_settings_is_experimental_feature_enabled (MetaSettings *settings,
MetaExperimentalFeature feature);
MetaExperimentalFeature meta_settings_get_experimental_features (MetaSettings *settings);
void meta_settings_override_experimental_features (MetaSettings *settings);
void meta_settings_enable_experimental_feature (MetaSettings *settings,
MetaExperimentalFeature feature);
#endif /* META_SETTINGS_PRIVATE_H */

View File

@@ -1,396 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2017 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include "config.h"
#include "backends/meta-settings-private.h"
#include <gio/gio.h>
#include "backends/meta-backend-private.h"
#include "backends/meta-logical-monitor.h"
#include "backends/meta-monitor-manager-private.h"
#include "ui/theme-private.h"
enum
{
UI_SCALING_FACTOR_CHANGED,
GLOBAL_SCALING_FACTOR_CHANGED,
FONT_DPI_CHANGED,
EXPERIMENTAL_FEATURES_CHANGED,
N_SIGNALS
};
static guint signals[N_SIGNALS];
struct _MetaSettings
{
GObject parent;
MetaBackend *backend;
GSettings *interface_settings;
GSettings *mutter_settings;
int ui_scaling_factor;
int global_scaling_factor;
int font_dpi;
MetaExperimentalFeature experimental_features;
gboolean experimental_features_overridden;
};
G_DEFINE_TYPE (MetaSettings, meta_settings, G_TYPE_OBJECT)
static int
calculate_ui_scaling_factor (MetaSettings *settings)
{
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (settings->backend);
GList *logical_monitors;
GList *l;
float max_scale = 1.0;
logical_monitors =
meta_monitor_manager_get_logical_monitors (monitor_manager);
for (l = logical_monitors; l; l = l->next)
{
MetaLogicalMonitor *logical_monitor = l->data;
max_scale = MAX (meta_logical_monitor_get_scale (logical_monitor),
max_scale);
}
g_warn_if_fail (fmodf (max_scale, 1.0) == 0.0);
return (int) max_scale;
}
static gboolean
update_ui_scaling_factor (MetaSettings *settings)
{
int ui_scaling_factor;
if (meta_is_stage_views_scaled ())
ui_scaling_factor = 1;
else
ui_scaling_factor = calculate_ui_scaling_factor (settings);
if (settings->ui_scaling_factor != ui_scaling_factor)
{
settings->ui_scaling_factor = ui_scaling_factor;
return TRUE;
}
else
{
return FALSE;
}
}
void
meta_settings_update_ui_scaling_factor (MetaSettings *settings)
{
if (update_ui_scaling_factor (settings))
g_signal_emit (settings, signals[UI_SCALING_FACTOR_CHANGED], 0);
}
int
meta_settings_get_ui_scaling_factor (MetaSettings *settings)
{
g_assert (settings->ui_scaling_factor != 0);
return settings->ui_scaling_factor;
}
static gboolean
update_global_scaling_factor (MetaSettings *settings)
{
int global_scaling_factor;
global_scaling_factor =
(int) g_settings_get_uint (settings->interface_settings,
"scaling-factor");
if (settings->global_scaling_factor != global_scaling_factor)
{
settings->global_scaling_factor = global_scaling_factor;
return TRUE;
}
else
{
return FALSE;
}
}
gboolean
meta_settings_get_global_scaling_factor (MetaSettings *settings,
int *out_scaling_factor)
{
if (settings->global_scaling_factor == 0)
return FALSE;
*out_scaling_factor = settings->global_scaling_factor;
return TRUE;
}
static gboolean
update_font_dpi (MetaSettings *settings)
{
double text_scaling_factor;
/* Number of logical pixels on an inch when unscaled */
const double dots_per_inch = 96;
/* Being based on Xft, API users expect the DPI to be 1/1024th of an inch. */
const double xft_factor = 1024;
int font_dpi;
text_scaling_factor = g_settings_get_double (settings->interface_settings,
"text-scaling-factor");
font_dpi = (int) (text_scaling_factor *
dots_per_inch *
xft_factor *
settings->ui_scaling_factor);
if (font_dpi != settings->font_dpi)
{
settings->font_dpi = font_dpi;
g_object_set (clutter_settings_get_default (),
"font-dpi", font_dpi,
NULL);
return TRUE;
}
else
{
return FALSE;
}
}
static void
meta_settings_update_font_dpi (MetaSettings *settings)
{
if (update_font_dpi (settings))
g_signal_emit (settings, signals[FONT_DPI_CHANGED], 0);
}
int
meta_settings_get_font_dpi (MetaSettings *settings)
{
g_assert (settings->font_dpi != 0);
return settings->font_dpi;
}
static void
interface_settings_changed (GSettings *interface_settings,
const char *key,
MetaSettings *settings)
{
if (g_str_equal (key, "scaling-factor"))
{
if (update_global_scaling_factor (settings))
g_signal_emit (settings, signals[GLOBAL_SCALING_FACTOR_CHANGED], 0);
}
else if (g_str_equal (key, "text-scaling-factor"))
{
meta_settings_update_font_dpi (settings);
}
}
gboolean
meta_settings_is_experimental_feature_enabled (MetaSettings *settings,
MetaExperimentalFeature feature)
{
return !!(settings->experimental_features & feature);
}
void
meta_settings_override_experimental_features (MetaSettings *settings)
{
settings->experimental_features = META_EXPERIMENTAL_FEATURE_NONE;
settings->experimental_features_overridden = TRUE;
}
void
meta_settings_enable_experimental_feature (MetaSettings *settings,
MetaExperimentalFeature feature)
{
g_assert (settings->experimental_features_overridden);
settings->experimental_features |= feature;
}
static gboolean
experimental_features_handler (GVariant *features_variant,
gpointer *result,
gpointer data)
{
MetaSettings *settings = data;
GVariantIter features_iter;
char *feature;
MetaExperimentalFeature features = META_EXPERIMENTAL_FEATURE_NONE;
if (settings->experimental_features_overridden)
{
*result = GINT_TO_POINTER (FALSE);
return TRUE;
}
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
g_info ("Unknown experimental feature '%s'\n", feature);
}
if (features != settings->experimental_features)
{
settings->experimental_features = features;
*result = GINT_TO_POINTER (TRUE);
}
else
{
*result = GINT_TO_POINTER (FALSE);
}
return TRUE;
}
static gboolean
update_experimental_features (MetaSettings *settings)
{
return GPOINTER_TO_INT (g_settings_get_mapped (settings->mutter_settings,
"experimental-features",
experimental_features_handler,
settings));
}
static void
mutter_settings_changed (GSettings *mutter_settings,
gchar *key,
MetaSettings *settings)
{
MetaExperimentalFeature old_experimental_features;
if (!g_str_equal (key, "experimental-features"))
return;
old_experimental_features = settings->experimental_features;
if (update_experimental_features (settings))
g_signal_emit (settings, signals[EXPERIMENTAL_FEATURES_CHANGED], 0,
(unsigned int) old_experimental_features);
}
MetaSettings *
meta_settings_new (MetaBackend *backend)
{
MetaSettings *settings;
settings = g_object_new (META_TYPE_SETTINGS, NULL);
settings->backend = backend;
return settings;
}
static void
meta_settings_dispose (GObject *object)
{
MetaSettings *settings = META_SETTINGS (object);
g_clear_object (&settings->mutter_settings);
g_clear_object (&settings->interface_settings);
G_OBJECT_CLASS (meta_settings_parent_class)->dispose (object);
}
static void
meta_settings_init (MetaSettings *settings)
{
settings->interface_settings = g_settings_new ("org.gnome.desktop.interface");
g_signal_connect (settings->interface_settings, "changed",
G_CALLBACK (interface_settings_changed),
settings);
settings->mutter_settings = g_settings_new ("org.gnome.mutter");
g_signal_connect (settings->mutter_settings, "changed",
G_CALLBACK (mutter_settings_changed),
settings);
/* Chain up inter-dependent settings. */
g_signal_connect (settings, "global-scaling-factor-changed",
G_CALLBACK (meta_settings_update_ui_scaling_factor), NULL);
g_signal_connect (settings, "ui-scaling-factor-changed",
G_CALLBACK (meta_settings_update_font_dpi), NULL);
update_global_scaling_factor (settings);
update_experimental_features (settings);
}
void
meta_settings_post_init (MetaSettings *settings)
{
update_ui_scaling_factor (settings);
update_font_dpi (settings);
}
static void
meta_settings_class_init (MetaSettingsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = meta_settings_dispose;
signals[UI_SCALING_FACTOR_CHANGED] =
g_signal_new ("ui-scaling-factor-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
signals[GLOBAL_SCALING_FACTOR_CHANGED] =
g_signal_new ("global-scaling-factor-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
signals[FONT_DPI_CHANGED] =
g_signal_new ("font-dpi-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
signals[EXPERIMENTAL_FEATURES_CHANGED] =
g_signal_new ("experimental-features-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_UINT);
}

View File

@@ -36,8 +36,8 @@ struct _MetaOverlay {
CoglPipeline *pipeline;
CoglTexture *texture;
ClutterRect current_rect;
ClutterRect previous_rect;
MetaRectangle current_rect;
MetaRectangle previous_rect;
gboolean previous_is_valid;
};
@@ -71,9 +71,9 @@ meta_overlay_free (MetaOverlay *overlay)
}
static void
meta_overlay_set (MetaOverlay *overlay,
CoglTexture *texture,
ClutterRect *rect)
meta_overlay_set (MetaOverlay *overlay,
CoglTexture *texture,
MetaRectangle *rect)
{
if (overlay->texture != texture)
{
@@ -104,12 +104,12 @@ meta_overlay_paint (MetaOverlay *overlay)
cogl_framebuffer_draw_rectangle (cogl_get_draw_framebuffer (),
overlay->pipeline,
overlay->current_rect.origin.x,
overlay->current_rect.origin.y,
(overlay->current_rect.origin.x +
overlay->current_rect.size.width),
(overlay->current_rect.origin.y +
overlay->current_rect.size.height));
overlay->current_rect.x,
overlay->current_rect.y,
overlay->current_rect.x +
overlay->current_rect.width,
overlay->current_rect.y +
overlay->current_rect.height);
overlay->previous_rect = overlay->current_rect;
overlay->previous_is_valid = TRUE;
@@ -204,10 +204,10 @@ queue_redraw_for_overlay (MetaStage *stage,
/* Clear the location the overlay was at before, if we need to. */
if (overlay->previous_is_valid)
{
clip.x = floorf (overlay->previous_rect.origin.x),
clip.y = floorf (overlay->previous_rect.origin.y),
clip.width = ceilf (overlay->previous_rect.size.width),
clip.height = ceilf (overlay->previous_rect.size.height),
clip.x = overlay->previous_rect.x;
clip.y = overlay->previous_rect.y;
clip.width = overlay->previous_rect.width;
clip.height = overlay->previous_rect.height;
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stage), &clip);
overlay->previous_is_valid = FALSE;
}
@@ -215,10 +215,10 @@ queue_redraw_for_overlay (MetaStage *stage,
/* Draw the overlay at the new position */
if (overlay->enabled)
{
clip.x = floorf (overlay->current_rect.origin.x),
clip.y = floorf (overlay->current_rect.origin.y),
clip.width = ceilf (overlay->current_rect.size.width),
clip.height = ceilf (overlay->current_rect.size.height),
clip.x = overlay->current_rect.x;
clip.y = overlay->current_rect.y;
clip.width = overlay->current_rect.width;
clip.height = overlay->current_rect.height;
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stage), &clip);
}
}
@@ -251,10 +251,10 @@ meta_stage_remove_cursor_overlay (MetaStage *stage,
}
void
meta_stage_update_cursor_overlay (MetaStage *stage,
MetaOverlay *overlay,
CoglTexture *texture,
ClutterRect *rect)
meta_stage_update_cursor_overlay (MetaStage *stage,
MetaOverlay *overlay,
CoglTexture *texture,
MetaRectangle *rect)
{
g_assert (meta_is_wayland_compositor () || texture == NULL);

View File

@@ -56,10 +56,10 @@ MetaOverlay *meta_stage_create_cursor_overlay (MetaStage *stage);
void meta_stage_remove_cursor_overlay (MetaStage *stage,
MetaOverlay *overlay);
void meta_stage_update_cursor_overlay (MetaStage *stage,
MetaOverlay *overlay,
CoglTexture *texture,
ClutterRect *rect);
void meta_stage_update_cursor_overlay (MetaStage *stage,
MetaOverlay *overlay,
CoglTexture *texture,
MetaRectangle *rect);
void meta_stage_set_active (MetaStage *stage,
gboolean is_active);

View File

@@ -45,7 +45,6 @@
#include "backends/meta-pointer-constraint.h"
#include "backends/meta-stage.h"
#include "backends/native/meta-clutter-backend-native.h"
#include "backends/native/meta-input-settings-native.h"
#include "backends/native/meta-renderer-native.h"
#include "backends/native/meta-stage-native.h"
@@ -341,9 +340,6 @@ relative_motion_filter (ClutterInputDevice *device,
MetaLogicalMonitor *logical_monitor, *dest_logical_monitor;
float new_dx, new_dy;
if (meta_is_stage_views_scaled ())
return;
logical_monitor = meta_monitor_manager_get_logical_monitor_at (monitor_manager,
x, y);
if (!logical_monitor)
@@ -435,12 +431,6 @@ meta_backend_native_create_renderer (MetaBackend *backend)
return META_RENDERER (renderer_native);
}
static MetaInputSettings *
meta_backend_native_create_input_settings (MetaBackend *backend)
{
return g_object_new (META_TYPE_INPUT_SETTINGS_NATIVE, NULL);
}
static void
meta_backend_native_warp_pointer (MetaBackend *backend,
int x,
@@ -507,24 +497,11 @@ meta_backend_native_get_keymap (MetaBackend *backend)
return clutter_evdev_get_keyboard_map (manager);
}
static xkb_layout_index_t
meta_backend_native_get_keymap_layout_group (MetaBackend *backend)
{
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
return clutter_evdev_get_keyboard_layout_index (manager);
}
static void
meta_backend_native_lock_layout_group (MetaBackend *backend,
guint idx)
{
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
xkb_layout_index_t old_idx;
old_idx = meta_backend_native_get_keymap_layout_group (backend);
if (old_idx == idx)
return;
clutter_evdev_set_keyboard_layout_index (manager, idx);
meta_backend_notify_keymap_layout_group_changed (backend, idx);
@@ -584,7 +561,6 @@ meta_backend_native_class_init (MetaBackendNativeClass *klass)
backend_class->create_monitor_manager = meta_backend_native_create_monitor_manager;
backend_class->create_cursor_renderer = meta_backend_native_create_cursor_renderer;
backend_class->create_renderer = meta_backend_native_create_renderer;
backend_class->create_input_settings = meta_backend_native_create_input_settings;
backend_class->warp_pointer = meta_backend_native_warp_pointer;
@@ -592,7 +568,6 @@ meta_backend_native_class_init (MetaBackendNativeClass *klass)
backend_class->set_keymap = meta_backend_native_set_keymap;
backend_class->get_keymap = meta_backend_native_get_keymap;
backend_class->get_keymap_layout_group = meta_backend_native_get_keymap_layout_group;
backend_class->lock_layout_group = meta_backend_native_lock_layout_group;
backend_class->get_relative_motion_deltas = meta_backend_native_get_relative_motion_deltas;
backend_class->update_screen_size = meta_backend_native_update_screen_size;
@@ -682,14 +657,11 @@ meta_backend_native_pause (MetaBackendNative *native)
meta_backend_get_monitor_manager (backend);
MetaMonitorManagerKms *monitor_manager_kms =
META_MONITOR_MANAGER_KMS (monitor_manager);
MetaRendererNative *renderer_native =
META_RENDERER_NATIVE (meta_backend_get_renderer (backend));
clutter_evdev_release_devices ();
clutter_egl_freeze_master_clock ();
meta_monitor_manager_kms_pause (monitor_manager_kms);
meta_renderer_native_pause (renderer_native);
}
void meta_backend_native_resume (MetaBackendNative *native)

View File

@@ -39,7 +39,6 @@
#include "backends/meta-monitor.h"
#include "backends/meta-monitor-manager-private.h"
#include "backends/native/meta-renderer-native.h"
#include "core/boxes-private.h"
#include "meta/boxes.h"
#ifndef DRM_CAP_CURSOR_WIDTH
@@ -221,7 +220,7 @@ typedef struct
{
MetaCursorRendererNative *in_cursor_renderer_native;
MetaLogicalMonitor *in_logical_monitor;
ClutterRect in_local_cursor_rect;
MetaRectangle in_local_cursor_rect;
MetaCursorSprite *in_cursor_sprite;
gboolean out_painted;
@@ -239,50 +238,43 @@ update_monitor_crtc_cursor (MetaMonitor *monitor,
data->in_cursor_renderer_native;
MetaCursorRendererNativePrivate *priv =
meta_cursor_renderer_native_get_instance_private (cursor_renderer_native);
ClutterRect scaled_crtc_rect;
float scale;
MetaRectangle scaled_crtc_rect;
int scale;
int crtc_x, crtc_y;
if (meta_is_stage_views_scaled ())
scale = meta_logical_monitor_get_scale (data->in_logical_monitor);
else
scale = 1.0;
scale = 1;
meta_monitor_calculate_crtc_pos (monitor, monitor_mode,
monitor_crtc_mode->output,
META_MONITOR_TRANSFORM_NORMAL,
&crtc_x, &crtc_y);
scaled_crtc_rect = (ClutterRect) {
.origin = {
.x = crtc_x / scale,
.y = crtc_y / scale
},
.size = {
.width = monitor_crtc_mode->crtc_mode->width / scale,
.height = monitor_crtc_mode->crtc_mode->height / scale
},
scaled_crtc_rect = (MetaRectangle) {
.x = crtc_x / scale,
.y = crtc_y / scale,
.width = monitor_crtc_mode->crtc_mode->width / scale,
.height = monitor_crtc_mode->crtc_mode->height / scale
};
if (priv->has_hw_cursor &&
clutter_rect_intersection (&scaled_crtc_rect,
&data->in_local_cursor_rect,
NULL))
meta_rectangle_overlap (&scaled_crtc_rect,
&data->in_local_cursor_rect))
{
float crtc_cursor_x, crtc_cursor_y;
int crtc_cursor_x, crtc_cursor_y;
set_crtc_cursor (data->in_cursor_renderer_native,
monitor_crtc_mode->output->crtc,
data->in_cursor_sprite);
crtc_cursor_x = (data->in_local_cursor_rect.origin.x -
scaled_crtc_rect.origin.x) * scale;
crtc_cursor_y = (data->in_local_cursor_rect.origin.y -
scaled_crtc_rect.origin.y) * scale;
crtc_cursor_x = (data->in_local_cursor_rect.x - scaled_crtc_rect.x) * scale;
crtc_cursor_y = (data->in_local_cursor_rect.y - scaled_crtc_rect.y) * scale;
drmModeMoveCursor (priv->drm_fd,
monitor_crtc_mode->output->crtc->crtc_id,
roundf (crtc_cursor_x),
roundf (crtc_cursor_y));
crtc_cursor_x,
crtc_cursor_y);
data->out_painted = data->out_painted || TRUE;
}
@@ -306,13 +298,13 @@ update_hw_cursor (MetaCursorRendererNative *native,
meta_backend_get_monitor_manager (backend);
GList *logical_monitors;
GList *l;
ClutterRect rect;
MetaRectangle rect;
gboolean painted = FALSE;
if (cursor_sprite)
rect = meta_cursor_renderer_calculate_rect (renderer, cursor_sprite);
else
rect = (ClutterRect) { 0 };
rect = (MetaRectangle) { 0 };
logical_monitors =
meta_monitor_manager_get_logical_monitors (monitor_manager);
@@ -326,12 +318,11 @@ update_hw_cursor (MetaCursorRendererNative *native,
data = (UpdateCrtcCursorData) {
.in_cursor_renderer_native = native,
.in_logical_monitor = logical_monitor,
.in_local_cursor_rect = (ClutterRect) {
.origin = {
.x = rect.origin.x - logical_monitor->rect.x,
.y = rect.origin.y - logical_monitor->rect.y
},
.size = rect.size
.in_local_cursor_rect = (MetaRectangle) {
.x = rect.x - logical_monitor->rect.x,
.y = rect.y - logical_monitor->rect.y,
.width = rect.width,
.height = rect.height
},
.in_cursor_sprite = cursor_sprite
};
@@ -383,37 +374,25 @@ has_valid_cursor_sprite_gbm_bo (MetaCursorSprite *cursor_sprite)
}
static gboolean
cursor_over_transformed_logical_monitor (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite)
cursor_over_transformed_crtc (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite)
{
MetaBackend *backend = meta_get_backend ();
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
GList *logical_monitors;
GList *l;
ClutterRect cursor_rect;
MetaMonitorManager *monitors;
MetaCrtc *crtcs;
unsigned int i, n_crtcs;
MetaRectangle rect;
cursor_rect = meta_cursor_renderer_calculate_rect (renderer, cursor_sprite);
logical_monitors =
meta_monitor_manager_get_logical_monitors (monitor_manager);
for (l = logical_monitors; l; l = l->next)
monitors = meta_monitor_manager_get ();
meta_monitor_manager_get_resources (monitors, NULL, NULL,
&crtcs, &n_crtcs, NULL, NULL);
rect = meta_cursor_renderer_calculate_rect (renderer, cursor_sprite);
for (i = 0; i < n_crtcs; i++)
{
MetaLogicalMonitor *logical_monitor = l->data;
MetaRectangle logical_monitor_layout;
ClutterRect logical_monitor_rect;
MetaMonitorTransform transform;
logical_monitor_layout =
meta_logical_monitor_get_layout (logical_monitor);
logical_monitor_rect =
meta_rectangle_to_clutter_rect (&logical_monitor_layout);
if (!clutter_rect_intersection (&cursor_rect, &logical_monitor_rect,
NULL))
if (!meta_rectangle_overlap (&rect, &crtcs[i].rect))
continue;
transform = meta_logical_monitor_get_transform (logical_monitor);
if (transform != META_MONITOR_TRANSFORM_NORMAL)
if (crtcs[i].transform != META_MONITOR_TRANSFORM_NORMAL)
return TRUE;
}
@@ -434,7 +413,7 @@ can_draw_cursor_unscaled (MetaCursorRenderer *renderer,
{
MetaBackend *backend;
MetaMonitorManager *monitor_manager;
ClutterRect cursor_rect;
MetaRectangle cursor_rect;
GList *logical_monitors;
GList *l;
gboolean has_visible_crtc_sprite = FALSE;
@@ -455,12 +434,8 @@ can_draw_cursor_unscaled (MetaCursorRenderer *renderer,
for (l = logical_monitors; l; l = l->next)
{
MetaLogicalMonitor *logical_monitor = l->data;
ClutterRect logical_monitor_rect =
meta_rectangle_to_clutter_rect (&logical_monitor->rect);
if (!clutter_rect_intersection (&cursor_rect,
&logical_monitor_rect,
NULL))
if (!meta_rectangle_overlap (&cursor_rect, &logical_monitor->rect))
continue;
if (calculate_cursor_crtc_sprite_scale (cursor_sprite,
@@ -487,7 +462,7 @@ should_have_hw_cursor (MetaCursorRenderer *renderer,
if (!cursor_sprite)
return FALSE;
if (cursor_over_transformed_logical_monitor (renderer, cursor_sprite))
if (cursor_over_transformed_crtc (renderer, cursor_sprite))
return FALSE;
texture = meta_cursor_sprite_get_cogl_texture (cursor_sprite);

View File

@@ -121,43 +121,6 @@ meta_input_settings_native_set_tap_enabled (MetaInputSettings *settings,
LIBINPUT_CONFIG_TAP_DISABLED);
}
static void
meta_input_settings_native_set_tap_and_drag_enabled (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled)
{
struct libinput_device *libinput_device;
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
if (!libinput_device)
return;
if (libinput_device_config_tap_get_finger_count (libinput_device) > 0)
libinput_device_config_tap_set_drag_enabled (libinput_device,
enabled ?
LIBINPUT_CONFIG_DRAG_ENABLED :
LIBINPUT_CONFIG_DRAG_DISABLED);
}
static void
meta_input_settings_native_set_disable_while_typing (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled)
{
struct libinput_device *libinput_device;
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
if (!libinput_device)
return;
if (libinput_device_config_dwt_is_available (libinput_device))
libinput_device_config_dwt_set_enabled (libinput_device,
enabled ?
LIBINPUT_CONFIG_DWT_ENABLED :
LIBINPUT_CONFIG_DWT_DISABLED);
}
static void
meta_input_settings_native_set_invert_scroll (MetaInputSettings *settings,
ClutterInputDevice *device,
@@ -469,18 +432,8 @@ meta_input_settings_native_set_tablet_area (MetaInputSettings *settings,
gdouble padding_bottom)
{
struct libinput_device *libinput_device;
gfloat scale_x;
gfloat scale_y;
gfloat offset_x;
gfloat offset_y;
scale_x = 1. / (1. - (padding_left + padding_right));
scale_y = 1. / (1. - (padding_top + padding_bottom));
offset_x = -padding_left * scale_x;
offset_y = -padding_top * scale_y;
gfloat matrix[6] = { scale_x, 0., offset_x,
0., scale_y, offset_y };
gfloat matrix[6] = { 1. - (padding_left + padding_right), 0., padding_left,
0., 1. - (padding_top + padding_bottom), padding_top };
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
if (!libinput_device ||
@@ -548,14 +501,12 @@ meta_input_settings_native_class_init (MetaInputSettingsNativeClass *klass)
input_settings_class->set_speed = meta_input_settings_native_set_speed;
input_settings_class->set_left_handed = meta_input_settings_native_set_left_handed;
input_settings_class->set_tap_enabled = meta_input_settings_native_set_tap_enabled;
input_settings_class->set_tap_and_drag_enabled = meta_input_settings_native_set_tap_and_drag_enabled;
input_settings_class->set_invert_scroll = meta_input_settings_native_set_invert_scroll;
input_settings_class->set_edge_scroll = meta_input_settings_native_set_edge_scroll;
input_settings_class->set_two_finger_scroll = meta_input_settings_native_set_two_finger_scroll;
input_settings_class->set_scroll_button = meta_input_settings_native_set_scroll_button;
input_settings_class->set_click_method = meta_input_settings_native_set_click_method;
input_settings_class->set_keyboard_repeat = meta_input_settings_native_set_keyboard_repeat;
input_settings_class->set_disable_while_typing = meta_input_settings_native_set_disable_while_typing;
input_settings_class->set_tablet_mapping = meta_input_settings_native_set_tablet_mapping;
input_settings_class->set_tablet_keep_aspect = meta_input_settings_native_set_tablet_keep_aspect;

View File

@@ -188,22 +188,9 @@ on_evdev_device_open (const char *path,
/* Allow readonly access to sysfs */
if (g_str_has_prefix (path, "/sys/"))
{
do
{
fd = open (path, flags);
}
while (fd < 0 && errno == EINTR);
if (fd < 0)
{
g_set_error (error,
G_FILE_ERROR,
g_file_error_from_errno (errno),
"Could not open /sys file: %s: %m", path);
return -1;
}
g_hash_table_add (self->sysfs_fds, GINT_TO_POINTER (fd));
fd = open (path, flags);
if (fd >= 0)
g_hash_table_add (self->sysfs_fds, GINT_TO_POINTER (fd));
return fd;
}

View File

@@ -24,6 +24,7 @@
#include "config.h"
#include "meta-monitor-manager-kms.h"
#include "meta-monitor-config.h"
#include "meta-monitor-config-manager.h"
#include "meta-backend-private.h"
#include "meta-renderer-native.h"
@@ -51,6 +52,11 @@
#define ALL_TRANSFORMS_MASK ((1 << ALL_TRANSFORMS) - 1)
#define SYNC_TOLERANCE 0.01 /* 1 percent */
static float supported_scales_kms[] = {
1.0,
2.0
};
typedef struct
{
drmModeConnector *connector;
@@ -109,6 +115,8 @@ struct _MetaMonitorManagerKms
GUdevClient *udev;
guint uevent_handler_id;
GSettings *desktop_settings;
gboolean page_flips_not_supported;
int max_buffer_width;
@@ -1090,7 +1098,7 @@ init_outputs (MetaMonitorManager *manager,
MetaOutput *old_output;
old_output = find_output_by_id (old_outputs, n_old_outputs,
connector->connector_id);
output->winsys_id);
init_output (output, manager, connector, old_output);
n_actual_outputs++;
}
@@ -1252,7 +1260,10 @@ meta_monitor_manager_kms_ensure_initial_config (MetaMonitorManager *manager)
config = meta_monitor_manager_ensure_configured (manager);
meta_monitor_manager_update_logical_state (manager, config);
if (meta_is_monitor_config_manager_enabled ())
meta_monitor_manager_update_logical_state (manager, config);
else
meta_monitor_manager_update_logical_state_derived (manager);
}
static void
@@ -1458,6 +1469,37 @@ meta_monitor_manager_kms_apply_monitors_config (MetaMonitorManager *manager
return TRUE;
}
static void
legacy_calculate_screen_size (MetaMonitorManager *manager)
{
unsigned int i;
int width = 0, height = 0;
for (i = 0; i < manager->n_crtcs; i++)
{
MetaCrtc *crtc = &manager->crtcs[i];
width = MAX (width, crtc->rect.x + crtc->rect.width);
height = MAX (height, crtc->rect.y + crtc->rect.height);
}
manager->screen_width = width;
manager->screen_height = height;
}
static void
meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs)
{
apply_crtc_assignments (manager, crtcs, n_crtcs, outputs, n_outputs);
legacy_calculate_screen_size (manager);
meta_monitor_manager_rebuild_derived (manager);
}
static void
meta_monitor_manager_kms_get_crtc_gamma (MetaMonitorManager *manager,
MetaCrtc *crtc,
@@ -1597,6 +1639,8 @@ meta_monitor_manager_kms_init (MetaMonitorManagerKms *manager_kms)
G_IO_IN | G_IO_ERR);
manager_kms->source->manager_kms = manager_kms;
g_source_attach (source, NULL);
manager_kms->desktop_settings = g_settings_new ("org.gnome.desktop.interface");
}
static void
@@ -1788,50 +1832,113 @@ meta_monitor_manager_kms_is_transform_handled (MetaMonitorManager *manager,
return FALSE;
}
static float
/* The minimum resolution at which we turn on a window-scale of 2 */
#define HIDPI_LIMIT 192
/* The minimum screen height at which we turn on a window-scale of 2;
* below this there just isn't enough vertical real estate for GNOME
* apps to work, and it's better to just be tiny */
#define HIDPI_MIN_HEIGHT 1200
/* From http://en.wikipedia.org/wiki/4K_resolution#Resolutions_of_common_formats */
#define SMALLEST_4K_WIDTH 3656
static int
compute_scale (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
int resolution_width, resolution_height;
int width_mm, height_mm;
int scale;
scale = 1;
meta_monitor_mode_get_resolution (monitor_mode,
&resolution_width,
&resolution_height);
if (resolution_height < HIDPI_MIN_HEIGHT)
goto out;
/* 4K TV */
switch (meta_monitor_get_connector_type (monitor))
{
case META_CONNECTOR_TYPE_HDMIA:
case META_CONNECTOR_TYPE_HDMIB:
if (resolution_width >= SMALLEST_4K_WIDTH)
goto out;
break;
default:
break;
}
meta_monitor_get_physical_dimensions (monitor, &width_mm, &height_mm);
/*
* Somebody encoded the aspect ratio (16/9 or 16/10) instead of the physical
* size.
*/
if ((width_mm == 160 && height_mm == 90) ||
(width_mm == 160 && height_mm == 100) ||
(width_mm == 16 && height_mm == 9) ||
(width_mm == 16 && height_mm == 10))
goto out;
if (width_mm > 0 && height_mm > 0)
{
double dpi_x, dpi_y;
dpi_x = (double) resolution_width / (width_mm / 25.4);
dpi_y = (double) resolution_height / (height_mm / 25.4);
/*
* We don't completely trust these values so both must be high, and never
* pick higher ratio than 2 automatically.
*/
if (dpi_x > HIDPI_LIMIT && dpi_y > HIDPI_LIMIT)
scale = 2;
}
out:
return scale;
}
static int
meta_monitor_manager_kms_calculate_monitor_mode_scale (MetaMonitorManager *manager,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
return meta_monitor_calculate_mode_scale (monitor, monitor_mode);
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
int global_scale;
global_scale = g_settings_get_uint (manager_kms->desktop_settings,
"scaling-factor");
if (global_scale > 0)
return global_scale;
else
return compute_scale (monitor, monitor_mode);
}
static float *
meta_monitor_manager_kms_calculate_supported_scales (MetaMonitorManager *manager,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
int *n_supported_scales)
static void
meta_monitor_manager_kms_get_supported_scales (MetaMonitorManager *manager,
float **scales,
int *n_scales)
{
MetaMonitorScalesConstraint constraints =
META_MONITOR_SCALES_CONSTRAINT_NONE;
switch (layout_mode)
{
case META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL:
break;
case META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL:
constraints |= META_MONITOR_SCALES_CONSTRAINT_NO_FRAC;
break;
}
return meta_monitor_calculate_supported_scales (monitor, monitor_mode,
constraints,
n_supported_scales);
*scales = supported_scales_kms;
*n_scales = G_N_ELEMENTS (supported_scales_kms);
}
static MetaMonitorManagerCapability
meta_monitor_manager_kms_get_capabilities (MetaMonitorManager *manager)
{
MetaBackend *backend = meta_get_backend ();
MetaSettings *settings = meta_backend_get_settings (backend);
MetaRenderer *renderer = meta_backend_get_renderer (backend);
MetaRendererNative *renderer_native = META_RENDERER_NATIVE (renderer);
MetaMonitorManagerCapability capabilities =
META_MONITOR_MANAGER_CAPABILITY_NONE;
if (meta_settings_is_experimental_feature_enabled (
settings,
if (meta_backend_is_experimental_feature_enabled (
backend,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER))
capabilities |= META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE;
@@ -1868,14 +1975,11 @@ meta_monitor_manager_kms_get_max_screen_size (MetaMonitorManager *manager,
static MetaLogicalMonitorLayoutMode
meta_monitor_manager_kms_get_default_layout_mode (MetaMonitorManager *manager)
{
MetaBackend *backend = meta_get_backend ();
MetaSettings *settings = meta_backend_get_settings (backend);
if (!meta_is_stage_views_enabled ())
return META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL;
if (meta_settings_is_experimental_feature_enabled (
settings,
if (meta_backend_is_experimental_feature_enabled (
meta_get_backend (),
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER))
return META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL;
else
@@ -1888,6 +1992,7 @@ meta_monitor_manager_kms_dispose (GObject *object)
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (object);
g_clear_object (&manager_kms->udev);
g_clear_object (&manager_kms->desktop_settings);
G_OBJECT_CLASS (meta_monitor_manager_kms_parent_class)->dispose (object);
}
@@ -1916,12 +2021,13 @@ meta_monitor_manager_kms_class_init (MetaMonitorManagerKmsClass *klass)
manager_class->read_edid = meta_monitor_manager_kms_read_edid;
manager_class->ensure_initial_config = meta_monitor_manager_kms_ensure_initial_config;
manager_class->apply_monitors_config = meta_monitor_manager_kms_apply_monitors_config;
manager_class->apply_configuration = meta_monitor_manager_kms_apply_configuration;
manager_class->set_power_save_mode = meta_monitor_manager_kms_set_power_save_mode;
manager_class->get_crtc_gamma = meta_monitor_manager_kms_get_crtc_gamma;
manager_class->set_crtc_gamma = meta_monitor_manager_kms_set_crtc_gamma;
manager_class->is_transform_handled = meta_monitor_manager_kms_is_transform_handled;
manager_class->calculate_monitor_mode_scale = meta_monitor_manager_kms_calculate_monitor_mode_scale;
manager_class->calculate_supported_scales = meta_monitor_manager_kms_calculate_supported_scales;
manager_class->get_supported_scales = meta_monitor_manager_kms_get_supported_scales;
manager_class->get_capabilities = meta_monitor_manager_kms_get_capabilities;
manager_class->get_max_screen_size = meta_monitor_manager_kms_get_max_screen_size;
manager_class->get_default_layout_mode = meta_monitor_manager_kms_get_default_layout_mode;

View File

@@ -1707,7 +1707,7 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
MetaMonitorTransform view_transform;
CoglOnscreen *onscreen = NULL;
CoglOffscreen *offscreen = NULL;
float scale;
int scale;
int width, height;
MetaRendererView *view;
GError *error = NULL;
@@ -1715,9 +1715,9 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
view_transform = calculate_view_transform (monitor_manager, logical_monitor);
if (meta_is_stage_views_scaled ())
scale = meta_logical_monitor_get_scale (logical_monitor);
scale = logical_monitor->scale;
else
scale = 1.0;
scale = 1;
width = logical_monitor->rect.width * scale;
height = logical_monitor->rect.height * scale;
@@ -1786,24 +1786,6 @@ meta_renderer_native_get_frame_counter (MetaRendererNative *renderer_native)
return renderer_native->frame_counter;
}
void
meta_renderer_native_pause (MetaRendererNative *renderer_native)
{
GList *views;
GList *l;
views = meta_renderer_get_views (META_RENDERER (renderer_native));
for (l = views; l; l = l->next)
{
ClutterStageView *stage_view = l->data;
g_object_set (G_OBJECT (stage_view),
"framebuffer", NULL,
"offscreen", NULL,
NULL);
}
}
static void
meta_renderer_native_get_property (GObject *object,
guint prop_id,
@@ -2088,23 +2070,16 @@ meta_renderer_native_initable_init (GInitable *initable,
GError *egl_device_error = NULL;
#endif
#ifdef HAVE_EGL_DEVICE
/* Try to initialize the EGLDevice backend first. Whenever we use a
* non-NVIDIA GPU, the EGLDevice enumeration function won't find a match, and
* we'll fall back to GBM (which will always succeed as it has a software
* rendering fallback)
*/
if (init_egl_device (renderer_native, &egl_device_error))
return TRUE;
#endif
if (init_gbm (renderer_native, &gbm_error))
{
return TRUE;
#ifdef HAVE_EGL_DEVICE
g_error_free (egl_device_error);
#endif
if (init_egl_device (renderer_native, &egl_device_error))
{
g_error_free (gbm_error);
return TRUE;
}
#endif
g_set_error (error, G_IO_ERROR,
G_IO_ERROR_FAILED,

View File

@@ -71,6 +71,4 @@ void meta_renderer_native_finish_frame (MetaRendererNative *renderer_native);
int64_t meta_renderer_native_get_frame_counter (MetaRendererNative *renderer_native);
void meta_renderer_native_pause (MetaRendererNative *renderer_native);
#endif /* META_RENDERER_NATIVE_H */

View File

@@ -28,7 +28,6 @@
#include "backends/meta-backend-private.h"
#include "backends/x11/meta-cursor-renderer-x11.h"
#include "backends/x11/meta-input-settings-x11.h"
#include "backends/x11/meta-monitor-manager-xrandr.h"
#include "backends/x11/cm/meta-renderer-x11-cm.h"
@@ -109,12 +108,6 @@ meta_backend_x11_cm_create_cursor_renderer (MetaBackend *backend)
return g_object_new (META_TYPE_CURSOR_RENDERER_X11, NULL);
}
static MetaInputSettings *
meta_backend_x11_cm_create_input_settings (MetaBackend *backend)
{
return g_object_new (META_TYPE_INPUT_SETTINGS_X11, NULL);
}
static void
meta_backend_x11_cm_update_screen_size (MetaBackend *backend,
int width,
@@ -397,7 +390,6 @@ meta_backend_x11_cm_class_init (MetaBackendX11CmClass *klass)
backend_class->create_renderer = meta_backend_x11_cm_create_renderer;
backend_class->create_monitor_manager = meta_backend_x11_cm_create_monitor_manager;
backend_class->create_cursor_renderer = meta_backend_x11_cm_create_cursor_renderer;
backend_class->create_input_settings = meta_backend_x11_cm_create_input_settings;
backend_class->update_screen_size = meta_backend_x11_cm_update_screen_size;
backend_class->select_stage_events = meta_backend_x11_cm_select_stage_events;
backend_class->lock_layout_group = meta_backend_x11_cm_lock_layout_group;

View File

@@ -67,21 +67,12 @@ struct _MetaBackendX11Private
uint8_t xkb_error_base;
struct xkb_keymap *keymap;
xkb_layout_index_t keymap_layout_group;
MetaLogicalMonitor *cached_current_logical_monitor;
};
typedef struct _MetaBackendX11Private MetaBackendX11Private;
static GInitableIface *initable_parent_iface;
static void
initable_iface_init (GInitableIface *initable_iface);
G_DEFINE_TYPE_WITH_CODE (MetaBackendX11, meta_backend_x11, META_TYPE_BACKEND,
G_ADD_PRIVATE (MetaBackendX11)
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
initable_iface_init));
G_DEFINE_TYPE_WITH_PRIVATE (MetaBackendX11, meta_backend_x11, META_TYPE_BACKEND);
static void
handle_alarm_notify (MetaBackend *backend,
@@ -289,22 +280,6 @@ handle_host_xevent (MetaBackend *backend,
case XkbMapNotify:
keymap_changed (backend);
break;
case XkbStateNotify:
if (xkb_ev->state.changed & XkbGroupLockMask)
{
int layout_group;
gboolean layout_group_changed;
layout_group = xkb_ev->state.locked_group;
layout_group_changed =
(int) priv->keymap_layout_group != layout_group;
priv->keymap_layout_group = layout_group;
if (layout_group_changed)
meta_backend_notify_keymap_layout_group_changed (backend,
layout_group);
}
break;
default:
break;
}
@@ -417,6 +392,8 @@ meta_backend_x11_post_init (MetaBackend *backend)
int major, minor;
gboolean has_xi = FALSE;
priv->xdisplay = clutter_x11_get_default_display ();
priv->source = x_event_source_new (backend);
if (!XSyncQueryExtension (priv->xdisplay, &priv->xsync_event_base, &priv->xsync_error_base) ||
@@ -441,6 +418,7 @@ meta_backend_x11_post_init (MetaBackend *backend)
if (!has_xi)
meta_fatal ("X server doesn't have the XInput extension, version 2.2 or newer\n");
priv->xcb = XGetXCBConnection (priv->xdisplay);
if (!xkb_x11_setup_xkb_extension (priv->xcb,
XKB_X11_MIN_MAJOR_XKB_VERSION,
XKB_X11_MIN_MINOR_XKB_VERSION,
@@ -584,15 +562,6 @@ meta_backend_x11_get_keymap (MetaBackend *backend)
return priv->keymap;
}
static xkb_layout_index_t
meta_backend_x11_get_keymap_layout_group (MetaBackend *backend)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
return priv->keymap_layout_group;
}
static void
meta_backend_x11_set_numlock (MetaBackend *backend,
gboolean numlock_state)
@@ -617,68 +586,6 @@ meta_backend_x11_get_xkb_event_base (MetaBackendX11 *x11)
return priv->xkb_event_base;
}
static void
init_xkb_state (MetaBackendX11 *x11)
{
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
struct xkb_keymap *keymap;
int32_t device_id;
struct xkb_state *state;
keymap = meta_backend_get_keymap (META_BACKEND (x11));
device_id = xkb_x11_get_core_keyboard_device_id (priv->xcb);
state = xkb_x11_state_new_from_device (keymap, priv->xcb, device_id);
priv->keymap_layout_group =
xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_LOCKED);
xkb_state_unref (state);
}
static gboolean
meta_backend_x11_initable_init (GInitable *initable,
GCancellable *cancellable,
GError **error)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (initable);
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
Display *xdisplay;
const char *xdisplay_name;
xdisplay_name = g_getenv ("DISPLAY");
if (!xdisplay_name)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Unable to open display, DISPLAY not set");
return FALSE;
}
xdisplay = XOpenDisplay (xdisplay_name);
if (!xdisplay)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Unable to open display '%s'", xdisplay_name);
return FALSE;
}
priv->xdisplay = xdisplay;
priv->xcb = XGetXCBConnection (priv->xdisplay);
clutter_x11_set_display (xdisplay);
init_xkb_state (x11);
return initable_parent_iface->init (initable, cancellable, error);
}
static void
initable_iface_init (GInitableIface *initable_iface)
{
initable_parent_iface = g_type_interface_peek_parent (initable_iface);
initable_iface->init = meta_backend_x11_initable_init;
}
static void
meta_backend_x11_class_init (MetaBackendX11Class *klass)
{
@@ -692,7 +599,6 @@ meta_backend_x11_class_init (MetaBackendX11Class *klass)
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;
backend_class->get_keymap_layout_group = meta_backend_x11_get_keymap_layout_group;
backend_class->set_numlock = meta_backend_x11_set_numlock;
}

View File

@@ -189,14 +189,9 @@ meta_input_settings_x11_set_left_handed (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled)
{
ClutterInputDeviceType device_type;
guchar value;
device_type = clutter_input_device_get_device_type (device);
if (device_type == CLUTTER_TABLET_DEVICE ||
device_type == CLUTTER_PEN_DEVICE ||
device_type == CLUTTER_ERASER_DEVICE)
if (clutter_input_device_get_device_type (device) == CLUTTER_TABLET_DEVICE)
{
value = enabled ? 3 : 0;
change_property (device, "Wacom Rotation",
@@ -210,17 +205,6 @@ meta_input_settings_x11_set_left_handed (MetaInputSettings *settings,
}
}
static void
meta_input_settings_x11_set_disable_while_typing (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled)
{
guchar value = (enabled) ? 1 : 0;
change_property (device, "libinput Disable While Typing Enabled",
XA_INTEGER, 8, &value, 1);
}
static void
meta_input_settings_x11_set_tap_enabled (MetaInputSettings *settings,
ClutterInputDevice *device,
@@ -232,17 +216,6 @@ meta_input_settings_x11_set_tap_enabled (MetaInputSettings *settings,
XA_INTEGER, 8, &value, 1);
}
static void
meta_input_settings_x11_set_tap_and_drag_enabled (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled)
{
guchar value = (enabled) ? 1 : 0;
change_property (device, "libinput TappingDrag Enabled",
XA_INTEGER, 8, &value, 1);
}
static void
meta_input_settings_x11_set_invert_scroll (MetaInputSettings *settings,
ClutterInputDevice *device,
@@ -562,21 +535,10 @@ meta_input_settings_x11_set_tablet_mapping (MetaInputSettings *settings,
g_warning ("Could not set tablet mapping for %s",
clutter_input_device_get_device_name (device));
}
else
{
ClutterInputDeviceMapping dev_mapping;
dev_mapping = (mapping == G_DESKTOP_TABLET_MAPPING_ABSOLUTE) ?
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE :
CLUTTER_INPUT_DEVICE_MAPPING_RELATIVE;
clutter_input_device_set_mapping_mode (device, dev_mapping);
}
}
static gboolean
device_query_area (ClutterInputDevice *device,
gint *x,
gint *y,
gint *width,
gint *height)
{
@@ -602,15 +564,9 @@ device_query_area (ClutterInputDevice *device,
if (valuator->type != XIValuatorClass)
continue;
if (valuator->label == abs_x)
{
*x = valuator->min;
*width = valuator->max - valuator->min;
}
*width = valuator->max - valuator->min;
else if (valuator->label == abs_y)
{
*y = valuator->min;
*height = valuator->max - valuator->min;
}
*height = valuator->max - valuator->min;
}
XIFreeDeviceInfo (info);
@@ -634,15 +590,15 @@ meta_input_settings_x11_set_tablet_area (MetaInputSettings *settings,
gdouble padding_top,
gdouble padding_bottom)
{
gint32 x, y, width, height, area[4] = { 0 };
gint32 width, height, area[4] = { 0 };
if (!device_query_area (device, &x, &y, &width, &height))
if (!device_query_area (device, &width, &height))
return;
area[0] = (width * padding_left) + x;
area[1] = (height * padding_top) + y;
area[2] = width - (width * padding_right) + x;
area[3] = height - (height * padding_bottom) + y;
area[0] = width * padding_left;
area[1] = height * padding_top;
area[2] = width - (width * padding_right);
area[2] = height - (height * padding_bottom);
update_tablet_area (settings, device, area);
}
@@ -652,9 +608,9 @@ meta_input_settings_x11_set_tablet_keep_aspect (MetaInputSettings *settings,
MetaLogicalMonitor *logical_monitor,
gboolean keep_aspect)
{
gint32 width, height, dev_x, dev_y, dev_width, dev_height, area[4] = { 0 };
gint32 width, height, dev_width, dev_height, area[4] = { 0 };
if (!device_query_area (device, &dev_x, &dev_y, &dev_width, &dev_height))
if (!device_query_area (device, &dev_width, &dev_height))
return;
if (keep_aspect)
@@ -686,10 +642,8 @@ meta_input_settings_x11_set_tablet_keep_aspect (MetaInputSettings *settings,
dev_height = dev_width / aspect_ratio;
}
area[0] = dev_x;
area[1] = dev_y;
area[2] = dev_width + dev_x;
area[3] = dev_height + dev_y;
area[2] = dev_width;
area[3] = dev_height;
update_tablet_area (settings, device, area);
}
@@ -790,8 +744,6 @@ meta_input_settings_x11_class_init (MetaInputSettingsX11Class *klass)
input_settings_class->set_speed = meta_input_settings_x11_set_speed;
input_settings_class->set_left_handed = meta_input_settings_x11_set_left_handed;
input_settings_class->set_tap_enabled = meta_input_settings_x11_set_tap_enabled;
input_settings_class->set_tap_and_drag_enabled = meta_input_settings_x11_set_tap_and_drag_enabled;
input_settings_class->set_disable_while_typing = meta_input_settings_x11_set_disable_while_typing;
input_settings_class->set_invert_scroll = meta_input_settings_x11_set_invert_scroll;
input_settings_class->set_edge_scroll = meta_input_settings_x11_set_edge_scroll;
input_settings_class->set_two_finger_scroll = meta_input_settings_x11_set_two_finger_scroll;

View File

@@ -33,16 +33,15 @@
#include <clutter/clutter.h>
#include <X11/Xatom.h>
#include <X11/Xlibint.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/dpms.h>
#include <X11/extensions/extutil.h>
#include <X11/Xlib-xcb.h>
#include <xcb/randr.h>
#include "meta-backend-x11.h"
#include <meta/main.h>
#include <meta/errors.h>
#include "meta-monitor-config.h"
#include "backends/meta-monitor-config-manager.h"
#include "backends/meta-logical-monitor.h"
@@ -53,6 +52,10 @@
* for the reasoning */
#define DPI_FALLBACK 96.0
static float supported_scales_xrandr[] = {
1.0
};
struct _MetaMonitorManagerXrandr
{
MetaMonitorManager parent_instance;
@@ -63,8 +66,6 @@ struct _MetaMonitorManagerXrandr
int rr_error_base;
gboolean has_randr15;
xcb_timestamp_t last_xrandr_set_timestamp;
#ifdef HAVE_XRANDR15
GHashTable *tiled_monitor_atoms;
#endif /* HAVE_XRANDR15 */
@@ -354,7 +355,7 @@ output_get_backlight_limits_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
{
Atom atom;
xcb_connection_t *xcb_conn;
g_autofree xcb_randr_query_output_property_reply_t *reply = NULL;
g_autofree xcb_randr_query_output_property_reply_t *reply;
atom = XInternAtom (manager_xrandr->xdisplay, "Backlight", False);
@@ -654,63 +655,63 @@ output_get_connector_type (MetaMonitorManagerXrandr *manager_xrandr,
static void
output_get_modes (MetaMonitorManager *manager,
MetaOutput *output,
XRROutputInfo *xrandr_output)
MetaOutput *meta_output,
XRROutputInfo *output)
{
guint j, k;
guint n_actual_modes;
output->modes = g_new0 (MetaCrtcMode *, xrandr_output->nmode);
meta_output->modes = g_new0 (MetaCrtcMode *, output->nmode);
n_actual_modes = 0;
for (j = 0; j < (guint)xrandr_output->nmode; j++)
for (j = 0; j < (guint)output->nmode; j++)
{
for (k = 0; k < manager->n_modes; k++)
{
if (xrandr_output->modes[j] == (XID)manager->modes[k].mode_id)
if (output->modes[j] == (XID)manager->modes[k].mode_id)
{
output->modes[n_actual_modes] = &manager->modes[k];
meta_output->modes[n_actual_modes] = &manager->modes[k];
n_actual_modes += 1;
break;
}
}
}
output->n_modes = n_actual_modes;
meta_output->n_modes = n_actual_modes;
if (n_actual_modes > 0)
output->preferred_mode = output->modes[0];
meta_output->preferred_mode = meta_output->modes[0];
}
static void
output_get_crtcs (MetaMonitorManager *manager,
MetaOutput *output,
XRROutputInfo *xrandr_output)
MetaOutput *meta_output,
XRROutputInfo *output)
{
guint j, k;
guint n_actual_crtcs;
output->possible_crtcs = g_new0 (MetaCrtc *, xrandr_output->ncrtc);
meta_output->possible_crtcs = g_new0 (MetaCrtc *, output->ncrtc);
n_actual_crtcs = 0;
for (j = 0; j < (unsigned) xrandr_output->ncrtc; j++)
for (j = 0; j < (unsigned)output->ncrtc; j++)
{
for (k = 0; k < manager->n_crtcs; k++)
{
if ((XID) manager->crtcs[k].crtc_id == xrandr_output->crtcs[j])
if ((XID)manager->crtcs[k].crtc_id == output->crtcs[j])
{
output->possible_crtcs[n_actual_crtcs] = &manager->crtcs[k];
meta_output->possible_crtcs[n_actual_crtcs] = &manager->crtcs[k];
n_actual_crtcs += 1;
break;
}
}
}
output->n_possible_crtcs = n_actual_crtcs;
meta_output->n_possible_crtcs = n_actual_crtcs;
output->crtc = NULL;
meta_output->crtc = NULL;
for (j = 0; j < manager->n_crtcs; j++)
{
if ((XID) manager->crtcs[j].crtc_id == xrandr_output->crtc)
if ((XID)manager->crtcs[j].crtc_id == output->crtc)
{
output->crtc = &manager->crtcs[j];
meta_output->crtc = &manager->crtcs[j];
break;
}
}
@@ -849,73 +850,67 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
n_actual_outputs = 0;
for (i = 0; i < (unsigned)resources->noutput; i++)
{
XRROutputInfo *xrandr_output;
MetaOutput *output;
XRROutputInfo *output;
MetaOutput *meta_output;
xrandr_output = XRRGetOutputInfo (manager_xrandr->xdisplay,
resources, resources->outputs[i]);
if (!xrandr_output)
output = XRRGetOutputInfo (manager_xrandr->xdisplay, resources, resources->outputs[i]);
if (!output)
continue;
output = &manager->outputs[n_actual_outputs];
meta_output = &manager->outputs[n_actual_outputs];
if (xrandr_output->connection != RR_Disconnected)
if (output->connection != RR_Disconnected)
{
GBytes *edid;
output->winsys_id = resources->outputs[i];
output->name = g_strdup (xrandr_output->name);
meta_output->winsys_id = resources->outputs[i];
meta_output->name = g_strdup (output->name);
edid = read_output_edid (manager_xrandr, output->winsys_id);
meta_output_parse_edid (output, edid);
edid = read_output_edid (manager_xrandr, meta_output->winsys_id);
meta_output_parse_edid (meta_output, edid);
g_bytes_unref (edid);
output->width_mm = xrandr_output->mm_width;
output->height_mm = xrandr_output->mm_height;
output->subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN;
output->hotplug_mode_update =
output_get_hotplug_mode_update (manager_xrandr, output);
output->suggested_x = output_get_suggested_x (manager_xrandr, output);
output->suggested_y = output_get_suggested_y (manager_xrandr, output);
output->connector_type = output_get_connector_type (manager_xrandr,
output);
meta_output->width_mm = output->mm_width;
meta_output->height_mm = output->mm_height;
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN;
meta_output->hotplug_mode_update = output_get_hotplug_mode_update (manager_xrandr, meta_output);
meta_output->suggested_x = output_get_suggested_x (manager_xrandr, meta_output);
meta_output->suggested_y = output_get_suggested_y (manager_xrandr, meta_output);
meta_output->connector_type = output_get_connector_type (manager_xrandr, meta_output);
output_get_tile_info (manager_xrandr, output);
output_get_modes (manager, output, xrandr_output);
output_get_crtcs (manager, output, xrandr_output);
output_get_tile_info (manager_xrandr, meta_output);
output_get_modes (manager, meta_output, output);
output_get_crtcs (manager, meta_output, output);
output->n_possible_clones = xrandr_output->nclone;
output->possible_clones = g_new0 (MetaOutput *,
output->n_possible_clones);
meta_output->n_possible_clones = output->nclone;
meta_output->possible_clones = g_new0 (MetaOutput *, meta_output->n_possible_clones);
/* We can build the list of clones now, because we don't have the list of outputs
yet, so temporarily set the pointers to the bare XIDs, and then we'll fix them
in a second pass
*/
for (j = 0; j < (unsigned) xrandr_output->nclone; j++)
for (j = 0; j < (unsigned)output->nclone; j++)
{
output->possible_clones[j] =
GINT_TO_POINTER (xrandr_output->clones[j]);
meta_output->possible_clones[j] = GINT_TO_POINTER (output->clones[j]);
}
output->is_primary = ((XID) output->winsys_id == primary_output);
output->is_presentation = output_get_presentation_xrandr (manager_xrandr, output);
output->is_underscanning = output_get_underscanning_xrandr (manager_xrandr, output);
output->supports_underscanning =
output_get_supports_underscanning_xrandr (manager_xrandr, output);
output_get_backlight_limits_xrandr (manager_xrandr, output);
meta_output->is_primary = ((XID)meta_output->winsys_id == primary_output);
meta_output->is_presentation = output_get_presentation_xrandr (manager_xrandr, meta_output);
meta_output->is_underscanning = output_get_underscanning_xrandr (manager_xrandr, meta_output);
meta_output->supports_underscanning = output_get_supports_underscanning_xrandr (manager_xrandr, meta_output);
output_get_backlight_limits_xrandr (manager_xrandr, meta_output);
if (!(output->backlight_min == 0 && output->backlight_max == 0))
output->backlight = output_get_backlight_xrandr (manager_xrandr, output);
if (!(meta_output->backlight_min == 0 && meta_output->backlight_max == 0))
meta_output->backlight = output_get_backlight_xrandr (manager_xrandr, meta_output);
else
output->backlight = -1;
meta_output->backlight = -1;
if (output->n_modes == 0 || output->n_possible_crtcs == 0)
meta_monitor_manager_clear_output (output);
if (meta_output->n_modes == 0 || meta_output->n_possible_crtcs == 0)
meta_monitor_manager_clear_output (meta_output);
else
n_actual_outputs++;
}
XRRFreeOutputInfo (xrandr_output);
XRRFreeOutputInfo (output);
}
manager->n_outputs = n_actual_outputs;
@@ -926,19 +921,19 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
/* Now fix the clones */
for (i = 0; i < manager->n_outputs; i++)
{
MetaOutput *output;
MetaOutput *meta_output;
output = &manager->outputs[i];
meta_output = &manager->outputs[i];
for (j = 0; j < output->n_possible_clones; j++)
for (j = 0; j < meta_output->n_possible_clones; j++)
{
RROutput clone = GPOINTER_TO_INT (output->possible_clones[j]);
RROutput clone = GPOINTER_TO_INT (meta_output->possible_clones[j]);
for (k = 0; k < manager->n_outputs; k++)
{
if (clone == (XID)manager->outputs[k].winsys_id)
{
output->possible_clones[j] = &manager->outputs[k];
meta_output->possible_clones[j] = &manager->outputs[k];
break;
}
}
@@ -983,27 +978,27 @@ meta_monitor_manager_xrandr_set_power_save_mode (MetaMonitorManager *manager,
DPMSSetTimeouts (manager_xrandr->xdisplay, 0, 0, 0);
}
static xcb_randr_rotation_t
static Rotation
meta_monitor_transform_to_xrandr (MetaMonitorTransform transform)
{
switch (transform)
{
case META_MONITOR_TRANSFORM_NORMAL:
return XCB_RANDR_ROTATION_ROTATE_0;
return RR_Rotate_0;
case META_MONITOR_TRANSFORM_90:
return XCB_RANDR_ROTATION_ROTATE_90;
return RR_Rotate_90;
case META_MONITOR_TRANSFORM_180:
return XCB_RANDR_ROTATION_ROTATE_180;
return RR_Rotate_180;
case META_MONITOR_TRANSFORM_270:
return XCB_RANDR_ROTATION_ROTATE_270;
return RR_Rotate_270;
case META_MONITOR_TRANSFORM_FLIPPED:
return XCB_RANDR_ROTATION_REFLECT_X | XCB_RANDR_ROTATION_ROTATE_0;
return RR_Reflect_X | RR_Rotate_0;
case META_MONITOR_TRANSFORM_FLIPPED_90:
return XCB_RANDR_ROTATION_REFLECT_X | XCB_RANDR_ROTATION_ROTATE_90;
return RR_Reflect_X | RR_Rotate_90;
case META_MONITOR_TRANSFORM_FLIPPED_180:
return XCB_RANDR_ROTATION_REFLECT_X | XCB_RANDR_ROTATION_ROTATE_180;
return RR_Reflect_X | RR_Rotate_180;
case META_MONITOR_TRANSFORM_FLIPPED_270:
return XCB_RANDR_ROTATION_REFLECT_X | XCB_RANDR_ROTATION_ROTATE_270;
return RR_Reflect_X | RR_Rotate_270;
}
g_assert_not_reached ();
@@ -1072,180 +1067,8 @@ output_set_underscanning_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
}
}
static gboolean
xrandr_set_crtc_config (MetaMonitorManagerXrandr *manager_xrandr,
gboolean save_timestamp,
xcb_randr_crtc_t crtc,
xcb_timestamp_t timestamp,
int x,
int y,
xcb_randr_mode_t mode,
xcb_randr_rotation_t rotation,
xcb_randr_output_t *outputs,
int n_outputs)
{
xcb_connection_t *xcb_conn;
xcb_timestamp_t config_timestamp;
xcb_randr_set_crtc_config_cookie_t cookie;
xcb_randr_set_crtc_config_reply_t *reply;
xcb_generic_error_t *xcb_error = NULL;
xcb_conn = XGetXCBConnection (manager_xrandr->xdisplay);
config_timestamp = manager_xrandr->resources->configTimestamp;
cookie = xcb_randr_set_crtc_config (xcb_conn,
crtc,
timestamp,
config_timestamp,
x, y,
mode,
rotation,
n_outputs,
outputs);
reply = xcb_randr_set_crtc_config_reply (xcb_conn,
cookie,
&xcb_error);
if (xcb_error || !reply)
{
free (xcb_error);
free (reply);
return FALSE;
}
if (save_timestamp)
manager_xrandr->last_xrandr_set_timestamp = reply->timestamp;
free (reply);
return TRUE;
}
static gboolean
is_crtc_assignment_changed (MetaCrtc *crtc,
MetaCrtcInfo **crtc_infos,
unsigned int n_crtc_infos)
{
unsigned int i;
for (i = 0; i < n_crtc_infos; i++)
{
MetaCrtcInfo *crtc_info = crtc_infos[i];
unsigned int j;
if (crtc_info->crtc != crtc)
continue;
if (crtc->current_mode != crtc_info->mode)
return TRUE;
if (crtc->rect.x != crtc_info->x)
return TRUE;
if (crtc->rect.y != crtc_info->y)
return TRUE;
if (crtc->transform != crtc_info->transform)
return TRUE;
for (j = 0; j < crtc_info->outputs->len; j++)
{
MetaOutput *output = ((MetaOutput**) crtc_info->outputs->pdata)[j];
if (output->crtc != crtc)
return TRUE;
}
return FALSE;
}
return crtc->current_mode != NULL;
}
static gboolean
is_output_assignment_changed (MetaOutput *output,
MetaCrtcInfo **crtc_infos,
unsigned int n_crtc_infos,
MetaOutputInfo **output_infos,
unsigned int n_output_infos)
{
gboolean output_is_found = FALSE;
unsigned int i;
for (i = 0; i < n_output_infos; i++)
{
MetaOutputInfo *output_info = output_infos[i];
if (output_info->output != output)
continue;
if (output->is_primary != output_info->is_primary)
return TRUE;
if (output->is_presentation != output_info->is_presentation)
return TRUE;
if (output->is_underscanning != output_info->is_underscanning)
return TRUE;
output_is_found = TRUE;
}
if (!output_is_found)
return output->crtc != NULL;
for (i = 0; i < n_crtc_infos; i++)
{
MetaCrtcInfo *crtc_info = crtc_infos[i];
unsigned int j;
for (j = 0; j < crtc_info->outputs->len; j++)
{
MetaOutput *crtc_info_output =
((MetaOutput**) crtc_info->outputs->pdata)[j];
if (crtc_info_output == output &&
crtc_info->crtc == output->crtc)
return FALSE;
}
}
return TRUE;
}
static gboolean
is_assignments_changed (MetaMonitorManager *manager,
MetaCrtcInfo **crtc_infos,
unsigned int n_crtc_infos,
MetaOutputInfo **output_infos,
unsigned int n_output_infos)
{
unsigned int i;
for (i = 0; i < manager->n_crtcs; i++)
{
MetaCrtc *crtc = &manager->crtcs[i];
if (is_crtc_assignment_changed (crtc, crtc_infos, n_crtc_infos))
return TRUE;
}
for (i = 0; i < manager->n_outputs; i++)
{
MetaOutput *output = &manager->outputs[i];
if (is_output_assignment_changed (output,
crtc_infos,
n_crtc_infos,
output_infos,
n_output_infos))
return TRUE;
}
return FALSE;
}
static void
apply_crtc_assignments (MetaMonitorManager *manager,
gboolean save_timestamp,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
@@ -1294,13 +1117,14 @@ apply_crtc_assignments (MetaMonitorManager *manager,
crtc->rect.x + crtc->rect.width > width ||
crtc->rect.y + crtc->rect.height > height)
{
xrandr_set_crtc_config (manager_xrandr,
save_timestamp,
(xcb_randr_crtc_t) crtc->crtc_id,
XCB_CURRENT_TIME,
0, 0, XCB_NONE,
XCB_RANDR_ROTATION_ROTATE_0,
NULL, 0);
XRRSetCrtcConfig (manager_xrandr->xdisplay,
manager_xrandr->resources,
(XID)crtc->crtc_id,
CurrentTime,
0, 0,
None,
RR_Rotate_0,
NULL, 0);
crtc->rect.x = 0;
crtc->rect.y = 0;
@@ -1323,13 +1147,14 @@ apply_crtc_assignments (MetaMonitorManager *manager,
if (crtc->current_mode == NULL)
continue;
xrandr_set_crtc_config (manager_xrandr,
save_timestamp,
(xcb_randr_crtc_t) crtc->crtc_id,
XCB_CURRENT_TIME,
0, 0, XCB_NONE,
XCB_RANDR_ROTATION_ROTATE_0,
NULL, 0);
XRRSetCrtcConfig (manager_xrandr->xdisplay,
manager_xrandr->resources,
(XID)crtc->crtc_id,
CurrentTime,
0, 0,
None,
RR_Rotate_0,
NULL, 0);
crtc->rect.x = 0;
crtc->rect.y = 0;
@@ -1358,14 +1183,14 @@ apply_crtc_assignments (MetaMonitorManager *manager,
if (crtc_info->mode != NULL)
{
MetaCrtcMode *mode;
g_autofree xcb_randr_output_t *output_ids = NULL;
g_autofree XID *output_ids = NULL;
unsigned int j, n_output_ids;
xcb_randr_rotation_t rotation;
Status ok;
mode = crtc_info->mode;
n_output_ids = crtc_info->outputs->len;
output_ids = g_new (xcb_randr_output_t, n_output_ids);
output_ids = g_new (XID, n_output_ids);
for (j = 0; j < n_output_ids; j++)
{
@@ -1379,15 +1204,16 @@ apply_crtc_assignments (MetaMonitorManager *manager,
output_ids[j] = output->winsys_id;
}
rotation = meta_monitor_transform_to_xrandr (crtc_info->transform);
if (!xrandr_set_crtc_config (manager_xrandr,
save_timestamp,
(xcb_randr_crtc_t) crtc->crtc_id,
XCB_CURRENT_TIME,
crtc_info->x, crtc_info->y,
(xcb_randr_mode_t) mode->mode_id,
rotation,
output_ids, n_output_ids))
ok = XRRSetCrtcConfig (manager_xrandr->xdisplay,
manager_xrandr->resources,
(XID)crtc->crtc_id,
CurrentTime,
crtc_info->x, crtc_info->y,
(XID)mode->mode_id,
meta_monitor_transform_to_xrandr (crtc_info->transform),
output_ids, n_output_ids);
if (ok != Success)
{
meta_warning ("Configuring CRTC %d with mode %d (%d x %d @ %f) at position %d, %d and transform %u failed\n",
(unsigned)(crtc->crtc_id), (unsigned)(mode->mode_id),
@@ -1464,8 +1290,6 @@ apply_crtc_assignments (MetaMonitorManager *manager,
static void
meta_monitor_manager_xrandr_ensure_initial_config (MetaMonitorManager *manager)
{
MetaMonitorManagerDeriveFlag flags;
meta_monitor_manager_ensure_configured (manager);
/*
@@ -1475,8 +1299,7 @@ meta_monitor_manager_xrandr_ensure_initial_config (MetaMonitorManager *manager)
*/
meta_monitor_manager_read_current_state (manager);
flags = META_MONITOR_MANAGER_DERIVE_FLAG_CONFIGURED_SCALE;
meta_monitor_manager_update_logical_state_derived (manager, flags);
meta_monitor_manager_update_logical_state_derived (manager);
}
static gboolean
@@ -1490,10 +1313,7 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *mana
if (!config)
{
MetaMonitorManagerDeriveFlag flags =
META_MONITOR_MANAGER_DERIVE_FLAG_NONE;
meta_monitor_manager_rebuild_derived (manager, flags);
meta_monitor_manager_rebuild_derived (manager);
return TRUE;
}
@@ -1504,35 +1324,11 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *mana
if (method != META_MONITORS_CONFIG_METHOD_VERIFY)
{
/*
* If the assignment has not changed, we won't get any notification about
* any new configuration from the X server; but we still need to update
* our own configuration, as something not applicable in Xrandr might
* have changed locally, such as the logical monitors scale. This means we
* must check that our new assignment actually changes anything, otherwise
* just update the logical state.
*/
if (is_assignments_changed (manager,
(MetaCrtcInfo **) crtc_infos->pdata,
crtc_infos->len,
(MetaOutputInfo **) output_infos->pdata,
output_infos->len))
{
apply_crtc_assignments (manager,
TRUE,
(MetaCrtcInfo **) crtc_infos->pdata,
crtc_infos->len,
(MetaOutputInfo **) output_infos->pdata,
output_infos->len);
}
else
{
MetaMonitorManagerDeriveFlag flags;
flags = (META_MONITOR_MANAGER_DERIVE_FLAG_NONE |
META_MONITOR_MANAGER_DERIVE_FLAG_CONFIGURED_SCALE);
meta_monitor_manager_rebuild_derived (manager, flags);
}
apply_crtc_assignments (manager,
(MetaCrtcInfo **) crtc_infos->pdata,
crtc_infos->len,
(MetaOutputInfo **) output_infos->pdata,
output_infos->len);
}
g_ptr_array_free (crtc_infos, TRUE);
@@ -1541,6 +1337,16 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *mana
return TRUE;
}
static void
meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs)
{
apply_crtc_assignments (manager, crtcs, n_crtcs, outputs, n_outputs);
}
static void
meta_monitor_manager_xrandr_change_backlight (MetaMonitorManager *manager,
MetaOutput *output,
@@ -1774,39 +1580,33 @@ meta_monitor_manager_xrandr_is_transform_handled (MetaMonitorManager *manager,
MetaCrtc *crtc,
MetaMonitorTransform transform)
{
g_warn_if_fail ((crtc->all_transforms & transform) == transform);
g_warn_if_fail (crtc->all_transforms & transform);
return TRUE;
}
static float
static int
meta_monitor_manager_xrandr_calculate_monitor_mode_scale (MetaMonitorManager *manager,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
return meta_monitor_calculate_mode_scale (monitor, monitor_mode);
/* X11 does not support anything other than scale 1. */
return 1;
}
static float *
meta_monitor_manager_xrandr_calculate_supported_scales (MetaMonitorManager *manager,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
int *n_supported_scales)
static void
meta_monitor_manager_xrandr_get_supported_scales (MetaMonitorManager *manager,
float **scales,
int *n_scales)
{
MetaMonitorScalesConstraint constraints;
constraints = META_MONITOR_SCALES_CONSTRAINT_NO_FRAC;
return meta_monitor_calculate_supported_scales (monitor, monitor_mode,
constraints,
n_supported_scales);
*scales = supported_scales_xrandr;
*n_scales = G_N_ELEMENTS (supported_scales_xrandr);
}
static MetaMonitorManagerCapability
meta_monitor_manager_xrandr_get_capabilities (MetaMonitorManager *manager)
{
return (META_MONITOR_MANAGER_CAPABILITY_MIRRORING |
META_MONITOR_MANAGER_CAPABILITY_GLOBAL_SCALE_REQUIRED);
return META_MONITOR_MANAGER_CAPABILITY_MIRRORING;
}
static gboolean
@@ -1826,7 +1626,11 @@ meta_monitor_manager_xrandr_get_max_screen_size (MetaMonitorManager *manager,
static MetaLogicalMonitorLayoutMode
meta_monitor_manager_xrandr_get_default_layout_mode (MetaMonitorManager *manager)
{
return META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL;
/*
* Under X11, we still use the 'logical' layout mode, but it is
* eqivalent to 'physical' as the scale is always 1.
*/
return META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL;
}
static void
@@ -1895,6 +1699,7 @@ meta_monitor_manager_xrandr_class_init (MetaMonitorManagerXrandrClass *klass)
manager_class->read_edid = meta_monitor_manager_xrandr_read_edid;
manager_class->ensure_initial_config = meta_monitor_manager_xrandr_ensure_initial_config;
manager_class->apply_monitors_config = meta_monitor_manager_xrandr_apply_monitors_config;
manager_class->apply_configuration = meta_monitor_manager_xrandr_apply_configuration;
manager_class->set_power_save_mode = meta_monitor_manager_xrandr_set_power_save_mode;
manager_class->change_backlight = meta_monitor_manager_xrandr_change_backlight;
manager_class->get_crtc_gamma = meta_monitor_manager_xrandr_get_crtc_gamma;
@@ -1905,7 +1710,7 @@ meta_monitor_manager_xrandr_class_init (MetaMonitorManagerXrandrClass *klass)
#endif
manager_class->is_transform_handled = meta_monitor_manager_xrandr_is_transform_handled;
manager_class->calculate_monitor_mode_scale = meta_monitor_manager_xrandr_calculate_monitor_mode_scale;
manager_class->calculate_supported_scales = meta_monitor_manager_xrandr_calculate_supported_scales;
manager_class->get_supported_scales = meta_monitor_manager_xrandr_get_supported_scales;
manager_class->get_capabilities = meta_monitor_manager_xrandr_get_capabilities;
manager_class->get_max_screen_size = meta_monitor_manager_xrandr_get_max_screen_size;
manager_class->get_default_layout_mode = meta_monitor_manager_xrandr_get_default_layout_mode;
@@ -1919,8 +1724,7 @@ meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManagerXrandr *manager_xra
XEvent *event)
{
MetaMonitorManager *manager = META_MONITOR_MANAGER (manager_xrandr);
gboolean is_hotplug;
gboolean is_our_configuration;
gboolean hotplug;
if ((event->type - manager_xrandr->rr_event_base) != RRScreenChangeNotify)
return FALSE;
@@ -1929,24 +1733,16 @@ meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManagerXrandr *manager_xra
meta_monitor_manager_read_current_state (manager);
is_hotplug = (manager_xrandr->resources->timestamp <
manager_xrandr->resources->configTimestamp);
is_our_configuration = (manager_xrandr->resources->timestamp ==
manager_xrandr->last_xrandr_set_timestamp);
if (is_hotplug)
hotplug = manager_xrandr->resources->timestamp < manager_xrandr->resources->configTimestamp;
if (hotplug)
{
/* This is a hotplug event, so go ahead and build a new configuration. */
meta_monitor_manager_on_hotplug (manager);
}
else
{
MetaMonitorManagerDeriveFlag flags =
META_MONITOR_MANAGER_DERIVE_FLAG_NONE;
if (is_our_configuration)
flags |= META_MONITOR_MANAGER_DERIVE_FLAG_CONFIGURED_SCALE;
meta_monitor_manager_rebuild_derived (manager, flags);
/* Something else changed -- tell the world about it. */
meta_monitor_manager_rebuild_derived (manager);
}
return TRUE;

View File

@@ -25,9 +25,17 @@
#include "meta-monitor-manager-private.h"
#define META_TYPE_MONITOR_MANAGER_XRANDR (meta_monitor_manager_xrandr_get_type ())
G_DECLARE_FINAL_TYPE (MetaMonitorManagerXrandr, meta_monitor_manager_xrandr,
META, MONITOR_MANAGER_XRANDR, MetaMonitorManager)
#define META_TYPE_MONITOR_MANAGER_XRANDR (meta_monitor_manager_xrandr_get_type ())
#define META_MONITOR_MANAGER_XRANDR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandr))
#define META_MONITOR_MANAGER_XRANDR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandrClass))
#define META_IS_MONITOR_MANAGER_XRANDR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_MONITOR_MANAGER_XRANDR))
#define META_IS_MONITOR_MANAGER_XRANDR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_MONITOR_MANAGER_XRANDR))
#define META_MONITOR_MANAGER_XRANDR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandrClass))
typedef struct _MetaMonitorManagerXrandrClass MetaMonitorManagerXrandrClass;
typedef struct _MetaMonitorManagerXrandr MetaMonitorManagerXrandr;
GType meta_monitor_manager_xrandr_get_type (void);
gboolean meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManagerXrandr *manager,
XEvent *event);

View File

@@ -49,12 +49,6 @@ meta_backend_x11_nested_create_cursor_renderer (MetaBackend *backend)
return g_object_new (META_TYPE_CURSOR_RENDERER_X11_NESTED, NULL);
}
static MetaInputSettings *
meta_backend_x11_nested_create_input_settings (MetaBackend *backend)
{
return NULL;
}
static void
meta_backend_x11_nested_update_screen_size (MetaBackend *backend,
int width,
@@ -183,7 +177,6 @@ meta_backend_x11_nested_class_init (MetaBackendX11NestedClass *klass)
backend_class->create_renderer = meta_backend_x11_nested_create_renderer;
backend_class->create_monitor_manager = meta_backend_x11_nested_create_monitor_manager;
backend_class->create_cursor_renderer = meta_backend_x11_nested_create_cursor_renderer;
backend_class->create_input_settings = meta_backend_x11_nested_create_input_settings;
backend_class->update_screen_size = meta_backend_x11_nested_update_screen_size;
backend_class->select_stage_events = meta_backend_x11_nested_select_stage_events;
backend_class->lock_layout_group = meta_backend_x11_nested_lock_layout_group;

View File

@@ -173,7 +173,7 @@ meta_renderer_x11_nested_create_view (MetaRenderer *renderer,
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
CoglContext *cogl_context = clutter_backend_get_cogl_context (clutter_backend);
MetaMonitorTransform view_transform;
float view_scale;
int view_scale;
int width, height;
CoglOffscreen *fake_onscreen;
CoglOffscreen *offscreen;
@@ -183,7 +183,7 @@ meta_renderer_x11_nested_create_view (MetaRenderer *renderer,
if (meta_is_stage_views_scaled ())
view_scale = logical_monitor->scale;
else
view_scale = 1.0;
view_scale = 1;
if (meta_monitor_transform_is_rotated (view_transform))
{

View File

@@ -65,7 +65,4 @@ void meta_compositor_flash_window (MetaCompositor *compositor,
MetaCloseDialog * meta_compositor_create_close_dialog (MetaCompositor *compositor,
MetaWindow *window);
MetaInhibitShortcutsDialog * meta_compositor_create_inhibit_shortcuts_dialog (MetaCompositor *compositor,
MetaWindow *window);
#endif /* META_COMPOSITOR_PRIVATE_H */

View File

@@ -1422,11 +1422,3 @@ meta_compositor_create_close_dialog (MetaCompositor *compositor,
return meta_plugin_manager_create_close_dialog (compositor->plugin_mgr,
window);
}
MetaInhibitShortcutsDialog *
meta_compositor_create_inhibit_shortcuts_dialog (MetaCompositor *compositor,
MetaWindow *window)
{
return meta_plugin_manager_create_inhibit_shortcuts_dialog (compositor->plugin_mgr,
window);
}

View File

@@ -311,8 +311,6 @@ setup_pipeline (MetaBackgroundActor *self,
cogl_pipeline_set_layer_texture (priv->pipeline, 0, texture);
cogl_pipeline_set_layer_wrap_mode (priv->pipeline, 0, wrap_mode);
priv->changed &= ~CHANGED_BACKGROUND;
}
if ((priv->changed & CHANGED_VIGNETTE_PARAMETERS) != 0)
@@ -321,8 +319,6 @@ setup_pipeline (MetaBackgroundActor *self,
cogl_pipeline_get_uniform_location (priv->pipeline,
"vignette_sharpness"),
priv->vignette_sharpness);
priv->changed &= ~CHANGED_VIGNETTE_PARAMETERS;
}
if (priv->vignette)

Some files were not shown because too many files have changed in this diff Show More