The code below works fine when compiled on Linux platform (Ubuntu):

class MyDrawingArea : public Gtk::DrawingArea {
  public:
    int getXWinID();
};


int MyDrawingArea::getXWinID()
{
        int xWindowId;
        Glib::RefPtr<Gdk::Window> gwindow = get_window();
        
        if (gwindow)
        {       
                xWindowId = GDK_WINDOW_XID(Glib::unwrap(get_window()));
                std::cout<< "DrawingArea Xwin id: "<< xWindowId <<"\n";
        }

        return xWindowId;
}


getXWinID() returns the window ID correctly. However, when built and run on 
Maemo -platform (scratchbox & N800), xWindowId == 0, because the if -branch 
is not taken, i.e. gwindow == NULL. 

Is there something to Glib::RefPtr or Gdk::WIndow on Maemomm that I have 
missed?

-Lassi
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to