Porting panel plugins for 4.4

Brian J. Tarricone bjt23 at cornell.edu
Sun Oct 2 09:45:09 CEST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jasper Huijsmans wrote:
> Hi all,
> 
> The new panel framework for 4.4 is now in SVN trunk. All plugins will 
> have to be ported, but this should not be too difficult.
[snip]

Desktop menu plugin is ported.  For some reason I couldn't get the menu
positioning function right: it correctly figures out where the panel is,
but, for example, with the panel in the top-right, the menu gets placed
under the panel, against the left edge of the panel, instead of against
the right, where the menu button is.  Jasper, you're the one that wrote
the menu position function for that; could you take a look?  It's
xfdesktop/trunk/panel-plugin/desktop-menu-plugin.c:231.

I did a little debugging, and this is really annoying.  The only thing I
can seem to get is the position of the panel itself, by calling
gdk_window_get_root_origin(button->window), or
gtk_window_get_postition(GTK_WINDOW(plugin)).  Everything else I can
think of returns (0,0).  For the record, I tried:

gdk_window_get_geometry(gtk_widget_get_toplevel(button)->window)
gtk_widget_get_toplevel(button)->allocation.{x,y}
button->allocation.{x,y}
gdk_window_get_geometry(button->window)
gdk_window_get_geometry(button->parent->window)

I'm running out of ideas.  It seems that the fact that the plugin is in
a separate process is confusing GTK/X, and it can't seem to get the
widget's position (or the GtkPlug's position) with reference to either
a) the root window, or b) the panel itself.  Or something.

	-brian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDP5AF6XyW6VEeAnsRAttyAJsGlHoR9AGG67YU5ycjyTolfxUjuwCfW9rw
v54tOxv28qBS20hX+s3GxJU=
=S0BF
-----END PGP SIGNATURE-----



More information about the Xfce4-dev mailing list