Comment 5 for bug 778256

Revision history for this message
Marius Gedminas (mgedmin) wrote :

So, I'm not familiar with Nux, the GUI toolkit that Unity uses. unity/src/PanelTray.cpp has these tantalizing lines of code:

    void
    PanelTray::Draw (nux::GraphicsEngine& gfx_content, bool force_draw)
    {
      nux::Geometry geo = GetGeometry ();

      if (geo.x != _last_x || geo.y != _last_y)
      {
        _last_x = geo.x;
        _last_y = geo.y;

        gtk_window_move (GTK_WINDOW (_window), geo.x + PADDING, 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...