GNOME Bugzilla – Bug 161276
configure_events not beeing delivered
Last modified: 2005-04-19 10:41:37 UTC
bool on_configure(GdkEventConfigure *arg) { std::cout << "Got Configure" << std::endl; return false; } [..] int main() { widget.signal_configure_event().connect(sigc::ptr_fun(&on_configure)); } does not work. However, when I subclass a widget, override virtual bool on_configure_event(..) { return false; }; signal delivery works fine again.
complete testcase: #include <iostream> #include <gtkmm.h> class MyWindow : public Gtk::Window { public: // virtual bool on_configure_event(GdkEventConfigure *event) // { // std::cout << "Inherited Configure" << std::endl; // return false; // } }; bool on_configure(GdkEventConfigure *arg) { std::cout << "Got Configure" << std::endl; return false; } // main int main(int argc, char *argv[]) { Gtk::Main kit(argc, argv); MyWindow window; window.signal_configure_event().connect(sigc::ptr_fun(&on_configure)); Gtk::Main::run(window); return 0; }
Please try connect(slot, false) or connect_notify().
Please reopen this bug if it is still a problem.
It works with connect_notify in the test case above, but not with connect (slot, false) statement.