13
0
Commit Graph

31 Commits

Author SHA1 Message Date
6b5dce2c66 Yet another pane pain: allow deleting children using forall_vfunc
We not only need to make sure the iterator remains valid, but also
the object pointed to.

Valgrind trace:
Invalid read of size 8
 Gtkmm2ext::Pane::forall_vfunc(int, void (*)(_GtkWidget*, void*), void*) (pane.cc:617)
 Gtk::Container_Class::forall_vfunc_callback(_GtkContainer*, int, void (*)(_GtkWidget*, void*), void*)
 gtk_container_destroy (gtkcontainer.c:1073)
 g_closure_invoke (gclosure.c:804)
...
 g_object_run_dispose (gobject.c:1084)
2017-01-20 03:13:41 +01:00
c590b540b0 NO-OP: whitespace 2017-01-08 17:48:57 +01:00
66e580d683 Fix Pane size allocation:
* Skip calling allocate on recently hidden children.
* Don't [temporarily] call size_allocate with negative sizes
2017-01-08 17:48:21 +01:00
cbf5f3d622 Fix crash when changing Pane widgets -- #7198
Gtkmm2Ext::Pane::on_add() uses a pointer to a std::vector<> element
in the destroy notify callback. If the vector is modified, that pointer
becomes invalid.

Add 2 widgets "A", "B". remove "B", add another one "C".
Now if A is destroyed, notify_child_destroyed(PTR) points to
invalid memory and not to "A".
2017-01-08 12:39:07 +01:00
c33f94f686 Enforce minimum pane sizes
* enforce minimum size of child widgets
* honor manually set child-minsize in size-requests
* ignore hidden children (eg. VCA)
* clamp divider position (instead of just ignoring out-of-bounds moves)
2017-01-02 17:13:56 +01:00
de04da27ee Fix crash when unpacking or deleting pane
Gtk::Widget_Class::dispose_vfunc_callback calls hide() which invokes
Pane::handle_child_visibility which calls Pane::reallocate which
tries to get the allocation of the widget being destroyed.
2016-12-21 17:10:37 +01:00
e9752ff93e remove debug output 2016-08-09 21:26:27 -04:00
81211a91b1 minor safety fix for the Pane 2016-07-20 10:48:07 -04:00
82d3afb851 Gtkmm2ext::Pane: attempt to track child lifetime, since Gtkmm 2.4 doesn't do this correctly 2016-07-20 10:48:07 -04:00
b8f5306d5b fix incorrect restoration of pane positions on Apple.
Code to check if we were to close to an edge (for window resizing) blocked all divider setting,
because it would be called with a current widget allocation of 1x1
2016-07-18 12:49:36 -04:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
0eb509ac2e remove debug output from Pane code 2016-06-14 11:46:24 -04:00
9142d1edf5 working version of pane position mgmt for OS X 2016-06-13 09:52:54 -04:00
ceb0bce971 write some code to limit pane handle positions on OS X.
So far untested, and uncompiled
2016-06-13 09:10:47 -04:00
9a1c24dda7 fix thinko in Pane expose event handler.
There are always less dividers than children
2016-06-08 12:26:24 -04:00
9a50d15c7f fix crashing bug in Pane when accessing dividers 2016-06-06 16:05:43 -04:00
5700296cb6 add a destructor for Gtkmm2ext::Pane that unparents the children.
This seems to be required, although there is confusion in Gtkmm3 about this.
2016-06-06 16:05:25 -04:00
a047d814f6 fix case where pane divider is not redrawn after a leave event. 2016-06-01 22:30:17 -04:00
d680c1f1db fix styling of pane dividers (the original reason for the "*Pane*" widget=>style spec) 2016-06-01 22:23:34 -04:00
8c74a1b99c make pane divider placement a little safer 2016-05-31 15:30:45 -04:00
47b85c3845 fix default pane divider cursor for vertical panes 2016-05-31 15:30:45 -04:00
4ef8e862b3 shrink down pane divider/handle width 2016-05-31 15:30:45 -04:00
0baedac4f4 fix pane behaviour when children are hidden/shown 2016-05-31 15:30:45 -04:00
229b026356 explicitly expose dividers
hmm, seems important to understand how this worked before
2016-05-31 15:30:45 -04:00
7c6cfd9fa0 more sensible API for Pane::set_child_minsize 2016-05-31 15:30:45 -04:00
d8b02be745 provide a mechanism to avoid allocating too small of a space to a Pane child
Gtk::Notebook throws an assertion if allocated too small a space during drawing (at least with Clearlooks)
2016-05-31 15:30:45 -04:00
067616a84f various work on Pane, including cursors, more styling stuff, and making the forall_vfunc safe against gtk_container_remove 2016-05-31 15:30:45 -04:00
9694a3181b Pane: use style-provided colors, and change colors on enter/leave/dragging 2016-05-31 15:30:45 -04:00
3c4503a849 fix use of widget allocation origin in Gtkm2mext::Pane 2016-05-31 15:30:45 -04:00
29b9c4ecc3 set default pane divider position to 0.5 2016-05-31 15:30:45 -04:00
ce68505a51 working but incomplete version of new Pane replacement widget 2016-05-31 15:30:45 -04:00