Compare commits

..

46 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
27b949d6ba compositor: Remove MetaSurfaceActorWayland::painting signal
It's now unused.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:27:11 +02:00
27ea62a79d wayland: Use notify::allocation to update pointer as per confinements
There is no need to constraint the pointer to the confinement on each redraw
if the surface actor didn't move/resize.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:27:11 +02:00
cf1edff9ed wayland: Use notify::allocation notification to update surface outputs
Instead of updating the surface outputs on each actor ::paint.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:27:11 +02:00
5cb5baa7d4 ClutterActor: Optimize away idempotent scale/position updates
If the actor results in the same scale/position, there's no need to
trigger a transition.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:27:11 +02:00
d620189ae3 ClutterActor: Call queue_redraw vfunc directly if possible
Reduces some signal emission overhead.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:27:11 +02:00
bc041e02b3 cogl: Mark vertex buffers as dynamic
Those are cached and reused across runs, which doesn't qualify to mesa
as "static" indeed. Properly marking those as dynamic is more true, and
brings in slight performance benefits just by avoiding the resulting
(and later silenced) mesa warning.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:27:11 +02:00
4b4c2b1afa ClutterActor: Avoid frequent signal emission if possible
Avoid signal emission for ::paint/::pick if no handlers are connected,
which is the most frequent case.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-22 17:27:11 +02:00
05d15f8885 window/wayland: Don't try to resize window on tear down
When terminating mutter running as a display server, don't try to resize
maximized windows when unmanaging, as at this point, they will have no
MetaWaylandSurface. Originally this was done instead of setting the
net_wm_state to not mess with future window managers, but when we're a
Wayland compositor, this does not matter.

https://bugzilla.gnome.org/show_bug.cgi?id=782156
2017-05-22 21:17:39 +08:00
561d71b8ae wayland: place window if maximized before placement
If a client changes the state of a surface to issue a set_maximize, this
causes apply_pending_state() to be called before mutter has placed the
window.

If the monitor on which the window is to be shown initially is different
from the one where the pointer is placed, this causes the effect to be
played at the wrong location before the window eventually reaches its
location on another monitor.

Force the window to be placed prior to change its state to maximized in
xdg-shell so that mutter won't relocate the window afterwards.

This also avoids sending an xdg_toplevel.configure with a size of 0x0
which would cause the client to initially draw its surface with some
arbitrary size.

https://bugzilla.gnome.org/show_bug.cgi?id=782183
https://bugzilla.gnome.org/show_bug.cgi?id=781353
2017-05-22 09:22:11 +02:00
177e47952a configure.ac: explicitly set link_all_deplibs=yes
Some distros such as Ubuntu and Debian set it to 'no',
while others might keep it to 'unknown' (which defaults to
'yes'). And this causes troubles when linking with mutter-clutter
in some tests.

https://bugzilla.gnome.org/show_bug.cgi?id=782821
2017-05-22 06:14:25 +00:00
374bb630f0 cogl: Use pixel_format_to_gl_with_target in find_best_gl_get_data_format
Fixes cogl_texture_get_data() resorting to the wrong conversions when
extracting the texture data. This notably resulted in RGB/RGBA buffers
copied as-is into BGRA buffers, for instance for the fullscreen animation,
or single-window screenshots of such buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=779234
2017-05-18 23:32:39 +02:00
fe5138dfc4 core: Replace close dialog implementation with MetaCloseDialog
src/core/delete.c now entirely relies on MetaCloseDialog in order
to handle the "Application is not responding" dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=711619
2017-05-15 15:09:15 +02:00
68a9675d42 compositor: Expose MetaPlugin vmethod to create a MetaCloseDialog
So the actual close dialog can be overridden by MetaPlugin implementations.

https://bugzilla.gnome.org/show_bug.cgi?id=711619
2017-05-15 15:09:15 +02:00
020e0bb2ac core: Implement MetaCloseDialogDefault
This is basically a copy of the implementation currently residing
in src/core/delete.c, which will be eventually deleted in favor
of this one.

https://bugzilla.gnome.org/show_bug.cgi?id=711619
2017-05-15 15:09:15 +02:00
b47de58edd core: Add MetaCloseDialog
This is an interface that can be used to implement the "application
is not responding" dialog. One instance is created per window, which
is initially hidden, and can be shown/hidden on demand.

https://bugzilla.gnome.org/show_bug.cgi?id=711619
2017-05-15 15:09:15 +02:00
24195d8d15 Update Hungarian translation 2017-05-14 19:37:49 +00:00
3a7c37c60a Update Turkish translation 2017-05-14 09:49:41 +00:00
c69d5d978c Update German translation 2017-05-12 15:36:19 +00:00
2f30098ab5 build: Fix non-wayland builds
Add the necessary preprocessor guards that were missed in commits
65e9c89ed9 and 6d64123849 ...

https://bugzilla.gnome.org/show_bug.cgi?id=780533
2017-05-11 13:45:44 +02:00
e146428038 Fix bashism in autogen.sh
https://bugzilla.gnome.org/show_bug.cgi?id=780215
2017-05-11 13:45:44 +02:00
5758401443 xwayland: Use the right atom type for further selection requests to X11
If we translate between text/plain;charset-utf-8 from the wayland side to
UTF8_STRING on the X11 side, we want to continue all further X11 selection
requests using the same translated UTF8_STRING atom than we use in the
first XConvertSelection call.

https://bugzilla.gnome.org/show_bug.cgi?id=782472
2017-05-10 21:00:37 +02:00
f241bdba93 wayland: Apply size hints regardless of geometry
Previously we would bail out early in xdg_toplevel_role_commit() if no
geometry change was set, ignoring the possible min/max size hints
changes.

But setting a min/max size hint without changing the geometry is
perfectly valid, so we ought to apply the min/max changes regardless of
a geometry change.

https://bugzilla.gnome.org/show_bug.cgi?id=782213
2017-05-10 10:44:42 +02:00
410d66ca37 wayland: Make sure we have a pending geometry
If the client doesn't set a geometry using xdg_shell, we'll compute its
geometry based on its surface and subsurfaces.

Yet, we translate that as a window (re)size only when there is a pending
geometry, that we don't have when we computed the geometry by ourself.

Make sure we set the pending new geometry flag when computing the
geometry when it actually changed.

https://bugzilla.gnome.org/show_bug.cgi?id=782213
2017-05-10 10:44:37 +02:00
f2309cdb55 backends: Store MUTTER_STAGE_VIEWS envvar content just once
No need to poke this regularly while drawing the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-09 11:53:46 +02:00
3887d25dbc ClutterStage: Use non-generic marshaller for ::presented signal
This signal runs often, so it's better to use a direct marshaler.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-09 11:53:27 +02:00
d6d01c85a6 wayland: Collect frame completion time once for all surfaces
Dispatch all surface frames with the same monotonic time to avoid
querying it too often.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-09 11:53:14 +02:00
d0bfb94ff0 backends/native: Avoid generic closure marshaler for page flip handling
This turns out more expensive than necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2017-05-09 11:52:57 +02:00
2b1537cdf5 Update Catalan translation 2017-05-05 22:12:38 +02:00
d3362a6f05 clutter: conform/actor-graph: Add missing null-termination
https://bugzilla.gnome.org/show_bug.cgi?id=759085
2017-05-05 09:53:51 -04:00
9cf8aa4584 cally: Fix compilation without X11 backend
Commit 0fd9e38175 fixed setting the out parameter for the x coordinate
when using the X11 backend, but broke compilation when the backend is
not available ...
Really fix the issue by running the X11-specific code when the X11
backend is available and in use, and display the one-time warning
otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=781902
2017-05-02 14:29:59 +02:00
c76eedd794 Typo fix: missing '\'
Without the backslash, the build breaks.
2017-04-30 15:05:52 +01:00
9131f26cae Generate marshallers without including the generated header
GLib now generates the prototypes for the generated marshallers, so it's
not necessary to include the header any more.

This fixes a build failure in GNOME Continuous with GLib master, caused
by -Werror=redundant-decls.
2017-04-30 14:56:29 +01:00
8ed0dda40d Update Friulian translation 2017-04-30 13:42:52 +00:00
0fd9e38175 cally: Fix translation to screen coordinates
Due to an accidental swap of an else statement and a preprocessor #else,
the output x coordinate is currently only set when not using the X11
windowing system, whoops.

