1
Index: lxpanel-0.5.8/src/plugins/menu.c
2
===================================================================
3
--- lxpanel-0.5.8.orig/src/plugins/menu.c 2011-10-05 23:55:47.000000000 +0200
4
+++ lxpanel-0.5.8/src/plugins/menu.c 2011-10-05 23:55:49.000000000 +0200
8
#if GTK_CHECK_VERSION(2,18,0)
9
- GtkAllocation allocation;
10
- gtk_widget_set_allocation(widget, &allocation);
11
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
12
+ gtk_widget_get_allocation(GTK_WIDGET(widget), allocation);
15
p = g_object_get_data(G_OBJECT(widget), "plugin");
18
if (*x + w > gdk_screen_width())
19
#if GTK_CHECK_VERSION(2,18,0)
20
- *x = ox + allocation.width - w;
21
+ *x = ox + allocation->width - w;
23
*x = ox + widget->allocation.width - w;
27
#if GTK_CHECK_VERSION(2,18,0)
28
- *y = oy + allocation.height;
29
+ *y = oy + allocation->height;
31
*y = oy + widget->allocation.height;
34
#if GTK_CHECK_VERSION(2,18,0)
35
- *x = ox + allocation.width;
36
+ *x = ox + allocation->width;
38
*x = ox + widget->allocation.width;
42
if (*y + h > gdk_screen_height())
43
#if GTK_CHECK_VERSION(2,18,0)
44
- *y = oy + allocation.height - h;
45
+ *y = oy + allocation->height - h;
47
*y = oy + widget->allocation.height - h;
50
DBG("widget: x,y=%d,%d w,h=%d,%d\n", ox, oy,
51
#if GTK_CHECK_VERSION(2,18,0)
52
- allocation.width, allocation.height );
53
+ allocation->width, allocation->height );
55
widget->allocation.width, widget->allocation.height );
57
DBG("w-h %d %d\n", w, h);
59
+#if GTK_CHECK_VERSION(2,18,0)
60
+ g_free (allocation);
68
#if GTK_CHECK_VERSION(2,18,0)
69
- GtkAllocation allocation;
70
- gtk_widget_get_allocation(widget, &allocation);
71
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
72
+ gtk_widget_get_allocation(GTK_WIDGET(widget), allocation);
75
/* Standard right-click handling. */
78
if ((event->type == GDK_BUTTON_PRESS)
79
#if GTK_CHECK_VERSION(2,18,0)
80
- && (event->x >=0 && event->x < allocation.width)
81
- && (event->y >=0 && event->y < allocation.height)) {
82
+ && (event->x >=0 && event->x < allocation->width)
83
+ && (event->y >=0 && event->y < allocation->height)) {
85
&& (event->x >=0 && event->x < widget->allocation.width)
86
&& (event->y >=0 && event->y < widget->allocation.height)) {
88
show_menu( widget, plugin, event->button, event->time );
90
+#if GTK_CHECK_VERSION(2,18,0)
91
+ g_free (allocation);
96
Index: lxpanel-0.5.8/src/plugins/pager.c
97
===================================================================
98
--- lxpanel-0.5.8.orig/src/plugins/pager.c 2011-10-05 23:55:47.000000000 +0200
99
+++ lxpanel-0.5.8/src/plugins/pager.c 2011-10-05 23:56:29.000000000 +0200
100
@@ -271,10 +271,10 @@
102
/* Allocate pixmap and statistics buffer without border pixels. */
103
#if GTK_CHECK_VERSION(2,18,0)
104
- GtkAllocation allocation;
105
- gtk_widget_get_allocation(widget, &allocation);
106
- int new_pixmap_width = allocation.width;
107
- int new_pixmap_height = allocation.height;
108
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
109
+ gtk_widget_get_allocation(GTK_WIDGET(widget), allocation);
110
+ int new_pixmap_width = allocation->width;
111
+ int new_pixmap_height = allocation->height;
113
int new_pixmap_width = widget->allocation.width;
114
int new_pixmap_height = widget->allocation.height;
117
/* Compute the horizontal and vertical scale factors, and mark the desktop for redraw. */
118
#if GTK_CHECK_VERSION(2,18,0)
119
- d->scale_y = (gfloat) allocation.height / (gfloat) gdk_screen_height();
120
- d->scale_x = (gfloat) allocation.width / (gfloat) gdk_screen_width();
121
+ d->scale_y = (gfloat) allocation->height / (gfloat) gdk_screen_height();
122
+ d->scale_x = (gfloat) allocation->width / (gfloat) gdk_screen_width();
124
d->scale_y = (gfloat) allocation->height / (gfloat) gdk_screen_height();
125
d->scale_x = (gfloat) allocation->width / (gfloat) gdk_screen_width();
127
gtk_widget_set_size_request(widget,
128
(d->pg->plugin->panel->icon_size - BORDER_WIDTH * 2) * d->pg->aspect_ratio,
129
d->pg->plugin->panel->icon_size - BORDER_WIDTH * 2);
130
+#if GTK_CHECK_VERSION(2,18,0)
131
+ g_free (allocation);
138
GtkWidget * widget = GTK_WIDGET(d->da);
139
#if GTK_CHECK_VERSION(2,18,0)
140
- GtkAllocation allocation;
141
- gtk_widget_get_allocation(widget, &allocation);
142
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
143
+ gtk_widget_get_allocation(GTK_WIDGET(widget), allocation);
148
: style->dark_gc[GTK_STATE_NORMAL]),
150
#if GTK_CHECK_VERSION(2,18,0)
151
- 0, 0, allocation.width, allocation.height);
152
+ 0, 0, allocation->width, allocation->height);
153
+ g_free (allocation);
155
0, 0, widget->allocation.width, widget->allocation.height);