summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2006-09-12 03:36:36 +0000
committerRyan Lortie <ryanl@src.gnome.org>2006-09-12 03:36:36 +0000
commit3a179428740195aec5dddc366f1851c0d0e7e0ee (patch)
tree7dc05fa5f091a5ad459dfcc8e3473c70635197cb
parentfabf0f690bbfe29bb09f8ca1e1962ea922295b39 (diff)
downloadlibwnck-3a179428740195aec5dddc366f1851c0d0e7e0ee.tar.gz
Avoid sending spurious icon geometry updates. (Fixes #355523)
2006-09-11 Ryan Lortie <desrt@desrt.ca> * libwnck/window.c (WnckWindowPrivate, wnck_window_init, wnck_window_set_icon_geometry): Avoid sending spurious icon geometry updates. (Fixes #355523)
-rw-r--r--ChangeLog6
-rw-r--r--libwnck/window.c13
2 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 828e1b1..b3ed510 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-11 Ryan Lortie <desrt@desrt.ca>
+
+ * libwnck/window.c (WnckWindowPrivate, wnck_window_init,
+ wnck_window_set_icon_geometry): Avoid sending spurious icon geometry
+ updates. (Fixes #355523)
+
2006-09-07 Benjamin Berg <benjamin@sipsolutions.net>
* libwnck/tasklist.c: (take_screenshot):
diff --git a/libwnck/window.c b/libwnck/window.c
index a966f83..89e2b3d 100644
--- a/libwnck/window.c
+++ b/libwnck/window.c
@@ -63,6 +63,7 @@ struct _WnckWindowPrivate
WnckClassGroup *class_group;
Window group_leader;
Window transient_for;
+ GdkRectangle icon_geometry;
char *name;
char *icon_name;
char *session_id;
@@ -222,6 +223,7 @@ wnck_window_init (WnckWindow *window)
window->priv->name = NULL;
window->priv->icon_name = NULL;
window->priv->workspace = ALL_WORKSPACES;
+ window->priv->icon_geometry.width = -1; /* invalid cached value */
window->priv->icon_cache = _wnck_icon_cache_new ();
}
@@ -1661,6 +1663,17 @@ wnck_window_set_icon_geometry (WnckWindow *window,
int width,
int height)
{
+ if (window->priv->icon_geometry.x == x &&
+ window->priv->icon_geometry.y == y &&
+ window->priv->icon_geometry.width == width &&
+ window->priv->icon_geometry.height == height)
+ return;
+
+ window->priv->icon_geometry.x = x;
+ window->priv->icon_geometry.y = y;
+ window->priv->icon_geometry.width = width;
+ window->priv->icon_geometry.height = height;
+
_wnck_set_icon_geometry (window->priv->xwindow,
x, y, width, height);
}