summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2007-04-05 14:19:26 -0400
committerDavid Reveman <davidr@novell.com>2007-04-05 14:19:26 -0400
commit6beee733938fe8391dbf3c8c233421df01bbaed2 (patch)
tree8560461355047b21c0b1bcd4fa2ba56f2a7c6767 /gtk
parent384832f6de05eb38239c57d07a3d1a2b41c4add2 (diff)
Avoid unnecessary work in gwd when window position changed.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/window-decorator/gtk-window-decorator.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c
index 533b723c..0b59e3eb 100644
--- a/gtk/window-decorator/gtk-window-decorator.c
+++ b/gtk/window-decorator/gtk-window-decorator.c
@@ -357,6 +357,8 @@ typedef struct _decor {
gint button_width;
gint width;
gint height;
+ gint client_width;
+ gint client_height;
gboolean decorated;
gboolean active;
PangoLayout *layout;
@@ -3607,8 +3609,18 @@ window_geometry_changed (WnckWindow *win)
if (d->decorated)
{
- update_window_decoration_size (win);
- update_event_windows (win);
+ int width, height;
+
+ wnck_window_get_geometry (win, NULL, NULL, &width, &height);
+
+ if (width != d->client_width || height != d->client_height)
+ {
+ d->client_width = width;
+ d->client_height = height;
+
+ update_window_decoration_size (win);
+ update_event_windows (win);
+ }
}
}
@@ -3715,6 +3727,10 @@ window_opened (WnckScreen *screen,
if (!d)
return;
+ wnck_window_get_geometry (win, NULL, NULL,
+ &d->client_width,
+ &d->client_height);
+
d->active = wnck_window_is_active (win);
d->draw = theme_draw_window_decoration;