Maemomm Gdk::Window problem



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]