[gtk+/wip/mir2] mir: reconstruct surface if window is moved
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/mir2] mir: reconstruct surface if window is moved
- Date: Mon, 26 Jan 2015 23:29:40 +0000 (UTC)
commit de8c5ff9783313a2e97e64f7e489db28c59f313e
Author: William Hua <william attente ca>
Date: Mon Jan 26 18:29:07 2015 -0500
mir: reconstruct surface if window is moved
gdk/mir/gdkmirwindowimpl.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index 16c0c2d..c59b2c1 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -601,6 +601,7 @@ gdk_mir_window_impl_move_resize (GdkWindow *window,
g_printerr ("\n");
*/
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
+ gboolean recreate_surface = FALSE;
/* Redraw parent where we moved from */
if (should_render_in_parent (window))
@@ -614,10 +615,11 @@ gdk_mir_window_impl_move_resize (GdkWindow *window,
window->x = x;
window->y = y;
}
- else
+ else if (x != impl->transient_x || y != impl->transient_y)
{
impl->transient_x = x;
impl->transient_y = y;
+ recreate_surface = TRUE;
}
}
@@ -627,14 +629,15 @@ gdk_mir_window_impl_move_resize (GdkWindow *window,
/* We accept any resize */
window->width = width;
window->height = height;
-
- if (impl->surface)
- {
- ensure_no_surface (window);
- ensure_surface (window);
- }
+ recreate_surface = TRUE;
}
+ if (recreate_surface && impl->surface)
+ {
+ ensure_no_surface (window);
+ ensure_surface (window);
+ }
+
/* Redraw parent where we moved to */
if (should_render_in_parent (window))
redraw_transient (window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]