[mutter/wip/surface-content: 17/18] window-actor: Flip set_redirected around
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/surface-content: 17/18] window-actor: Flip set_redirected around
- Date: Fri, 6 Dec 2013 22:48:29 +0000 (UTC)
commit 7c40d38a55bbc4b655cca0d6c1202ad80d85b172
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Dec 6 17:36:09 2013 -0500
window-actor: Flip set_redirected around
I know it's confusing with the triple negative, but unredirected is how
we track it elsewhere: we have an 'unredirected' flag, and 'should_unredirect'.
src/compositor/compositor.c | 4 ++--
src/compositor/meta-window-actor-private.h | 8 ++++----
src/compositor/meta-window-actor.c | 16 ++++++++--------
3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index 7337890..3936e14 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -873,7 +873,7 @@ set_unredirected_window (MetaCompScreen *info,
if (info->unredirected_window != NULL)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private
(info->unredirected_window));
- meta_window_actor_set_redirected (window_actor, TRUE);
+ meta_window_actor_set_unredirected (window_actor, FALSE);
}
info->unredirected_window = window;
@@ -881,7 +881,7 @@ set_unredirected_window (MetaCompScreen *info,
if (info->unredirected_window != NULL)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private
(info->unredirected_window));
- meta_window_actor_set_redirected (window_actor, FALSE);
+ meta_window_actor_set_unredirected (window_actor, TRUE);
}
meta_shape_cow_for_window (info->screen, info->unredirected_window);
diff --git a/src/compositor/meta-window-actor-private.h b/src/compositor/meta-window-actor-private.h
index e3d239d..9c6a847 100644
--- a/src/compositor/meta-window-actor-private.h
+++ b/src/compositor/meta-window-actor-private.h
@@ -39,13 +39,13 @@ void meta_window_actor_frame_complete (MetaWindowActor *self,
void meta_window_actor_invalidate_shadow (MetaWindowActor *self);
-void meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state);
-
-gboolean meta_window_actor_should_unredirect (MetaWindowActor *self);
-
void meta_window_actor_get_shape_bounds (MetaWindowActor *self,
cairo_rectangle_int_t *bounds);
+gboolean meta_window_actor_should_unredirect (MetaWindowActor *self);
+void meta_window_actor_set_unredirected (MetaWindowActor *self,
+ gboolean unredirected);
+
gboolean meta_window_actor_effect_in_progress (MetaWindowActor *self);
void meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
gboolean did_placement);
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index da40ee2..b389ffa 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -1265,7 +1265,8 @@ meta_window_actor_should_unredirect (MetaWindowActor *self)
}
void
-meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
+meta_window_actor_set_unredirected (MetaWindowActor *self,
+ gboolean unredirected)
{
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
MetaDisplay *display = meta_window_get_display (metaWindow);
@@ -1273,21 +1274,20 @@ meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
Display *xdisplay = meta_display_get_xdisplay (display);
Window xwin = meta_window_get_toplevel_xwindow (metaWindow);
- if (state)
+ meta_error_trap_push (display);
+
+ if (unredirected)
{
- meta_error_trap_push (display);
XCompositeRedirectWindow (xdisplay, xwin, CompositeRedirectManual);
- meta_error_trap_pop (display);
meta_window_actor_detach_x11_pixmap (self);
- self->priv->unredirected = FALSE;
}
else
{
- meta_error_trap_push (display);
XCompositeUnredirectWindow (xdisplay, xwin, CompositeRedirectManual);
- meta_error_trap_pop (display);
- self->priv->unredirected = TRUE;
}
+
+ self->priv->unredirected = unredirected;
+ meta_error_trap_pop (display);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]