set_default_size() is for the default size, set_size_request() is for the minimum size – it's called size "request" because it's a requenst to the window manager to not let the user shrink the window further, which it can ignore (i3-wm does that for example).
What you want is resize(): https://developer.gnome.org/gtkmm/stable/classGtk_1_1Window.html#ad6d1fc27730d7f26402a1924c3495787 Am 18.02.2015 um 08:51 schrieb Klaus Rudolph: > >> Gesendet: Mittwoch, 18. Februar 2015 um 00:01 Uhr >> Von: "Phil Wolff" <adia...@centurylink.net> >> An: gtkmm-list@gnome.org >> Betreff: Re: how to shrink a window >> > >> In most cases, Gtk::Window::set_default_size() > > I tried to set also to call set_default_size for the main window without any > effect. The function set_default_size is also not available for > Gtk::ScrolledWindow. > Is there any chance to directly call the WindowManager or something else to > shrink the window? Or can it be done by simulating mouse events? I am > wondering that this is a seldom used feature :-) > > What I tried and also fails: > > bool Do( const Glib::RefPtr<Goocanvas::Item>& item, GdkEventButton* ev) > { > std::cout << "Do" << std::endl; > //sw->set_size_request( 400,400); // make the window bigger works > sw->set_size_request( 100,100); // shrink the window fails! why? Whats to > do? > winptr->set_default_size(100,100); // no effect! > > return true; > } > > > Regards > Klaus > > _______________________________________________ > gtkmm-list mailing list > gtkmm-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtkmm-list > _______________________________________________ gtkmm-list mailing list gtkmm-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtkmm-list