summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-07-08 13:13:47 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-02-22 15:31:21 -0500
commita5150d500d44ebda460e10c84daeed206345bb24 (patch)
tree7d6050bfc56e1c367ec59cc542f32fc211742695 /libs
parent98b14ad0e63964b6ec206edf85ec23c5c3731002 (diff)
when tearing off a tab, make the window be the same size as the allocation of the tab
Diffstat (limited to 'libs')
-rw-r--r--libs/gtkmm2ext/tabbable.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/gtkmm2ext/tabbable.cc b/libs/gtkmm2ext/tabbable.cc
index 9c1452f11d..e4c86e8384 100644
--- a/libs/gtkmm2ext/tabbable.cc
+++ b/libs/gtkmm2ext/tabbable.cc
@@ -103,6 +103,10 @@ Tabbable::get (bool create)
Gtk::Notebook*
Tabbable::tab_root_drop ()
{
+ Gtk::Allocation alloc;
+
+ alloc = _contents.get_parent()->get_allocation();
+
(void) use_own_window ();
/* This is called after a drop of a tab onto the root window. Its
@@ -111,7 +115,8 @@ Tabbable::tab_root_drop ()
* completed. It is not responsible for actually taking care of this
* packing.
*/
-
+
+ _window->set_default_size (alloc.get_width(), alloc.get_height());
_window->show_all ();
_window->present ();
@@ -148,8 +153,6 @@ Tabbable::delete_event_handler (GdkEventAny *ev)
if (_window == toplevel) {
- std::cerr << " delete event for own window\n";
-
/* unpack Tabbable from parent, put it back in the main tabbed
* notebook
*/
@@ -164,10 +167,9 @@ Tabbable::delete_event_handler (GdkEventAny *ev)
if (_parent_notebook) {
- std::cerr << "repack into parent notebook\n";
-
_parent_notebook->insert_page (_contents, _tab_title, _notebook_position);
_parent_notebook->set_tab_detachable (_contents);
+ _parent_notebook->set_current_page (_parent_notebook->page_num (_contents));
}
/* don't let anything else handle this */