Re: Where to place init code (in which event handler) needing custom widget's window mapped?



Thanks for the link.
Concerning on_realize, it's the way i tried to achieve the work (including calling base class method before any other thing) but the window I create for xine to render to:

m_window = Gdk::Window::create(get_window(), &attributes,GDK_WA_X|GDK_WA_Y);

isn't mapped yet. I verified it by calling:

std::cout <<m_window->is_viewable ()<<std::endl;


The window isn't mapped until it is shown, if the xine function needs the window to be mapped then you should move the initialization to on_map() or on_show().

But these functions could be called more than once (if you hide and show them again) so you should take care that the initialization is done only once.

--
Marco



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