[gtkmm] get_window in gtkmm2.2.1 + menu window



Hi!

I'm porting an application from gtkmm 1.2 to 2.2.1.
I have a button which pops up and down a window when it is clicked.
To position my window I have to know the position of the button. To achieve 
this, I used Widget::get_window() to get the corresponding Gdk::Window, then 
call get_origin and get_size on it which are inherited from Gdk::Drawable.

This no longuer works in gtkmm2.2.1, and the get_window function now seems to 
return the same Gdk::Window as the get_parent_window function, ie the one of 
the Gtk::Window containing the button.

Is it a bug or a feature =:) ?
How can I find the origin and size of a Widget?

However, I'd like that the window which is poped acts like a menu one, ie pop 
down when a click is performed outside the poped window,... How can I achieve 
this? Can this behaviour be inherited from Gtk::Menu?

Thanks a lot for your time!

Christian





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