https://bugzilla.gnome.org/show_bug.cgi?id=781902
2017-04-28 17:20:36 +02:00
891cab3bb3 window-props: Fix frame update on hide-titlebar-when-maximized changes
Since we started caching frame borders in commit b4036e061, we need to
invalidate the cache for changes of the GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED
property to take effect immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=781862
2017-04-27 23:04:08 +02:00
58 changed files with 1865 additions and 3349 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
@ -6,7 +6,9 @@ test -z "$srcdir" && srcdir=.
REQUIRED_AUTOMAKE_VERSION=1.11
pushd $srcdir
olddir="$(pwd)"
cd "${srcdir}"
(test -f configure.ac \
&& test -d src) || {
@ -19,8 +21,8 @@ aclocal --install || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install || exit 1
popd
cd "${olddir}"
if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure "$@" || exit 1
"${srcdir}/configure" "$@" || exit 1
fi

View File

@ -43,10 +43,9 @@ $(marshal_h): stamp-marshal
@true
$(marshal_c): $(marshal_h)
$(AM_V_GEN)(echo "#include \"$(marshal_h)\"" ; \
$(GLIB_GENMARSHAL) \
$(AM_V_GEN)$(GLIB_GENMARSHAL) \
--prefix=$(glib_marshal_prefix) \
--body \
$(marshal_list)) > xgen-mc \
&& cp xgen-mc $(marshal_c) \
$(marshal_list) > xgen-mc \
&& (cmp -s xgen-mc $(marshal_c) || cp -f xgen-mc $(marshal_c)) \
&& rm -f xgen-mc

View File

@ -781,7 +781,7 @@ _cally_actor_get_top_level_origin (ClutterActor *actor,
"position of the stage");
}
else
#else
#endif
{
static gboolean yet_warned = FALSE;
@ -793,7 +793,6 @@ _cally_actor_get_top_level_origin (ClutterActor *actor,
"atk_component_get_extents() with ATK_XY_SCREEN.");
}
}
#endif
if (xp)
*xp = x;

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,19 +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],
0, TRUE))
{
g_signal_emit (self, actor_signals[QUEUE_REDRAW], 0, origin, pv, &stop);
}
else
{
stop = CLUTTER_ACTOR_GET_CLASS (self)->queue_redraw (self, origin, pv);
}
/* calls klass->queue_redraw in default handler */
g_signal_emit (self, actor_signals[QUEUE_REDRAW], 0, origin);
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)
@ -2672,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;
}
@ -2687,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
@ -2701,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;
@ -2709,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
@ -4015,7 +4030,11 @@ clutter_actor_continue_paint (ClutterActor *self)
clutter_paint_node_unref (dummy);
/* XXX:2.0 - Call the paint() virtual directly */
g_signal_emit (self, actor_signals[PAINT], 0);
if (g_signal_has_handler_pending (self, actor_signals[PAINT],
0, TRUE))
g_signal_emit (self, actor_signals[PAINT], 0);
else
CLUTTER_ACTOR_GET_CLASS (self)->paint (self);
}
else
{
@ -4029,7 +4048,11 @@ clutter_actor_continue_paint (ClutterActor *self)
*
* XXX:2.0 - Call the pick() virtual directly
*/
g_signal_emit (self, actor_signals[PICK], 0, &col);
if (g_signal_has_handler_pending (self, actor_signals[PICK],
0, TRUE))
g_signal_emit (self, actor_signals[PICK], 0, &col);
else
CLUTTER_ACTOR_GET_CLASS (self)->pick (self, &col);
}
}
else
@ -4812,7 +4835,8 @@ clutter_actor_set_scale_factor (ClutterActor *self,
g_assert (pspec != NULL);
g_assert (scale_p != NULL);
_clutter_actor_create_transition (self, pspec, *scale_p, factor);
if (*scale_p != factor)
_clutter_actor_create_transition (self, pspec, *scale_p, factor);
}
static inline void
@ -7994,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:
@ -8502,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;
@ -8595,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
@ -8623,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))
{
@ -8634,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
@ -8824,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;
}
@ -8899,6 +8899,7 @@ _clutter_actor_queue_redraw_full (ClutterActor *self,
}
priv->is_dirty = TRUE;
priv->needs_paint_volume_update = TRUE;
}
/**
@ -10247,9 +10248,10 @@ clutter_actor_set_position (ClutterActor *self,
cur_position.x = clutter_actor_get_x (self);
cur_position.y = clutter_actor_get_y (self);
_clutter_actor_create_transition (self, obj_props[PROP_POSITION],
&cur_position,
&new_position);
if (!clutter_point_equals (&cur_position, &new_position))
_clutter_actor_create_transition (self, obj_props[PROP_POSITION],
&cur_position,
&new_position);
}
/**
@ -12955,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
@ -16632,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
@ -17498,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

@ -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
@ -17,6 +18,7 @@ VOID:BOXED,FLAGS
VOID:INT
VOID:INT64,INT64,FLOAT,BOOLEAN
VOID:INT,INT
VOID:INT,POINTER
VOID:FLOAT,FLOAT
VOID:INT,INT,INT,INT
VOID:OBJECT

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

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

@ -1199,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,
@ -1253,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... */
@ -1263,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
@ -1315,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,
@ -2176,8 +2201,8 @@ clutter_stage_class_init (ClutterStageClass *klass)
g_signal_new (I_("presented"),
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
0, NULL, NULL,
_clutter_marshal_VOID__INT_POINTER,
G_TYPE_NONE, 2,
G_TYPE_INT, G_TYPE_POINTER);

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

@ -54,7 +54,7 @@ typedef struct _ClutterStageViewCoglPrivate
/* 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;
@ -246,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;
@ -263,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;
@ -296,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;
}
@ -309,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
@ -414,37 +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;
cairo_rectangle_int_t *current_damage;
cairo_region_t **current_damage;
current_damage =
&view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index)];
clutter_stage_view_get_layout (view, &view_rect);
*current_damage = view_rect;
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)
@ -499,9 +503,11 @@ 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 clip_region;
cairo_rectangle_int_t clip_rect;
cairo_rectangle_int_t redraw_rect;
gboolean clip_region_empty;
int fb_scale;
@ -517,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;
@ -542,11 +547,12 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
cogl_onscreen_get_frame_counter (COGL_ONSCREEN (fb)) > 3)
{
may_use_clipped_redraw = TRUE;
clip_region = redraw_clip;
clip_region = cairo_region_reference (redraw_clip);
}
else
{
clip_region = (cairo_rectangle_int_t){ 0 };
clip_region = cairo_region_create ();
redraw_clip = cairo_region_reference (clip_region);
}
if (may_use_clipped_redraw &&
@ -555,7 +561,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
else
use_clipped_redraw = FALSE;
clip_region_empty = may_use_clipped_redraw && 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);
@ -565,34 +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_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))
{
*current_damage = clip_region;
fill_current_damage_history (view, clip_region);
for (i = 1; i <= age; i++)
{
cairo_rectangle_int_t *damage =
&view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - i - 1)];
_clutter_util_rectangle_union (&clip_region, damage, &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. */
_clutter_util_rectangle_union (&stage_cogl->bounding_redraw_clip,
&clip_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,
clip_region.x,
clip_region.y,
clip_region.width,
clip_region.height);
cairo_region_num_rectangles (clip_region));
swap_with_damage = TRUE;
}
@ -600,15 +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_damage = view_rect;
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)
{
@ -621,21 +621,21 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
CLUTTER_NOTE (CLIPPING,
"Stage clip pushed: x=%d, y=%d, width=%d, height=%d\n",
clip_region.x,
clip_region.y,
clip_region.width,
clip_region.height);
clip_rect.x,
clip_rect.y,
clip_rect.width,
clip_rect.height);
stage_cogl->using_clipped_redraw = TRUE;
scissor_x = (clip_region.x - view_rect.x) * fb_scale;
scissor_y = (clip_region.y - view_rect.y) * fb_scale;
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_x,
scissor_y,
clip_region.width * fb_scale,
clip_region.height * fb_scale);
paint_stage (stage_cogl, view, &clip_region);
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;
@ -645,7 +645,7 @@ 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)
@ -653,31 +653,39 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
int scissor_x;
int scissor_y;
scissor_x = (clip_region.x - view_rect.x) * fb_scale;;
scissor_y = (clip_region.y - view_rect.y) * fb_scale;
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_x,
scissor_y,
clip_region.width * fb_scale,
clip_region.height * fb_scale);
paint_stage (stage_cogl, view, &clip_region);
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 },
@ -724,10 +732,10 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
else if (use_clipped_redraw)
{
swap_region = (cairo_rectangle_int_t) {
.x = (clip_region.x - view_rect.x) * fb_scale,
.y = (clip_region.y - view_rect.y) * fb_scale,
.width = clip_region.width * fb_scale,
.height = clip_region.height * fb_scale,
.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;
@ -749,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) !=
@ -796,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++;
}
@ -810,7 +824,7 @@ 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);
cairo_rectangle_int_t *rect;
cairo_rectangle_int_t rect;
if (!has_buffer_age)
{
@ -823,12 +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_region_t *damage;
clutter_stage_view_get_layout (view, &view_layout);
rect = &view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - 1)];
*x = rect->x - view_layout.x;
*y = rect->y - view_layout.y;
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;
}
}
@ -847,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

