Skip to content

Commit a5a079b

Browse files
lukefromdcraveit65
authored andcommitted
na-tray-child: remove na_tray_child_size_allocate
Remov leftover from GTK2 that may play a role in cutting tray icons
1 parent 2c8de94 commit a5a079b

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

‎applets/notification_area/system-tray/na-tray-child.c‎

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -157,51 +157,6 @@ na_tray_child_get_preferred_height (GtkWidget *widget,
157157
*natural_height = *natural_height / scale;
158158
}
159159

160-
static void
161-
na_tray_child_size_allocate (GtkWidget *widget,
162-
GtkAllocation *allocation)
163-
{
164-
NaTrayChild *child = NA_TRAY_CHILD (widget);
165-
GtkAllocation widget_allocation;
166-
gboolean moved, resized;
167-
168-
gtk_widget_get_allocation (widget, &widget_allocation);
169-
170-
moved = (allocation->x != widget_allocation.x ||
171-
allocation->y != widget_allocation.y);
172-
resized = (allocation->width != widget_allocation.width ||
173-
allocation->height != widget_allocation.height);
174-
175-
/* When we are allocating the widget while mapped we need special handling
176-
* for both real and fake transparency.
177-
*
178-
* Real transparency: we need to invalidate and trigger a redraw of the old
179-
* and new areas. (GDK really should handle this for us, but doesn't as of
180-
* GTK+-2.14)
181-
*
182-
* Fake transparency: if the widget moved, we need to force the contents to
183-
* be redrawn with the new offset for the parent-relative background.
184-
*/
185-
if ((moved || resized) && gtk_widget_get_mapped (widget))
186-
{
187-
if (na_tray_child_has_alpha (child))
188-
gdk_window_invalidate_rect (gdk_window_get_parent (gtk_widget_get_window (widget)),
189-
&widget_allocation, FALSE);
190-
}
191-
192-
GTK_WIDGET_CLASS (na_tray_child_parent_class)->size_allocate (widget,
193-
allocation);
194-
195-
if ((moved || resized) && gtk_widget_get_mapped (widget))
196-
{
197-
if (na_tray_child_has_alpha (NA_TRAY_CHILD (widget)))
198-
gdk_window_invalidate_rect (gdk_window_get_parent (gtk_widget_get_window (widget)),
199-
&widget_allocation, FALSE);
200-
else if (moved && child->parent_relative_bg)
201-
na_tray_child_force_redraw (child);
202-
}
203-
}
204-
205160
/* The plug window should completely occupy the area of the child, so we won't
206161
* get an expose event. But in case we do (the plug unmaps itself, say), this
207162
* expose handler draws with real or fake transparency.
@@ -429,7 +384,6 @@ na_tray_child_class_init (NaTrayChildClass *klass)
429384
widget_class->realize = na_tray_child_realize;
430385
widget_class->get_preferred_width = na_tray_child_get_preferred_width;
431386
widget_class->get_preferred_height = na_tray_child_get_preferred_height;
432-
widget_class->size_allocate = na_tray_child_size_allocate;
433387
widget_class->draw = na_tray_child_draw;
434388

435389
/* we don't really care actually */

0 commit comments

Comments
 (0)