[gtk+] gdkdisplay-x11: Don't do extra work when simply moving the window
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdkdisplay-x11: Don't do extra work when simply moving the window
- Date: Thu, 27 Nov 2014 01:15:03 +0000 (UTC)
commit fe8f6f60dcb70178b68315dab232a6cfe7aa0b0e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Nov 26 17:07:56 2014 -0800
gdkdisplay-x11: Don't do extra work when simply moving the window
We shouldn't bother recalculating all the visible regions and wiping
away the old updating areas if we're simply dragging the window around.
gdk/x11/gdkdisplay-x11.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index d6543c1..89c2b7d 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -828,13 +828,18 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
{
window->x = event->configure.x;
window->y = event->configure.y;
- window_impl->unscaled_width = xevent->xconfigure.width;
- window_impl->unscaled_height = xevent->xconfigure.height;
- window->width = event->configure.width;
- window->height = event->configure.height;
- _gdk_window_update_size (window);
- _gdk_x11_window_update_size (window_impl);
+ if (window_impl->unscaled_width != xevent->xconfigure.width ||
+ window_impl->unscaled_height != xevent->xconfigure.height)
+ {
+ window_impl->unscaled_width = xevent->xconfigure.width;
+ window_impl->unscaled_height = xevent->xconfigure.height;
+ window->width = event->configure.width;
+ window->height = event->configure.height;
+
+ _gdk_window_update_size (window);
+ _gdk_x11_window_update_size (window_impl);
+ }
if (window->resize_count >= 1)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]