It appears to me that geo contains coordinates relative to the parent widget (which is the panel), while _window is a top-level window and wants absolute screen coordinates, and therefore this works only when the panel is at +0+0. If only I knew how to convert relative coordinates to absolute ones in Nux...
So, I'm not familiar with Nux, the GUI toolkit that Unity uses. unity/src/ PanelTray. cpp has these tantalizing lines of code:
void ngine& gfx_content, bool force_draw)
PanelTray::Draw (nux::GraphicsE
{
nux::Geometry geo = GetGeometry ();
if (geo.x != _last_x || geo.y != _last_y)
{
_last_x = geo.x;
_last_y = geo.y;
}
}
It appears to me that geo contains coordinates relative to the parent widget (which is the panel), while _window is a top-level window and wants absolute screen coordinates, and therefore this works only when the panel is at +0+0. If only I knew how to convert relative coordinates to absolute ones in Nux...