[gtk+] Bail out of window move/resize early if no change
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Bail out of window move/resize early if no change
- Date: Mon, 14 Sep 2009 12:15:20 +0000 (UTC)
commit 6716d46393039c0a0691306d65a1e1921a6957fe
Author: Alexander Larsson <alexl redhat com>
Date: Mon Sep 14 13:09:07 2009 +0200
Bail out of window move/resize early if no change
This is not all that uncommon in size_allocate, so we want
to optimize this case.
gdk/gdkwindow.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 78911ae..3560001 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -6990,6 +6990,14 @@ gdk_window_move_resize_internal (GdkWindow *window,
return;
}
+ /* Bail early if no change */
+ if (private->width == width &&
+ private->height == height &&
+ (!with_move ||
+ (private->x == x &&
+ private->y == y)))
+ return;
+
/* Handle child windows */
expose = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]