@ -350,7 +350,8 @@ actor_replace_child (void)
g_assert_cmpstr (clutter_actor_get_name (iter), ==, "qux");
clutter_actor_add_child (actor, g_object_new (CLUTTER_TYPE_ACTOR,
"name", "foo"));
"name", "foo",
NULL));
clutter_actor_replace_child (actor, iter,
g_object_new (CLUTTER_TYPE_ACTOR,

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

@ -1102,7 +1102,7 @@ upload_vertices (CoglJournal *journal,
attribute_buffer = create_attribute_buffer (journal, needed_vbo_len * 4);
buffer = COGL_BUFFER (attribute_buffer);
cogl_buffer_set_update_hint (buffer, COGL_BUFFER_UPDATE_HINT_STATIC);
cogl_buffer_set_update_hint (buffer, COGL_BUFFER_UPDATE_HINT_DYNAMIC);
vout = _cogl_buffer_map_range_for_fill_or_fallback (buffer,
0, /* offset */

View File

@ -198,6 +198,7 @@ struct _CoglTextureDriver
CoglPixelFormat
(* find_best_gl_get_data_format) (CoglContext *context,
CoglPixelFormat format,
CoglPixelFormat target_format,
GLenum *closest_gl_format,
GLenum *closest_gl_type);
};

View File

@ -1059,6 +1059,7 @@ cogl_texture_get_data (CoglTexture *texture,
closest_format =
ctx->texture_driver->find_best_gl_get_data_format (ctx,
texture_format,
format,
&closest_gl_format,
&closest_gl_type);

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

@ -533,14 +533,16 @@ static CoglPixelFormat
_cogl_texture_driver_find_best_gl_get_data_format
(CoglContext *context,
CoglPixelFormat format,
CoglPixelFormat target_format,
GLenum *closest_gl_format,
GLenum *closest_gl_type)
{
return context->driver_vtable->pixel_format_to_gl (context,
format,
NULL, /* don't need */
closest_gl_format,
closest_gl_type);
return context->driver_vtable->pixel_format_to_gl_with_target (context,
format,
target_format,
NULL, /* don't need */
closest_gl_format,
closest_gl_type);
}
const CoglTextureDriver

View File

@ -615,6 +615,7 @@ static CoglPixelFormat
_cogl_texture_driver_find_best_gl_get_data_format
(CoglContext *context,
CoglPixelFormat format,
CoglPixelFormat target_format,
GLenum *closest_gl_format,
GLenum *closest_gl_type)
{

View File

@ -57,6 +57,13 @@ AM_GNU_GETTEXT([external])
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
# Debian / Ubuntu set this flag to 'no' in libtool, causing linking errors
# (i.e when linking against mutter-clutter). Not to explicitly redefine such
# deps, we enable this flag for everybody.
link_all_deplibs=yes
link_all_deplibs_CXX=yes
AC_PROG_CC
AC_PROG_CC_C_O
AC_PROG_INSTALL

View File

@ -12,11 +12,11 @@ src/compositor/compositor.c
src/compositor/meta-background.c
src/core/bell.c
src/core/core.c
src/core/delete.c
src/core/display.c
src/core/errors.c
src/core/keybindings.c
src/core/main.c
src/core/meta-close-dialog-default.c
src/core/mutter.c
src/core/prefs.c
src/core/screen.c

898
po/ca.po

File diff suppressed because it is too large Load Diff

1197
po/de.po

File diff suppressed because it is too large Load Diff

View File

@ -8,8 +8,8 @@ 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-04-12 14:54+0000\n"
"PO-Revision-Date: 2017-04-21 23:28+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"
@ -410,6 +410,16 @@ msgid ""
"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â "
"a inviâ il compositôr al dipent de funzionalitât dade. Cualsisei "
"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: • "
"“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:141
msgid "Select window from tab popup"

1175
po/hu.po

File diff suppressed because it is too large Load Diff

482
po/tr.po
View File

@ -7,306 +7,312 @@
# İ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.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-05-10 20:26+0000\n"
"PO-Revision-Date: 2016-05-26 22:25+0300\n"
"Last-Translator: Muhammet Kara <muhammetk@gmail.com>\n"
"Language-Team: Turkish <gnome-turk@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"
"X-Generator: Poedit 1.8.6\n"
"X-Generator: Gtranslator 2.91.7\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../data/50-mutter-navigation.xml.in.h:1
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
msgstr "Gezinme"
#: ../data/50-mutter-navigation.xml.in.h:2
#: data/50-mutter-navigation.xml:9
msgid "Move window to workspace 1"
msgstr "Pencereyi çalışma alanı 1'e taşı"
msgstr "Pencereyi çalışma alanı 1e taşı"
#: ../data/50-mutter-navigation.xml.in.h:3
#: data/50-mutter-navigation.xml:12
msgid "Move window to workspace 2"
msgstr "Pencereyi çalışma alanı 2'ye taşı"
msgstr "Pencereyi çalışma alanı 2ye taşı"
#: ../data/50-mutter-navigation.xml.in.h:4
#: data/50-mutter-navigation.xml:15
msgid "Move window to workspace 3"
msgstr "Pencereyi çalışma alanı 3'e taşı"
msgstr "Pencereyi çalışma alanı 3e taşı"
#: ../data/50-mutter-navigation.xml.in.h:5
#: data/50-mutter-navigation.xml:18
msgid "Move window to workspace 4"
msgstr "Pencereyi çalışma alanı 4'e taşı"
msgstr "Pencereyi çalışma alanı 4e taşı"
#: ../data/50-mutter-navigation.xml.in.h:6
#: data/50-mutter-navigation.xml:21
msgid "Move window to last workspace"
msgstr "Pencereyi son çalışma alanına taşı"
#: ../data/50-mutter-navigation.xml.in.h:7
#: data/50-mutter-navigation.xml:24
msgid "Move window one workspace to the left"
msgstr "Pencereyi soldaki çalışma alanına taşı"
#: ../data/50-mutter-navigation.xml.in.h:8
#: data/50-mutter-navigation.xml:27
msgid "Move window one workspace to the right"
msgstr "Pencereyi sağdaki çalışma alanına taşı"
#: ../data/50-mutter-navigation.xml.in.h:9
#: data/50-mutter-navigation.xml:30
msgid "Move window one workspace up"
msgstr "Pencereyi üstteki çalışma alanına taşı"
#: ../data/50-mutter-navigation.xml.in.h:10
#: data/50-mutter-navigation.xml:33
msgid "Move window one workspace down"
msgstr "Pencereyi alttaki çalışma alanına taşı"
#: ../data/50-mutter-navigation.xml.in.h:11
#: data/50-mutter-navigation.xml:36
msgid "Move window one monitor to the left"
msgstr "Pencereyi soldaki monitöre taşı"
#: ../data/50-mutter-navigation.xml.in.h:12
#: data/50-mutter-navigation.xml:39
msgid "Move window one monitor to the right"
msgstr "Pencereyi sağdaki monitöre taşı"
#: ../data/50-mutter-navigation.xml.in.h:13
#: data/50-mutter-navigation.xml:42
msgid "Move window one monitor up"
msgstr "Pencereyi üstteki monitöre taşı"
#: ../data/50-mutter-navigation.xml.in.h:14
#: data/50-mutter-navigation.xml:45
msgid "Move window one monitor down"
msgstr "Pencereyi alttaki monitöre taşı"
#: ../data/50-mutter-navigation.xml.in.h:15
#: data/50-mutter-navigation.xml:49
msgid "Switch applications"
msgstr "Uygulamalar arasında geçiş yap"
#: ../data/50-mutter-navigation.xml.in.h:16
#: data/50-mutter-navigation.xml:54
msgid "Switch to previous application"
msgstr "Önceki uygulamaya geç"
#: ../data/50-mutter-navigation.xml.in.h:17
#: data/50-mutter-navigation.xml:58
msgid "Switch windows"
msgstr "Pencereler arasında geçiş yap"
#: ../data/50-mutter-navigation.xml.in.h:18
#: data/50-mutter-navigation.xml:63
msgid "Switch to previous window"
msgstr "Önceki pencereye geç"
#: ../data/50-mutter-navigation.xml.in.h:19
#: data/50-mutter-navigation.xml:67
msgid "Switch windows of an application"
msgstr "Uygulamanın pencereleri arasında geçiş yap"
#: ../data/50-mutter-navigation.xml.in.h:20
#: data/50-mutter-navigation.xml:72
msgid "Switch to previous window of an application"
msgstr "Uygulamanın bir önceki penceresine geç"
#: ../data/50-mutter-navigation.xml.in.h:21
#: data/50-mutter-navigation.xml:76
msgid "Switch system controls"
msgstr "Sistem denetimleri arasında geçiş yap"
#: ../data/50-mutter-navigation.xml.in.h:22
#: data/50-mutter-navigation.xml:81
msgid "Switch to previous system control"
msgstr "Önceki sistem denetimine geç"
#: ../data/50-mutter-navigation.xml.in.h:23
#: data/50-mutter-navigation.xml:85
msgid "Switch windows directly"
msgstr "Pencereler arasında doğrudan geçiş yap"
#: ../data/50-mutter-navigation.xml.in.h:24
#: data/50-mutter-navigation.xml:90
msgid "Switch directly to previous window"
msgstr "Önceki pencereye doğrudan geç"
#: ../data/50-mutter-navigation.xml.in.h:25
#: data/50-mutter-navigation.xml:94
msgid "Switch windows of an app directly"
msgstr "Uygulamanın pencereleri arasında anında geçiş yap"
#: ../data/50-mutter-navigation.xml.in.h:26
#: data/50-mutter-navigation.xml:99
msgid "Switch directly to previous window of an app"
msgstr "Bir uygulamanın önceki penceresine doğrudan geç"
#: ../data/50-mutter-navigation.xml.in.h:27
#: data/50-mutter-navigation.xml:103
msgid "Switch system controls directly"
msgstr "Sistem denetimleri arasında doğrudan geçiş yap"
#: ../data/50-mutter-navigation.xml.in.h:28
#: data/50-mutter-navigation.xml:108
msgid "Switch directly to previous system control"
msgstr "Önceki sistem denetimine doğrudan geç"
#: ../data/50-mutter-navigation.xml.in.h:29
#: data/50-mutter-navigation.xml:111
msgid "Hide all normal windows"
msgstr "Tüm normal pencereleri gizle"
#: ../data/50-mutter-navigation.xml.in.h:30
#: data/50-mutter-navigation.xml:114
msgid "Switch to workspace 1"
msgstr "Çalışma alanı 1'e geç"
msgstr "Çalışma alanı 1e geç"
#: ../data/50-mutter-navigation.xml.in.h:31
#: data/50-mutter-navigation.xml:117
msgid "Switch to workspace 2"
msgstr "Çalışma alanı 2'ye geç"
msgstr "Çalışma alanı 2ye geç"
#: ../data/50-mutter-navigation.xml.in.h:32
#: data/50-mutter-navigation.xml:120
msgid "Switch to workspace 3"
msgstr "Çalışma alanı 3'e geç"
msgstr "Çalışma alanı 3e geç"
#: ../data/50-mutter-navigation.xml.in.h:33
#: data/50-mutter-navigation.xml:123
msgid "Switch to workspace 4"
msgstr "Çalışma alanı 4'e geç"
msgstr "Çalışma alanı 4e geç"
#: ../data/50-mutter-navigation.xml.in.h:34
#: data/50-mutter-navigation.xml:126
msgid "Switch to last workspace"
msgstr "Son çalışma alanına geç"
#: ../data/50-mutter-navigation.xml.in.h:35
#: data/50-mutter-navigation.xml:129
msgid "Move to workspace left"
msgstr "Soldaki çalışma alanına taşı"
#: ../data/50-mutter-navigation.xml.in.h:36
#: data/50-mutter-navigation.xml:132
msgid "Move to workspace right"
msgstr "Sağdaki çalışma alanına taşı"
#: ../data/50-mutter-navigation.xml.in.h:37
#: data/50-mutter-navigation.xml:135
msgid "Move to workspace above"
msgstr "Üstteki çalışma alanına taşı"
#: ../data/50-mutter-navigation.xml.in.h:38
#: data/50-mutter-navigation.xml:138
msgid "Move to workspace below"
msgstr "Alttaki çalışma alanına taşı"
#: ../data/50-mutter-system.xml.in.h:1
#: data/50-mutter-system.xml:6
msgid "System"
msgstr "Sistem"
#: ../data/50-mutter-system.xml.in.h:2
#: data/50-mutter-system.xml:8
msgid "Show the run command prompt"
msgstr "Komut çalıştırma istemini göster"
#: ../data/50-mutter-system.xml.in.h:3
#: data/50-mutter-system.xml:10
msgid "Show the activities overview"
msgstr "Etkinlik genel görünümünü göster"
#: ../data/50-mutter-windows.xml.in.h:1
#: data/50-mutter-windows.xml:6
msgid "Windows"
msgstr "Pencereler"
#: ../data/50-mutter-windows.xml.in.h:2
#: data/50-mutter-windows.xml:8
msgid "Activate the window menu"
msgstr "Pencere menüsünü etkinleştir"
#: ../data/50-mutter-windows.xml.in.h:3
#: data/50-mutter-windows.xml:10
msgid "Toggle fullscreen mode"
msgstr "Tam ekran kipini aç veya kapat"
msgstr "Tam ekran kipini değiştir"
#: ../data/50-mutter-windows.xml.in.h:4
#: data/50-mutter-windows.xml:12
msgid "Toggle maximization state"
msgstr "Ekranı kaplama durumunu aç veya kapat"
msgstr "Ekranı kaplama durumunu değiştir"
#: ../data/50-mutter-windows.xml.in.h:5
#: data/50-mutter-windows.xml:14
msgid "Maximize window"
msgstr "Bencereyi büyült"
#: ../data/50-mutter-windows.xml.in.h:6
#: data/50-mutter-windows.xml:16
msgid "Restore window"
msgstr "Pencereyi geri al"
msgstr "Pencereyi eski haline getir"
#: ../data/50-mutter-windows.xml.in.h:7
#: data/50-mutter-windows.xml:18
msgid "Toggle shaded state"
msgstr "Toplanmış durumu aç veya kapat"
msgstr "Toplanmış durumu değiştir"
#: ../data/50-mutter-windows.xml.in.h:8
#: data/50-mutter-windows.xml:20
msgid "Close window"
msgstr "Pencereyi kapat"
#: ../data/50-mutter-windows.xml.in.h:9
#: data/50-mutter-windows.xml:22
msgid "Hide window"
msgstr "Pencereyi gizle"
#: ../data/50-mutter-windows.xml.in.h:10
#: data/50-mutter-windows.xml:24
msgid "Move window"
msgstr "Pencere taşı"
#: ../data/50-mutter-windows.xml.in.h:11
#: data/50-mutter-windows.xml:26
msgid "Resize window"
msgstr "Pencereyi yeniden boyutlandır"
#: ../data/50-mutter-windows.xml.in.h:12
#: data/50-mutter-windows.xml:29
msgid "Toggle window on all workspaces or one"
msgstr ""
"Pencerenin tüm çalışma alanlarında veya sadece bir tanesi üzerinde olmasını "
"seç"
"Pencerenin tüm çalışma alanlarında veya yalnızca bir tanesi üzerinde "
"olmasını seç"
#: ../data/50-mutter-windows.xml.in.h:13
#: data/50-mutter-windows.xml:31
msgid "Raise window if covered, otherwise lower it"
msgstr ""
"Pencere eğer başkası tarafından kapatılmışsa yukarı çıkar, yoksa aşağıya it"
msgstr "Pencere altta kalmışsa yükselt, aksi halde alçalt"
#: ../data/50-mutter-windows.xml.in.h:14
#: data/50-mutter-windows.xml:33
msgid "Raise window above other windows"
msgstr "Pencereyi diğerlerinin üstüne çıkar"
#: ../data/50-mutter-windows.xml.in.h:15
#: data/50-mutter-windows.xml:35
msgid "Lower window below other windows"
msgstr "Pencereyi diğerlerinin altına gönder"
#: ../data/50-mutter-windows.xml.in.h:16
#: data/50-mutter-windows.xml:37
msgid "Maximize window vertically"
msgstr "Pencereyi dikey olarak büyült"
#: ../data/50-mutter-windows.xml.in.h:17
#: data/50-mutter-windows.xml:39
msgid "Maximize window horizontally"
msgstr "Pencereyi yatay olarak büyült"
#: ../data/50-mutter-windows.xml.in.h:18
#: data/50-mutter-windows.xml:43
msgid "View split on left"
msgstr "Solda bölünmüş olarak göster"
#: ../data/50-mutter-windows.xml.in.h:19
#: data/50-mutter-windows.xml:47
msgid "View split on right"
msgstr "Sağda bölünmüş olarak göster"
#: ../data/mutter.desktop.in.h:1
#: data/mutter.desktop.in:4
msgid "Mutter"
msgstr "Mutter"
#: ../data/org.gnome.mutter.gschema.xml.in.h:1
#: data/org.gnome.mutter.gschema.xml.in:7
msgid "Modifier to use for extended window management operations"
msgstr "Genişletilmiş pencere yönetimi işlemleri için kullanılacak değiştirici"
#: ../data/org.gnome.mutter.gschema.xml.in.h:2
#: data/org.gnome.mutter.gschema.xml.in:8
#| msgid ""
#| "This key will initiate the \"overlay\", which is a combination window "
#| "overview and application launching system. The default is intended to be "
#| "the \"Windows key\" on PC hardware. It's expected that this binding "
#| "either the default or set to the empty string."
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
"\"Windows key\" on PC hardware. It's expected that this binding either the "
"default or set to the empty string."
"This key will initiate the overlay, which is a combination window overview "
"and application launching system. The default is intended to be the “Windows "
"key on PC hardware. Its expected that this binding either the default or "
"set to the empty string."
msgstr ""
"Bu anahtar, pencere genel görünümü ve uygulama başlatma sisteminin bir "
"birleşimi olan \"bindirme\" işlemini başlatır. Öntanımlı olarak PC "
"donanımındaki \"windows tuşu\" olması tasarlanmıştır. Bağlayıcı varsayılan "
"olarak veya boş dize olarak ayarlanması beklenir."
"Bu tuş, pencere genel görünümü ve uygulama başlatma sisteminin bir birleşimi "
"olan bindirme işlemini başlatır. Öntanımlı olarak PC donanımındaki "
"“Windows tuşu olması tasarlanmıştır. Bu bağlayıcının öntanımlı veya boş "
"dizge olarak ayarlanması beklenir."
#: ../data/org.gnome.mutter.gschema.xml.in.h:3
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
msgstr "Yardımcı diyalogları ekle"
#: ../data/org.gnome.mutter.gschema.xml.in.h:4
#: data/org.gnome.mutter.gschema.xml.in:21
msgid ""
"When true, instead of having independent titlebars, modal dialogs appear "
"attached to the titlebar of the parent window and are moved together with "
"the parent window."
msgstr ""
"Eğer \"doğru\" ise, bağımsız başlık çubuklarına sahip olduğundan, yardım "
"diyalogları üst pencerenin başlık çubuğunda ekli gözükür ve üst pencere ile "
"birlikte hareket eder."
"Seçili olduğunda, bağımsız başlık çubuklarına sahip olmak yerine, kipsel "
"diyaloglar üst pencerenin başlık çubuğunda ekli gözükür ve üst pencere ile "
"birlikte hareket ettirilebilirler."
#: ../data/org.gnome.mutter.gschema.xml.in.h:5
#: data/org.gnome.mutter.gschema.xml.in:30
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr ""
"Pencereler ekran kenarlarında bırakıldığında kenar döşemeyi etkinleştir."
#: ../data/org.gnome.mutter.gschema.xml.in.h:6
#: data/org.gnome.mutter.gschema.xml.in:31
msgid ""
"If enabled, dropping windows on vertical screen edges maximizes them "
"vertically and resizes them horizontally to cover half of the available "
@ -317,13 +323,13 @@ msgstr ""
"şekilde yeniden boyutlandırılır. Ekranın tepedeki kenarına bırakılan "
"pencereler ekranı tamamen kaplar."
#: ../data/org.gnome.mutter.gschema.xml.in.h:7
#: data/org.gnome.mutter.gschema.xml.in:40
msgid "Workspaces are managed dynamically"
msgstr "Çalışma alanları dinamik olarak yönetilir"
#: ../data/org.gnome.mutter.gschema.xml.in.h:8
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
@ -331,23 +337,23 @@ msgstr ""
"çalışma alanı mı olacağını belirler (org.gnome.desktop.wm.preferences "
"içindeki num-workspaces değişkeni tarafından belirlenir)."
#: ../data/org.gnome.mutter.gschema.xml.in.h:9
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
msgstr "Sadece birincil monitördeki çalışma alanları"
msgstr "Yalnızca birincil monitördeki çalışma alanları"
#: ../data/org.gnome.mutter.gschema.xml.in.h:10
#: data/org.gnome.mutter.gschema.xml.in:51
msgid ""
"Determines whether workspace switching should happen for windows on all "
"monitors or only for windows on the primary monitor."
msgstr ""
"Çalışma alanı değiştirilmesinin, tüm monitörlerdeki pencerelerde mi yoksa "
"sadece birincil monitördekilerde mi gerçekleşeceğini belirler."
"yalnızca birincil monitördekilerde mi gerçekleşeceğini belirler."
#: ../data/org.gnome.mutter.gschema.xml.in.h:11
#: data/org.gnome.mutter.gschema.xml.in:59
msgid "No tab popup"
msgstr "Sekme açılır penceresi yok"
#: ../data/org.gnome.mutter.gschema.xml.in.h:12
#: data/org.gnome.mutter.gschema.xml.in:60
msgid ""
"Determines whether the use of popup and highlight frame should be disabled "
"for window cycling."
@ -355,37 +361,42 @@ msgstr ""
"Pencere geçişinde çerçeve vurgulanması ve açılır pencere kullanımının "
"kapatılıp kapatılmayacağını belirler."
#: ../data/org.gnome.mutter.gschema.xml.in.h:13
#: data/org.gnome.mutter.gschema.xml.in:68
msgid "Delay focus changes until the pointer stops moving"
msgstr "Odak değişikliklerini işaretçi hareketi durana kadar ertele"
#: ../data/org.gnome.mutter.gschema.xml.in.h:14
#: data/org.gnome.mutter.gschema.xml.in:69
#| msgid ""
#| "If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
#| "the focus will not be changed immediately when entering a window, but "
#| "only after the pointer stops moving."
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 ""
"Eğer seçiliyse ve odaklama kipi \"sloppy\" ya da \"mouse\" ise bir pencereye "
"geçişte odak hemen değil, fakat işaretçi hareket etmeyi bıraktığında değişir."
"Eğer seçiliyse ve odaklama kipi sloppy yada mouse ise bir pencereye "
"geçişte odak hemen değil, yanlızca işaretçi hareket etmeyi bıraktığında "
"değişir."
#: ../data/org.gnome.mutter.gschema.xml.in.h:15
#: data/org.gnome.mutter.gschema.xml.in:79
msgid "Draggable border width"
msgstr "Sürüklenebilir kenarlık genişliği"
#: ../data/org.gnome.mutter.gschema.xml.in.h:16
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"Sürüklenebilir kenarlıkların toplam miktarı. Eğer temanın görünür "
"kenarlıkları yetersiz gelirse, bu değere ulaşmak için görünmez kenarlıklar "
"eklenir."
#: ../data/org.gnome.mutter.gschema.xml.in.h:17
#: data/org.gnome.mutter.gschema.xml.in:89
msgid "Auto maximize nearly monitor sized windows"
msgstr "Ekran boyutuna yakın pencereleri otomatik ekranı kaplat"
#: ../data/org.gnome.mutter.gschema.xml.in.h:18
#: data/org.gnome.mutter.gschema.xml.in:90
msgid ""
"If enabled, new windows that are initially the size of the monitor "
"automatically get maximized."
@ -393,11 +404,11 @@ msgstr ""
"Etkinleştirildiğinde ekran boyutunda başlayan yeni pencereler otomatik "
"olarak ekranı kaplar."
#: ../data/org.gnome.mutter.gschema.xml.in.h:19
#: data/org.gnome.mutter.gschema.xml.in:98
msgid "Place new windows in the center"
msgstr "Yeni pencereleri ekranın ortasına yerleştir"
#: ../data/org.gnome.mutter.gschema.xml.in.h:20
#: data/org.gnome.mutter.gschema.xml.in:99
msgid ""
"When true, the new windows will always be put in the center of the active "
"screen of the monitor."
@ -405,218 +416,277 @@ msgstr ""
"Etkinleştirildiğinde, yeni pencereler her zaman monitörün etkin ekranında "
"ortaya yerleştirilir."
#: ../data/org.gnome.mutter.gschema.xml.in.h:21
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Deneysel özellikleri etkinleştir"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart."
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: • “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:141
msgid "Select window from tab popup"
msgstr "Pencereyi, sekme açılır penceresinden seç"
#: ../data/org.gnome.mutter.gschema.xml.in.h:22
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Sekmeyi yeni pencerede açmayı iptal et"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "VT 1'e geç"
msgstr "VT 1e geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
#: data/org.gnome.mutter.wayland.gschema.xml.in:10
msgid "Switch to VT 2"
msgstr "VT 2'ye geç"
msgstr "VT 2ye geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
#: data/org.gnome.mutter.wayland.gschema.xml.in:14
msgid "Switch to VT 3"
msgstr "VT 3'e geç"
msgstr "VT 3e geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
#: data/org.gnome.mutter.wayland.gschema.xml.in:18
msgid "Switch to VT 4"
msgstr "VT 4'e geç"
msgstr "VT 4e geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
#: data/org.gnome.mutter.wayland.gschema.xml.in:22
msgid "Switch to VT 5"
msgstr "VT 5'e geç"
msgstr "VT 5e geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
#: data/org.gnome.mutter.wayland.gschema.xml.in:26
msgid "Switch to VT 6"
msgstr "VT 6'ya geç"
msgstr "VT 6ya geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
#: data/org.gnome.mutter.wayland.gschema.xml.in:30
msgid "Switch to VT 7"
msgstr "VT 7'ye geç"
msgstr "VT 7ye geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#: data/org.gnome.mutter.wayland.gschema.xml.in:34
msgid "Switch to VT 8"
msgstr "VT 8'e geç"
msgstr "VT 8e geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#: data/org.gnome.mutter.wayland.gschema.xml.in:38
msgid "Switch to VT 9"
msgstr "VT 9'a geç"
msgstr "VT 9a geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#: data/org.gnome.mutter.wayland.gschema.xml.in:42
msgid "Switch to VT 10"
msgstr "VT 10'a geç"
msgstr "VT 10a geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#: data/org.gnome.mutter.wayland.gschema.xml.in:46
msgid "Switch to VT 11"
msgstr "VT 11'e geç"
msgstr "VT 11e geç"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#: data/org.gnome.mutter.wayland.gschema.xml.in:50
msgid "Switch to VT 12"
msgstr "VT 12'ye geç"
msgstr "VT 12ye geç"
#: ../src/backends/meta-monitor-manager.c:515
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1848
#, c-format
msgid "Mode Switch (Group %d)"
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:1870
msgid "Switch monitor"
msgstr "Monitör değiştir"
#: src/backends/meta-input-settings.c:1872
msgid "Show on-screen help"
msgstr "Ekranda yardımı göster"
#: src/backends/meta-monitor-manager.c:783
msgid "Built-in display"
msgstr "Yerleşik ekran"
#: ../src/backends/meta-monitor-manager.c:538
#: src/backends/meta-monitor-manager.c:806
msgid "Unknown"
msgstr "Bilinmiyor"
#: ../src/backends/meta-monitor-manager.c:540
#: 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:548
#: 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:456
#: 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"
"\"."
"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
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Etkinlik zili"
#: ../src/core/delete.c:127
#. 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
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Uygulama cevap vermiyor"
#: ../src/core/delete.c:134
#: 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 d a "
"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 "_Wait"
msgstr "_Bekle"
#: ../src/core/delete.c:141
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Sonlandır"
#: ../src/core/display.c:555
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "X Pencere Sistemi '%s' ekranıılamadı\n"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Bekle"
#: ../src/core/main.c:181
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "X Pencere Sistemi “%s” ekranıılamadı\n"
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Ortam yöneticisine olan bağlantıyı kapat"
#: ../src/core/main.c:187
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Çalışan pencere yöneticisinin yerini al"
#: ../src/core/main.c:193
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Ortam yönetim ID'sini belirtin"
msgstr "Ortam yönetim IDsini belirt"
#: ../src/core/main.c:198
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Kullanılacak X Ekranı"
#: ../src/core/main.c:204
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Ortamı kayıtlı dosyadan başlat"
#: ../src/core/main.c:210
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "X çağrılarını eşazamanlı yap"
#: ../src/core/main.c:217
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Bir wayland dizgicisi olarak çalıştır"
#: ../src/core/main.c:223
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Yuvalanmış dizgici olarak çalıştır"
#: ../src/core/main.c:231
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "İç içe değil tam ekran sunucusu olarak çalıştır"
#: ../src/core/mutter.c:39
#: src/core/mutter.c:39
#, c-format
#| msgid ""
#| "mutter %s\n"
#| "Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
#| "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 (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
"PARTICULAR PURPOSE.\n"
msgstr ""
"mutter %s\n"
"Telif Hakkı (C) 2001-%d Havoc Pennington, Red Hat, Inc., ve diğerleri\n"
"Bu bir özgür yazılımdır; telif koşullarını öğrenmek için kaynak koda bakın.\n"
"Hiç bir garantisi, BELİRLİ BİR AMACA UYGUNLUĞU için dahi, YOKTUR.\n"
"Telif Hakkı © 2001-%d Havoc Pennington, Red Hat, Inc., ve diğerleri\n"
"Bu bir özgür yazılımdır; kopyalama koşullarını öğrenmek için kaynağa bakın.\n"
"Hiçbir garanti YOK; BELİRLİ BİR AMACA UYGUNLUK ya da SATILABİLİRLİK için "
"dahi.\n"
#: ../src/core/mutter.c:53
#: src/core/mutter.c:53
msgid "Print version"
msgstr "Sürümü yazdır"
#: ../src/core/mutter.c:59
#: src/core/mutter.c:59
msgid "Mutter plugin to use"
msgstr "Kullanılacak Mutter eklentisi"
#: ../src/core/prefs.c:1997
#: src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "Çalışma Alanı %d"
#: ../src/core/screen.c:521
#: 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 ""
"\"%s\" ekranı zaten bir pencere yöneticisine sahip; geçerli pencere "
"“%s” ekranı zaten bir pencere yöneticisine sahip; geçerli pencere "
"yöneticisinin yerine bir başkasını koymak için --replace seçeneğini "
"kullanmayı deneyin."
#: ../src/core/screen.c:603
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "'%2$s' X oturumundaki ekran %1$d geçersiz\n"
#| 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"
#: ../src/core/util.c:121
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter, ayrıntılı kip desteği olmadan derlenmiş\n"
#: ../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."
msgstr ""
"Bu pencereler, &quot;geçerli ayarları kaydet&quot; özelliğini desteklemiyor "
"ve bir dahaki girişinizde elle yeniden başlatmanız gerekecek."
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Kip Anahtarı: Kip %d"
#: ../src/x11/window-props.c:549
#: 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."
msgstr ""
"Bu pencereler, “geçerli ayarları kaydet” özelliğini desteklemiyor ve bir "
"dahaki girişinizde elle yeniden başlatılmak zorunda."
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (%s üzerinde)"

View File

@ -222,6 +222,10 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
core/constraints.c \
core/constraints.h \
core/core.c \
core/meta-close-dialog.c \
meta/meta-close-dialog.h \
core/meta-close-dialog-default.c \
core/meta-close-dialog-default-private.h \
core/delete.c \
core/display.c \
core/display-private.h \
@ -435,6 +439,7 @@ libmutterinclude_headers = \
meta/meta-background-actor.h \
meta/meta-background-image.h \
meta/meta-background-group.h \
meta/meta-close-dialog.h \
meta/meta-cursor-tracker.h \
meta/meta-dnd.h \
meta/meta-idle-monitor.h \

View File

@ -60,6 +60,8 @@ static guint signals[N_SIGNALS];
static MetaBackend *_backend;
static gboolean stage_views_disabled = FALSE;
/**
* meta_get_backend:
*
@ -549,6 +551,7 @@ meta_backend_enable_experimental_feature (MetaBackend *backend,
static void
meta_backend_class_init (MetaBackendClass *klass)
{
const gchar *mutter_stage_views;
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = meta_backend_finalize;
@ -595,6 +598,9 @@ meta_backend_class_init (MetaBackendClass *klass)
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;
}
static gboolean
@ -1030,17 +1036,10 @@ meta_backend_display_opened (MetaBackend *backend)
gboolean
meta_is_stage_views_enabled (void)
{
const gchar *mutter_stage_views;
if (!meta_is_wayland_compositor ())
return FALSE;
mutter_stage_views = g_getenv ("MUTTER_STAGE_VIEWS");
if (!mutter_stage_views)
return TRUE;
return !g_str_equal (mutter_stage_views, "0");
return !stage_views_disabled;
}
gboolean

View File

@ -703,7 +703,7 @@ meta_onscreen_native_flip_crtcs (CoglOnscreen *onscreen)
flip_closure = g_cclosure_new (G_CALLBACK (on_crtc_flipped),
g_object_ref (view),
(GClosureNotify) flip_closure_destroyed);
g_closure_set_marshal (flip_closure, g_cclosure_marshal_generic);
g_closure_set_marshal (flip_closure, g_cclosure_marshal_VOID__VOID);
/* Either flip the CRTC's of the monitor info, if we are drawing just part
* of the stage, or all of the CRTC's if we are drawing the whole stage.

View File

@ -62,4 +62,7 @@ gint64 meta_compositor_monotonic_time_to_server_time (MetaDisplay *display,
void meta_compositor_flash_window (MetaCompositor *compositor,
MetaWindow *window);
MetaCloseDialog * meta_compositor_create_close_dialog (MetaCompositor *compositor,
MetaWindow *window);
#endif /* META_COMPOSITOR_PRIVATE_H */

View File

@ -388,7 +388,9 @@ meta_begin_modal_for_plugin (MetaCompositor *compositor,
meta_display_sync_wayland_input_focus (display);
meta_display_cancel_touch (display);
#ifdef HAVE_WAYLAND
meta_dnd_wayland_handle_begin_modal (compositor);
#endif
}
return TRUE;
@ -1412,3 +1414,11 @@ meta_compositor_show_window_menu_for_rect (MetaCompositor *compositor,
{
meta_plugin_manager_show_window_menu_for_rect (compositor->plugin_mgr, window, menu, rect);
}
MetaCloseDialog *
meta_compositor_create_close_dialog (MetaCompositor *compositor,
MetaWindow *window)
{
return meta_plugin_manager_create_close_dialog (compositor->plugin_mgr,
window);
}

View File

@ -27,6 +27,7 @@
#include <meta/workspace.h>
#include "meta-module.h"
#include "window-private.h"
#include "meta-close-dialog-default-private.h"
#include <string.h>
#include <stdlib.h>
@ -376,3 +377,16 @@ meta_plugin_manager_show_window_menu_for_rect (MetaPluginManager *plugin_mgr,
if (klass->show_window_menu_for_rect)
klass->show_window_menu_for_rect (plugin, window, menu, rect);
}
MetaCloseDialog *
meta_plugin_manager_create_close_dialog (MetaPluginManager *plugin_mgr,
MetaWindow *window)
{
MetaPlugin *plugin = plugin_mgr->plugin;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
if (klass->create_close_dialog)
return klass->create_close_dialog (plugin, window);
return meta_close_dialog_default_new (window);
}

View File

@ -91,5 +91,7 @@ void meta_plugin_manager_show_window_menu_for_rect (MetaPluginManager *mgr,
MetaWindowMenuType menu,
MetaRectangle *rect);
MetaCloseDialog * meta_plugin_manager_create_close_dialog (MetaPluginManager *plugin_mgr,
MetaWindow *window);
#endif

View File

@ -220,11 +220,7 @@ meta_shadow_paint (MetaShadow *shadow,
int dest_x[4];
int dest_y[4];
int n_x, n_y;
cogl_pipeline_set_color4ub (shadow->pipeline,
opacity, opacity, opacity, opacity);
cogl_set_source (shadow->pipeline);
gboolean source_updated = FALSE;
if (shadow->scale_width)
{
@ -300,6 +296,17 @@ meta_shadow_paint (MetaShadow *shadow,
else
overlap = CAIRO_REGION_OVERLAP_IN;
if (overlap == CAIRO_REGION_OVERLAP_OUT)
continue;
if (!source_updated)
{
cogl_pipeline_set_color4ub (shadow->pipeline,
opacity, opacity, opacity, opacity);
cogl_set_source (shadow->pipeline);
source_updated = TRUE;
}
/* There's quite a bit of overhead from allocating a new
* region in order to find an exact intersection and
* generating more geometry - we make the assumption that

View File

@ -38,14 +38,6 @@
#include "backends/meta-backend-private.h"
#include "compositor/region-utils.h"
enum {
PAINTING,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL];
struct _MetaSurfaceActorWaylandPrivate
{
MetaWaylandSurface *surface;
@ -398,8 +390,6 @@ meta_surface_actor_wayland_paint (ClutterActor *actor)
wl_list_init (&priv->frame_callback_list);
}
g_signal_emit (actor, signals[PAINTING], 0);
CLUTTER_ACTOR_CLASS (meta_surface_actor_wayland_parent_class)->paint (actor);
}
@ -449,13 +439,6 @@ meta_surface_actor_wayland_class_init (MetaSurfaceActorWaylandClass *klass)
surface_actor_class->get_window = meta_surface_actor_wayland_get_window;
object_class->dispose = meta_surface_actor_wayland_dispose;
signals[PAINTING] = g_signal_new ("painting",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
static void

View File

@ -35,7 +35,6 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (MetaSurfaceActor, meta_surface_actor, CLUTTER_
G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
enum {
REPAINT_SCHEDULED,
SIZE_CHANGED,
LAST_SIGNAL,
@ -121,13 +120,6 @@ meta_surface_actor_class_init (MetaSurfaceActorClass *klass)
object_class->dispose = meta_surface_actor_dispose;
actor_class->pick = meta_surface_actor_pick;
signals[REPAINT_SCHEDULED] = g_signal_new ("repaint-scheduled",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
signals[SIZE_CHANGED] = g_signal_new ("size-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@ -201,8 +193,7 @@ meta_surface_actor_update_area (MetaSurfaceActor *self,
{
MetaSurfaceActorPrivate *priv = self->priv;
if (meta_shaped_texture_update_area (priv->texture, x, y, width, height))
g_signal_emit (self, signals[REPAINT_SCHEDULED], 0);
meta_shaped_texture_update_area (priv->texture, x, y, width, height);
}
gboolean

View File

@ -82,7 +82,6 @@ struct _MetaWindowActorPrivate
guint send_frame_messages_timer;
gint64 frame_drawn_time;
guint repaint_scheduled_id;
guint size_changed_id;
/*
@ -194,6 +193,18 @@ frame_data_free (FrameData *frame)
g_slice_free (FrameData, frame);
}
static gboolean
meta_window_actor_queue_redraw (ClutterActor *actor,
ClutterActor *leaf,
ClutterPaintVolume *paint_volume)
{
MetaWindowActor *self = META_WINDOW_ACTOR (actor);
MetaWindowActorPrivate *priv = self->priv;
priv->repaint_scheduled = TRUE;
return CLUTTER_ACTOR_CLASS (meta_window_actor_parent_class)->queue_redraw (actor, leaf, paint_volume);
}
static void
meta_window_actor_class_init (MetaWindowActorClass *klass)
{
@ -211,6 +222,7 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
actor_class->paint = meta_window_actor_paint;
actor_class->get_paint_volume = meta_window_actor_get_paint_volume;
actor_class->queue_redraw = meta_window_actor_queue_redraw;
/**
* MetaWindowActor::first-frame:
@ -297,16 +309,6 @@ surface_size_changed (MetaSurfaceActor *actor,
meta_window_actor_update_shape (self);
}
static void
surface_repaint_scheduled (MetaSurfaceActor *actor,
gpointer user_data)
{
MetaWindowActor *self = META_WINDOW_ACTOR (user_data);
MetaWindowActorPrivate *priv = self->priv;
priv->repaint_scheduled = TRUE;
}
static gboolean
is_argb32 (MetaWindowActor *self)
{
@ -396,9 +398,7 @@ set_surface (MetaWindowActor *self,
if (priv->surface)
{
g_signal_handler_disconnect (priv->surface, priv->repaint_scheduled_id);
g_signal_handler_disconnect (priv->surface, priv->size_changed_id);
priv->repaint_scheduled_id = 0;
clutter_actor_remove_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (priv->surface));
g_object_unref (priv->surface);
}
@ -408,8 +408,6 @@ set_surface (MetaWindowActor *self,
if (priv->surface)
{
g_object_ref_sink (priv->surface);
priv->repaint_scheduled_id = g_signal_connect (priv->surface, "repaint-scheduled",
G_CALLBACK (surface_repaint_scheduled), self);
priv->size_changed_id = g_signal_connect (priv->surface, "size-changed",
G_CALLBACK (surface_size_changed), self);
clutter_actor_add_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (priv->surface));
@ -717,6 +715,7 @@ meta_window_actor_paint (ClutterActor *actor)
cairo_rectangle_int_t shape_bounds;
cairo_region_t *clip = priv->shadow_clip;
MetaWindow *window = priv->window;
gboolean partially_drawn = FALSE;
meta_window_actor_get_shape_bounds (self, &shape_bounds);
meta_window_actor_get_shadow_params (self, appears_focused, &params);
@ -734,6 +733,17 @@ meta_window_actor_paint (ClutterActor *actor)
cairo_region_subtract (clip, frame_bounds);
}
else if (clip)
{
cairo_rectangle_int_t shadow_bounds;
cairo_region_t *shadow_region;
meta_window_actor_get_shadow_bounds (self, appears_focused, &shadow_bounds);
shadow_region = cairo_region_create_rectangle (&shadow_bounds);
cairo_region_intersect (shadow_region, clip);
partially_drawn = !cairo_region_is_empty (shadow_region);
cairo_region_destroy (shadow_region);
}
meta_shadow_paint (shadow,
params.x_offset + shape_bounds.x,
@ -742,7 +752,7 @@ meta_window_actor_paint (ClutterActor *actor)
shape_bounds.height,
(clutter_actor_get_paint_opacity (actor) * params.opacity * window->opacity) / (255 * 255),
clip,
clip_shadow_under_window (self)); /* clip_strictly - not just as an optimization */
clip_shadow_under_window (self) || partially_drawn);
if (clip && clip != priv->shadow_clip)
cairo_region_destroy (clip);

View File

@ -57,7 +57,7 @@ meta_window_group_paint (ClutterActor *actor)
{
cairo_region_t *clip_region;
cairo_region_t *unobscured_region;
cairo_rectangle_int_t visible_rect, clip_rect;
cairo_rectangle_int_t visible_rect;
int paint_x_origin, paint_y_origin;
int screen_width, screen_height;
@ -109,11 +109,7 @@ meta_window_group_paint (ClutterActor *actor)
* sizes, we could intersect this with an accurate union of the
* monitors to avoid painting shadows that are visible only in the
* holes. */
clutter_stage_get_redraw_clip_bounds (CLUTTER_STAGE (stage),
&clip_rect);
clip_region = cairo_region_create_rectangle (&clip_rect);
clip_region = clutter_stage_get_redraw_clip (CLUTTER_STAGE (stage));
cairo_region_translate (clip_region, -paint_x_origin, -paint_y_origin);
meta_cullable_cull_out (META_CULLABLE (window_group), unobscured_region, clip_region);

View File

@ -25,145 +25,48 @@
#include <config.h>
#include "util-private.h"
#include "window-private.h"
#include "compositor-private.h"
#include <meta/errors.h>
#include <meta/workspace.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
static void
dialog_exited (GPid pid, int status, gpointer user_data)
close_dialog_response_cb (MetaCloseDialog *dialog,
MetaCloseDialogResponse response,
MetaWindow *window)
{
MetaWindow *window = user_data;
window->dialog_pid = -1;
/* exit status of 0 means the user pressed "Force Quit" */
if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
if (response == META_CLOSE_DIALOG_RESPONSE_FORCE_CLOSE)
meta_window_kill (window);
}
static void
present_existing_delete_dialog (MetaWindow *window,
guint32 timestamp)
meta_window_ensure_close_dialog (MetaWindow *window)
{
meta_topic (META_DEBUG_PING,
"Presenting existing ping dialog for %s\n",
window->desc);
MetaDisplay *display;
if (window->dialog_pid >= 0)
{
GSList *windows;
GSList *tmp;
if (window->close_dialog)
return;
/* Activate transient for window that belongs to
* mutter-dialog
*/
windows = meta_display_list_windows (window->display, META_LIST_DEFAULT);
tmp = windows;
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
if (w->transient_for == window && w->res_class &&
g_ascii_strcasecmp (w->res_class, "mutter-dialog") == 0)
{
meta_window_activate (w, timestamp);
break;
}
tmp = tmp->next;
}
g_slist_free (windows);
}
}
static void
show_delete_dialog (MetaWindow *window,
guint32 timestamp)
{
char *window_title;
gchar *window_content, *tmp;
GPid dialog_pid;
meta_topic (META_DEBUG_PING,
"Got delete ping timeout for %s\n",
window->desc);
if (window->dialog_pid >= 0)
{
present_existing_delete_dialog (window, timestamp);
return;
}
/* This is to get a better string if the title isn't representable
* in the locale encoding; actual conversion to UTF-8 is done inside
* meta_show_dialog */
if (window->title && window->title[0])
{
tmp = g_locale_from_utf8 (window->title, -1, NULL, NULL, NULL);
if (tmp == NULL)
window_title = NULL;
else
window_title = window->title;
g_free (tmp);
}
else
{
window_title = NULL;
}
if (window_title)
/* Translators: %s is a window title */
tmp = g_strdup_printf (_("“%s” is not responding."), window_title);
else
tmp = g_strdup (_("Application is not responding."));
window_content = g_strdup_printf (
"<big><b>%s</b></big>\n\n%s",
tmp,
_("You may choose to wait a short while for it to "
"continue or force the application to quit entirely."));
dialog_pid =
meta_show_dialog ("--question",
window_content, NULL,
window->screen->screen_name,
_("_Force Quit"), _("_Wait"),
"face-sad-symbolic", window->xwindow,
NULL, NULL);
g_free (window_content);
g_free (tmp);
window->dialog_pid = dialog_pid;
g_child_watch_add (dialog_pid, dialog_exited, window);
}
static void
kill_delete_dialog (MetaWindow *window)
{
if (window->dialog_pid > -1)
kill (window->dialog_pid, SIGTERM);
display = window->display;
window->close_dialog = meta_compositor_create_close_dialog (display->compositor,
window);
g_signal_connect (window->close_dialog, "response",
G_CALLBACK (close_dialog_response_cb), window);
}
void
meta_window_set_alive (MetaWindow *window,
gboolean is_alive)
{
if (is_alive)
kill_delete_dialog (window);
else
show_delete_dialog (window, CurrentTime);
if (is_alive && window->close_dialog)
{
meta_close_dialog_hide (window->close_dialog);
}
else if (!is_alive)
{
meta_window_ensure_close_dialog (window);
meta_close_dialog_show (window->close_dialog);
}
}
void
@ -207,9 +110,5 @@ meta_window_kill (MetaWindow *window)
void
meta_window_free_delete_dialog (MetaWindow *window)
{
if (window->dialog_pid >= 0)
{
kill (window->dialog_pid, 9);
window->dialog_pid = -1;
}
g_clear_object (&window->close_dialog);
}

View File

@ -443,11 +443,13 @@ calculate_compositor_configuration (MetaCompositorType *compositor_type,
#endif /* HAVE_WAYLAND */
*compositor_type = META_COMPOSITOR_TYPE_X11;
#ifdef HAVE_WAYLAND
if (opt_nested)
{
*backend_gtype = META_TYPE_BACKEND_X11_NESTED;
return;
}
#endif /* HAVE_WAYLAND */
#ifdef HAVE_NATIVE_BACKEND
if (opt_display_server)

View File

@ -0,0 +1,33 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2016 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, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#ifndef META_CLOSE_DIALOG_DEFAULT_H
#define META_CLOSE_DIALOG_DEFAULT_H
#define META_TYPE_CLOSE_DIALOG_DEFAULT (meta_close_dialog_default_get_type ())
G_DECLARE_FINAL_TYPE (MetaCloseDialogDefault,
meta_close_dialog_default,
META, CLOSE_DIALOG_DEFAULT,
GObject)
MetaCloseDialog * meta_close_dialog_default_new (MetaWindow *window);
#endif /* META_CLOSE_DIALOG_DEFAULT_H */

View File

@ -0,0 +1,279 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2001, 2002 Havoc Pennington
* Copyright (C) 2004 Elijah Newren
* Copyright (C) 2016 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, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#define _XOPEN_SOURCE /* for kill() */
#include <config.h>
#include "util-private.h"
#include "window-private.h"
#include <meta/meta-close-dialog.h>
#include "meta-close-dialog-default-private.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
typedef struct _MetaCloseDialogDefaultPrivate MetaCloseDialogDefaultPrivate;
struct _MetaCloseDialogDefault
{
GObject parent_instance;
MetaWindow *window;
int dialog_pid;
guint child_watch_id;
};
enum {
PROP_0,
PROP_WINDOW,
N_PROPS
};
GParamSpec *pspecs[N_PROPS] = { NULL };
static void meta_close_dialog_iface_init (MetaCloseDialogInterface *iface);
G_DEFINE_TYPE_WITH_CODE (MetaCloseDialogDefault, meta_close_dialog_default,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (META_TYPE_CLOSE_DIALOG,
meta_close_dialog_iface_init))
static void
dialog_exited (GPid pid,
int status,
gpointer user_data)
{
MetaCloseDialogDefault *dialog = user_data;
dialog->dialog_pid = -1;
/* exit status of 0 means the user pressed "Force Quit" */
if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
g_signal_emit_by_name (dialog, "response", META_CLOSE_DIALOG_RESPONSE_FORCE_CLOSE);
}
static void
present_existing_delete_dialog (MetaCloseDialogDefault *dialog)
{
MetaWindow *window;
GSList *windows;
GSList *tmp;
window = dialog->window;
if (dialog->dialog_pid < 0)
return;
meta_topic (META_DEBUG_PING,
"Presenting existing ping dialog for %s\n",
window->desc);
/* Activate transient for window that belongs to
* mutter-dialog
*/
windows = meta_display_list_windows (window->display, META_LIST_DEFAULT);
tmp = windows;
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
if (w->transient_for == window && w->res_class &&
g_ascii_strcasecmp (w->res_class, "mutter-dialog") == 0)
{
meta_window_activate (w, CLUTTER_CURRENT_TIME);
break;
}
tmp = tmp->next;
}
g_slist_free (windows);
}
static void
meta_close_dialog_default_show (MetaCloseDialog *dialog)
{
MetaCloseDialogDefault *dialog_default = META_CLOSE_DIALOG_DEFAULT (dialog);
MetaWindow *window = dialog_default->window;
gchar *window_title, *window_content, *tmp;
GPid dialog_pid;
if (dialog_default->dialog_pid >= 0)
{
present_existing_delete_dialog (dialog_default);
return;
}
/* This is to get a better string if the title isn't representable
* in the locale encoding; actual conversion to UTF-8 is done inside
* meta_show_dialog */
if (window->title && window->title[0])
{
tmp = g_locale_from_utf8 (window->title, -1, NULL, NULL, NULL);
if (tmp == NULL)
window_title = NULL;
else
window_title = window->title;
g_free (tmp);
}
else
{
window_title = NULL;
}
if (window_title)
/* Translators: %s is a window title */
tmp = g_strdup_printf (_("“%s” is not responding."), window_title);
else
tmp = g_strdup (_("Application is not responding."));
window_content = g_strdup_printf (
"<big><b>%s</b></big>\n\n%s",
tmp,
_("You may choose to wait a short while for it to "
"continue or force the application to quit entirely."));
dialog_pid =
meta_show_dialog ("--question",
window_content, NULL,
window->screen->screen_name,
_("_Force Quit"), _("_Wait"),
"face-sad-symbolic", window->xwindow,
NULL, NULL);
g_free (window_content);
g_free (tmp);
dialog_default->dialog_pid = dialog_pid;
g_child_watch_add (dialog_pid, dialog_exited, dialog);
}
static void
meta_close_dialog_default_hide (MetaCloseDialog *dialog)
{
MetaCloseDialogDefault *dialog_default;
dialog_default = META_CLOSE_DIALOG_DEFAULT (dialog);
if (dialog_default->child_watch_id)
{
g_source_remove (dialog_default->child_watch_id);
dialog_default->child_watch_id = 0;
}
if (dialog_default->dialog_pid > -1)
kill (dialog_default->dialog_pid, SIGTERM);
}
static void
meta_close_dialog_iface_init (MetaCloseDialogInterface *iface)
{
iface->show = meta_close_dialog_default_show;
iface->hide = meta_close_dialog_default_hide;
}
static void
meta_close_dialog_default_finalize (GObject *object)
{
MetaCloseDialogDefault *dialog;
dialog = META_CLOSE_DIALOG_DEFAULT (object);
if (dialog->child_watch_id)
g_source_remove (dialog->child_watch_id);
if (dialog->dialog_pid > -1)
{
kill (dialog->dialog_pid, SIGKILL);
dialog->dialog_pid = -1;
}
G_OBJECT_CLASS (meta_close_dialog_default_parent_class)->finalize (object);
}
static void
meta_close_dialog_default_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
MetaCloseDialogDefault *dialog;
dialog = META_CLOSE_DIALOG_DEFAULT (object);
switch (prop_id)
{
case PROP_WINDOW:
dialog->window = g_value_get_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
meta_close_dialog_default_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
MetaCloseDialogDefault *dialog;
dialog = META_CLOSE_DIALOG_DEFAULT (object);
switch (prop_id)
{
case PROP_WINDOW:
g_value_set_object (value, dialog->window);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
meta_close_dialog_default_class_init (MetaCloseDialogDefaultClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = meta_close_dialog_default_finalize;
object_class->set_property = meta_close_dialog_default_set_property;
object_class->get_property = meta_close_dialog_default_get_property;
g_object_class_override_property (object_class, PROP_WINDOW, "window");
}
static void
meta_close_dialog_default_init (MetaCloseDialogDefault *dialog)
{
dialog->dialog_pid = -1;
}
MetaCloseDialog *
meta_close_dialog_default_new (MetaWindow *window)
{
return g_object_new (META_TYPE_CLOSE_DIALOG_DEFAULT,
"window", window,
NULL);
}

View File

@ -0,0 +1,103 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2016 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, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#include "config.h"
#include "window-private.h"
#include "meta/meta-close-dialog.h"
#include "meta/meta-enum-types.h"
enum {
RESPONSE,
N_SIGNALS
};
guint dialog_signals[N_SIGNALS] = { 0 };
G_DEFINE_INTERFACE (MetaCloseDialog, meta_close_dialog, G_TYPE_OBJECT)
static void
meta_close_dialog_default_init (MetaCloseDialogInterface *iface)
{
g_object_interface_install_property (iface,
g_param_spec_object ("window",
"Window",
"Window",
META_TYPE_WINDOW,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
dialog_signals[RESPONSE] =
g_signal_new ("response",
G_TYPE_FROM_INTERFACE (iface),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1, META_TYPE_CLOSE_DIALOG_RESPONSE);
}
/**
* meta_close_dialog_show:
* @dialog: a #MetaCloseDialog
*
* Shows the close dialog.
**/
void
meta_close_dialog_show (MetaCloseDialog *dialog)
{
MetaCloseDialogInterface *iface;
g_return_if_fail (META_IS_CLOSE_DIALOG (dialog));
iface = META_CLOSE_DIALOG_GET_IFACE (dialog);
iface->show (dialog);
}
/**
* meta_close_dialog_hide:
* @dialog: a #MetaCloseDialog
*
* Hides the close dialog.
**/
void
meta_close_dialog_hide (MetaCloseDialog *dialog)
{
MetaCloseDialogInterface *iface;
g_return_if_fail (META_IS_CLOSE_DIALOG (dialog));
iface = META_CLOSE_DIALOG_GET_IFACE (dialog);
iface->hide (dialog);
}
/**
* meta_close_dialog_response:
* @dialog: a #MetaCloseDialog
* @response: a #MetaCloseDialogResponse
*
* Responds and closes the dialog. To be called by #MetaCloseDialog
* implementations.
**/
void
meta_close_dialog_response (MetaCloseDialog *dialog,
MetaCloseDialogResponse response)
{
g_signal_emit (dialog, dialog_signals[RESPONSE], 0, response);
meta_close_dialog_hide (dialog);
}

View File

@ -35,6 +35,7 @@
#include <config.h>
#include <meta/compositor.h>
#include <meta/window.h>
#include <meta/meta-close-dialog.h>
#include "screen-private.h"
#include <meta/util.h>
#include "stack.h"
@ -479,7 +480,7 @@ struct _MetaWindow
int stack_position; /* see comment in stack.h */
/* Managed by delete.c */
int dialog_pid;
MetaCloseDialog *close_dialog;
/* maintained by group.c */
MetaGroup *group;

View File

@ -878,8 +878,6 @@ _meta_window_shared_new (MetaDisplay *display,
window->constructing = TRUE;
window->dialog_pid = -1;
window->client_type = client_type;
window->surface = surface;
window->xwindow = xwindow;
@ -2957,7 +2955,11 @@ unmaximize_window_before_freeing (MetaWindow *window)
window->rect = window->saved_rect;
set_net_wm_state (window);
}
else if (window->screen->closing) /* See bug #358042 */
else if (window->screen->closing /* See bug #358042 */
#ifdef HAVE_WAYLAND
&& !meta_is_wayland_compositor ()
#endif
)
{
/* Do NOT update net_wm_state: this screen is closing,
* it likely will be managed by another window manager

View File

@ -0,0 +1,53 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2016 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, see <http://www.gnu.org/licenses/>.
*
* Author: Carlos Garnacho <carlosg@gnome.org>
*/
#ifndef META_CLOSE_DIALOG_H
#define META_CLOSE_DIALOG_H
#include <glib-object.h>
#include <meta/window.h>
#define META_TYPE_CLOSE_DIALOG (meta_close_dialog_get_type ())
G_DECLARE_INTERFACE (MetaCloseDialog, meta_close_dialog,
META, CLOSE_DIALOG, GObject)
typedef enum
{
META_CLOSE_DIALOG_RESPONSE_WAIT,
META_CLOSE_DIALOG_RESPONSE_FORCE_CLOSE,
} MetaCloseDialogResponse;
struct _MetaCloseDialogInterface
{
GTypeInterface parent_iface;
void (* show) (MetaCloseDialog *dialog);
void (* hide) (MetaCloseDialog *dialog);
};
void meta_close_dialog_show (MetaCloseDialog *dialog);
void meta_close_dialog_hide (MetaCloseDialog *dialog);
void meta_close_dialog_response (MetaCloseDialog *dialog,
MetaCloseDialogResponse response);
#endif /* META_CLOSE_DIALOG_H */

View File

@ -26,6 +26,7 @@
#include <meta/compositor.h>
#include <meta/compositor-mutter.h>
#include <meta/meta-version.h>
#include <meta/meta-close-dialog.h>
#include <clutter/clutter.h>
#include <X11/extensions/Xfixes.h>
@ -228,6 +229,16 @@ struct _MetaPluginClass
*/
const MetaPluginInfo * (*plugin_info) (MetaPlugin *plugin);
/**
* MetaPluginClass::create_close_dialog:
* @plugin: a #MetaPlugin
* @window: a #MetaWindow
*
* Virtual function called to create a "force quit" dialog
* on non-responsive clients.
*/
MetaCloseDialog * (* create_close_dialog) (MetaPlugin *plugin,
MetaWindow *window);
};
/**

View File

@ -664,8 +664,9 @@ meta_pointer_confinement_wayland_maybe_warp (MetaPointerConfinementWayland *self
}
static void
surface_actor_painting (MetaSurfaceActorWayland *surface_actor,
MetaPointerConfinementWayland *self)
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
GParamSpec *pspec,
MetaPointerConfinementWayland *self)
{
meta_pointer_confinement_wayland_maybe_warp (self);
}
@ -684,8 +685,8 @@ meta_pointer_confinement_wayland_new (MetaWaylandPointerConstraint *constraint)
surface = meta_wayland_pointer_constraint_get_surface (constraint);
g_signal_connect_object (surface->surface_actor,
"painting",
G_CALLBACK (surface_actor_painting),
"notify::allocation",
G_CALLBACK (surface_actor_allocation_notify),
confinement,
0);

View File

@ -176,6 +176,10 @@ static void
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
GParamSpec *pspec,
MetaWaylandSurface *surface);
static void
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
GParamSpec *pspec,
MetaWaylandSurface *surface);
static void
unset_param_value (GParameter *param)
@ -414,6 +418,9 @@ meta_wayland_surface_destroy_window (MetaWaylandSurface *surface)
g_signal_handlers_disconnect_by_func (surface->surface_actor,
surface_actor_mapped_notify,
surface);
g_signal_handlers_disconnect_by_func (surface->surface_actor,
surface_actor_allocation_notify,
surface);
meta_window_unmanage (surface->window, timestamp);
}
@ -463,14 +470,6 @@ queue_surface_actor_frame_callbacks (MetaWaylandSurface *surface,
wl_list_init (&pending->frame_callback_list);
}
static void
pending_buffer_resource_destroyed (MetaWaylandBuffer *buffer,
MetaWaylandPendingState *pending)
{
g_signal_handler_disconnect (buffer, pending->buffer_destroy_handler_id);
pending->buffer = NULL;
}
static void
pending_state_init (MetaWaylandPendingState *state)
{
@ -503,8 +502,9 @@ pending_state_destroy (MetaWaylandPendingState *state)
g_clear_pointer (&state->opaque_region, cairo_region_destroy);
if (state->buffer)
g_signal_handler_disconnect (state->buffer,
state->buffer_destroy_handler_id);
g_object_remove_weak_pointer (G_OBJECT (state->buffer),
(gpointer *) &state->buffer);
wl_list_for_each_safe (cb, next, &state->frame_callback_list, link)
wl_resource_destroy (cb->resource);
}
@ -521,7 +521,10 @@ move_pending_state (MetaWaylandPendingState *from,
MetaWaylandPendingState *to)
{
if (from->buffer)
g_signal_handler_disconnect (from->buffer, from->buffer_destroy_handler_id);
{
g_object_remove_weak_pointer (G_OBJECT (from->buffer),
(gpointer *) &from->buffer);
}
to->newly_attached = from->newly_attached;
to->buffer = from->buffer;
@ -547,10 +550,8 @@ move_pending_state (MetaWaylandPendingState *from,
if (to->buffer)
{
to->buffer_destroy_handler_id =
g_signal_connect (to->buffer, "resource-destroyed",
G_CALLBACK (pending_buffer_resource_destroyed),
to);
g_object_add_weak_pointer (G_OBJECT (to->buffer),
(gpointer *) &to->buffer);
}
pending_state_init (from);
@ -906,8 +907,8 @@ wl_surface_attach (struct wl_client *client,
if (surface->pending->buffer)
{
g_signal_handler_disconnect (surface->pending->buffer,
surface->pending->buffer_destroy_handler_id);
g_object_remove_weak_pointer (G_OBJECT (surface->pending->buffer),
(gpointer *) &surface->pending->buffer);
}
surface->pending->newly_attached = TRUE;
@ -917,10 +918,8 @@ wl_surface_attach (struct wl_client *client,
if (buffer)
{
surface->pending->buffer_destroy_handler_id =
g_signal_connect (buffer, "resource-destroyed",
G_CALLBACK (pending_buffer_resource_destroyed),
surface->pending);
g_object_add_weak_pointer (G_OBJECT (surface->pending->buffer),
(gpointer *) &surface->pending->buffer);
}
}
@ -1291,16 +1290,17 @@ wl_surface_destructor (struct wl_resource *resource)
}
static void
surface_actor_painting (MetaSurfaceActorWayland *surface_actor,
MetaWaylandSurface *surface)
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
GParamSpec *pspec,
MetaWaylandSurface *surface)
{
meta_wayland_surface_update_outputs (surface);
}
static void
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
GParamSpec *pspec,
MetaWaylandSurface *surface)
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
GParamSpec *pspec,
MetaWaylandSurface *surface)
{
meta_wayland_surface_update_outputs (surface);
}
@ -1324,10 +1324,9 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor,
wl_list_init (&surface->pending_frame_callback_list);
g_signal_connect_object (surface->surface_actor,
"painting",
G_CALLBACK (surface_actor_painting),
surface,
0);
"notify::allocation",
G_CALLBACK (surface_actor_allocation_notify),
surface, 0);
g_signal_connect_object (surface->surface_actor,
"notify::mapped",
G_CALLBACK (surface_actor_mapped_notify),

View File

@ -123,7 +123,6 @@ struct _MetaWaylandPendingState
/* wl_surface.attach */
gboolean newly_attached;
MetaWaylandBuffer *buffer;
gulong buffer_destroy_handler_id;
int32_t dx;
int32_t dy;

View File

@ -348,6 +348,7 @@ xdg_toplevel_set_maximized (struct wl_client *client,
{
MetaWaylandSurface *surface = surface_from_xdg_toplevel_resource (resource);
meta_window_force_placement (surface->window);
meta_window_maximize (surface->window, META_MAXIMIZE_BOTH);
}
@ -624,20 +625,18 @@ xdg_toplevel_role_commit (MetaWaylandSurfaceRole *surface_role,
if (!window)
return;
if (!pending->has_new_geometry)
if (pending->has_new_geometry)
{
if (pending->dx != 0 || pending->dx != 0)
{
g_warning ("XXX: Attach-initiated move without a new geometry. This is unimplemented right now.");
}
return;
window_geometry = meta_wayland_xdg_surface_get_window_geometry (xdg_surface);
meta_window_wayland_move_resize (window,
&xdg_surface_priv->acked_configure_serial,
window_geometry,
pending->dx, pending->dy);
}
else if (pending->dx != 0 || pending->dx != 0)
{
g_warning ("XXX: Attach-initiated move without a new geometry. This is unimplemented right now.");
}
window_geometry = meta_wayland_xdg_surface_get_window_geometry (xdg_surface);
meta_window_wayland_move_resize (window,
&xdg_surface_priv->acked_configure_serial,
window_geometry,
pending->dx, pending->dy);
/* When we get to this point, we ought to have valid size hints */
if (pending->has_new_min_size || pending->has_new_max_size)
@ -1274,11 +1273,19 @@ xdg_surface_role_commit (MetaWaylandSurfaceRole *surface_role,
}
else if (!priv->has_set_geometry)
{
MetaRectangle new_geometry = { 0 };
/* If the surface has never set any geometry, calculate
* a default one unioning the surface and all subsurfaces together. */
meta_wayland_surface_calculate_window_geometry (surface,
&priv->geometry,
&new_geometry,
0, 0);
if (!meta_rectangle_equal (&new_geometry, &priv->geometry))
{
pending->has_new_geometry = TRUE;
priv->geometry = new_geometry;
}
}
}

View File

@ -179,12 +179,14 @@ meta_wayland_compositor_update (MetaWaylandCompositor *compositor,
void
meta_wayland_compositor_paint_finished (MetaWaylandCompositor *compositor)
{
gint64 current_time = g_get_monotonic_time ();
while (!wl_list_empty (&compositor->frame_callbacks))
{
MetaWaylandFrameCallback *callback =
wl_container_of (compositor->frame_callbacks.next, callback, link);
wl_callback_send_done (callback->resource, g_get_monotonic_time () / 1000);
wl_callback_send_done (callback->resource, current_time / 1000);
wl_resource_destroy (callback->resource);
}
}

View File

@ -829,7 +829,7 @@ meta_x11_source_send (MetaWaylandDataSource *source,
/* Takes ownership of fd */
selection->x11_selection =
x11_selection_data_new (compositor->xwayland_manager.selection_data,
fd, mime_type);
fd, gdk_x11_get_xatom_name (type_atom));
XConvertSelection (xdisplay,
selection->selection_atom, type_atom,

View File

@ -1721,6 +1721,7 @@ reload_gtk_hide_titlebar_when_maximized (MetaWindow *window,
if (META_WINDOW_MAXIMIZED (window))
{
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
meta_window_frame_size_changed (window);
if (window->frame)
meta_frame_update_style (window->frame);