From 9b6c061de5f6f6bd8ead6cde7f751bcf63cf7832 Mon Sep 17 00:00:00 2001 From: Monsta Date: Tue, 15 Dec 2015 14:24:10 +0300 Subject: window picker: proper usage of GtkAllocation how the hell did that work before...? --- mate-window-picker-applet/task-item.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'mate-window-picker-applet') 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 -- cgit v1.2.1