summaryrefslogtreecommitdiff
path: root/mate-window-picker-applet
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-12-15 14:24:10 +0300
committerMonsta <[email protected]>2015-12-15 14:24:10 +0300
commit9b6c061de5f6f6bd8ead6cde7f751bcf63cf7832 (patch)
tree5b92442b640e8dc11a8d9d841a77b7f31cf9e5bf /mate-window-picker-applet
parent9a9b9ac744bd8f830af907727c9a28122c4bb12f (diff)
downloadmate-netbook-9b6c061de5f6f6bd8ead6cde7f751bcf63cf7832.tar.bz2
mate-netbook-9b6c061de5f6f6bd8ead6cde7f751bcf63cf7832.tar.xz
window picker: proper usage of GtkAllocation
how the hell did that work before...?
Diffstat (limited to 'mate-window-picker-applet')
-rw-r--r--mate-window-picker-applet/task-item.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/mate-window-picker-applet/task-item.c b/mate-window-picker-applet/task-item.c
index 366dea0..5566349 100644
--- a/mate-window-picker-applet/task-item.c
+++ b/mate-window-picker-applet/task-item.c
@@ -66,7 +66,8 @@ update_hints (TaskItem *item)
{
GtkWidget *parent;
GtkWidget *widget;
- GtkAllocation *allocation;
+ GtkAllocation allocation_parent;
+ GtkAllocation allocation_widget;
WnckWindow *window;
GdkWindow *gdkwindow;
gint x, y, x1, y1;
@@ -87,9 +88,9 @@ update_hints (TaskItem *item)
{
if (gtk_widget_get_parent (parent))
{
- gtk_widget_get_allocation (parent, allocation);
- x += allocation->x;
- y += allocation->y;
+ gtk_widget_get_allocation (parent, &allocation_parent);
+ x += allocation_parent.x;
+ y += allocation_parent.y;
}
else
{
@@ -103,14 +104,12 @@ update_hints (TaskItem *item)
break;
}
}
-
+
/* Set the minimize hint for the window */
- gtk_widget_get_allocation (widget, allocation);
- if (allocation) {
- wnck_window_set_icon_geometry (window, x, y,
- allocation->width,
- allocation->height);
- }
+ gtk_widget_get_allocation (widget, &allocation_widget);
+ wnck_window_set_icon_geometry (window, x, y,
+ allocation_widget.width,
+ allocation_widget.height);
}
static gboolean