Skip to content

Instantly share code, notes, and snippets.

@su-v

su-v/irc.txt Secret

Last active September 6, 2015 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save su-v/962457125be511b054d0 to your computer and use it in GitHub Desktop.
Save su-v/962457125be511b054d0 to your computer and use it in GitHub Desktop.
GIMP ruler updates ...
23:19 Wilber@: Michael Henning master * 3233a70 gimp : libgimpwidgets: Avoid updating the rulers too often.
23:20 drawoc : mitch: can you look over 3233a70 ? I want to backport it to 2.8.
23:20 Wilber@: drawoc: Michael Henning master * 3233a70 gimp : libgimpwidgets: Avoid updating the rulers too often.
23:20 mitch@: drawoc: first, let me shapeburst you a little
23:20 mitch@: drawoc: looking :P
23:22 mitch@: drawoc: question, why remove the idle in finalize()? that's potentially very late. dispose() happens on widgets destruction
23:23 drawoc : mitch: because that's what the documentation suggests.
23:23 mitch@: which documentation?
23:24 mitch@: ref the widget, destroy it -> idle is not removed until you drop the ref
23:24 mitch@: -> bad
23:25 mitch@: drawoc: have you tried this with a tablet? i have no objection if it just works :)
23:27 drawoc : https://developer.gnome.org/glib/unstable/glib-The-Main-Event-Loop.html#mainloop-memory-management
23:27 Wilber@: Title: The Main Event Loop: GLib Reference Manual (at developer.gnome.org)
23:27 drawoc : "remove that source from the main context using g_source_remove() when the owning object is finalized"
23:28 mitch@: drawoc: yeah generally true, but this is a widget which has additional lifecycle mamagement
23:28 drawoc : although I probably should have thought that out more than blindly following the documentation
23:29 mitch@: dispose is really better here
23:29 mitch@: for pure paranoia reasons
23:29 mitch@: but real reasons :)
23:29 kris : the never ending dispose vs. finalize discussion
23:30 mitch@: :)
23:30 mitch@: for most things it makes no difference at all
23:31 mitch@: but idle handlers running on a dead widget -> bad
23:31 kris : there are some terrible corner cases though
23:31 mitch@: yep
23:33 mitch@: drawoc: also, blend tool?
23:34 drawoc : okay, will move it to dispose. Ideally, gtk shouldn't choke if we try to queue a redraw after dispose, but I won't try our luck.
23:35 drawoc : mitch: will hopefully work on blend tool more soon. Wanted to fix the ruler shit first tho.
<...>
23:55 Wilber@: Michael Henning master * 8c02b36 gimp : libgimpwidgets: Disconnect ruler's idle handler in dispose
23:56 Wilber@: Michael Henning gimp-2-8 * a8b596b gimp-2-8 : libgimpwidgets: Avoid updating the rulers too often.
23:56 Wilber@: Michael Henning gimp-2-8 * 978a394 gimp-2-8 : libgimpwidgets: Disconnect ruler's idle handler in dispose