[Xfce4-commits] <xfce4-panel:devel> Use gdk_window_get_origin() so positiong works with external plugins too.
Nick Schermer
nick at xfce.org
Tue Aug 11 20:32:33 CEST 2009
Updating branch refs/heads/devel
to 5cb5883c7c4b03c93758ba6f0ccfd5bbf8a4e2c0 (commit)
from 93e6c4feb5572d846c5035408abf0d5041dfaf46 (commit)
commit 5cb5883c7c4b03c93758ba6f0ccfd5bbf8a4e2c0
Author: Nick Schermer <nick at xfce.org>
Date: Sun May 24 15:51:24 2009 +0200
Use gdk_window_get_origin() so positiong works with external plugins too.
libxfce4panel/xfce-panel-plugin.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index a19a1cd..c8c4fd5 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -1591,7 +1591,6 @@ xfce_panel_plugin_position_widget (XfcePanelPlugin *plugin,
GdkScreen *screen;
GdkRectangle monitor;
gint monitor_num;
- GtkWidget *toplevel;
g_return_if_fail (XFCE_IS_PANEL_PLUGIN (plugin));
g_return_if_fail (GTK_IS_WIDGET (menu_widget));
@@ -1612,10 +1611,9 @@ xfce_panel_plugin_position_widget (XfcePanelPlugin *plugin,
/* get the menu/widget size request */
gtk_widget_size_request (menu_widget, &requisition);
- /* get the root position of the attach widget (the panel) */
- toplevel = gtk_widget_get_toplevel (attach_widget);
- gtk_window_get_position (GTK_WINDOW (toplevel), x, y);
-
+ /* get the root position of the attach widget */
+ gdk_window_get_origin (GDK_WINDOW (attach_widget->window), x, y);
+
/* add the widgets allocation */
*x += attach_widget->allocation.x;
*y += attach_widget->allocation.y;
More information about the Xfce4-commits
mailing list