Author: jasper
Date: 2006-11-24 21:27:40 +0000 (Fri, 24 Nov 2006)
New Revision: 23948
Modified:
xfce4-panel/trunk/panel/panel-properties.c
Log:
Another attempt to fix bug #2598: re-enable setting struts in idle handler.
Modified: xfce4-panel/trunk/panel/panel-properties.c
===================================================================
--- xfce4-panel/trunk/panel/panel-properties.c 2006-11-24 20:18:26 UTC (rev
23947)
+++ xfce4-panel/trunk/panel/panel-properties.c 2006-11-24 21:27:40 UTC (rev
23948)
@@ -327,6 +327,25 @@
gdk_error_trap_pop ();
}
+static gboolean
+unblock_struts (Panel *panel)
+{
+ PanelPrivate * priv;
+ XfceMonitor * xmon;
+ int x, y, w, h;
+
+ priv = PANEL (panel)->priv;
+ priv->edit_mode = FALSE;
+
+ gtk_window_get_position (GTK_WINDOW (panel), &x, &y);
+ gtk_window_get_size (GTK_WINDOW (panel), &w, &h);
+
+ xmon = panel_app_get_monitor (priv->monitor);
+
+ _set_struts (panel, xmon, x, y, w, h);
+ return FALSE;
+}
+
static void
panel_move_end (XfcePanelWindow *window, int x, int y)
{
@@ -1204,8 +1223,7 @@
gtk_widget_queue_draw (GTK_WIDGET (panel));
- /* use edit_mode property to test if we are changing position */
- priv->edit_mode = FALSE;
+ g_idle_add((GSourceFunc)unblock_struts, panel);
}
}
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits