From 8d80b2f167791274dbbcaea267c232b2363c3655 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 15 Feb 2015 05:06:12 +0100 Subject: fix gtk3 build --- libtopmenu-server/topmenu-widget.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libtopmenu-server') diff --git a/libtopmenu-server/topmenu-widget.c b/libtopmenu-server/topmenu-widget.c index 4dbc42b..a44ec08 100644 --- a/libtopmenu-server/topmenu-widget.c +++ b/libtopmenu-server/topmenu-widget.c @@ -208,8 +208,12 @@ static void topmenu_widget_embed_topmenu_window(TopMenuWidget *self, Window wind } } +#if GTK_VERSION == 2 + /* Seems that we might be adding the new plug before actually letting + * the socket receive the reparentnotify from above. */ g_clear_object(&self->socket->plug_window); self->socket->current_width = self->socket->current_height = 0; +#endif if (window) { g_debug("Embedding window 0x%lx", window); @@ -418,7 +422,10 @@ static void topmenu_widget_size_allocate(GtkWidget *widget, GtkAllocation *alloc TopMenuWidget *self = TOPMENU_WIDGET(widget); GTK_WIDGET_CLASS(topmenu_widget_parent_class)->size_allocate(widget, allocation); if (self->socket) { +#if GTK_VERSION == 2 + /* Force a resize of the plug window */ self->socket->current_width = self->socket->current_height = 0; +#endif gtk_widget_size_allocate(GTK_WIDGET(self->socket), allocation); } } -- cgit v1.2.3