simon-git: putty (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sat Aug 22 13:43:54 BST 2015


TL;DR:
  81682fb Fix crash in GTK3 when unifontsel filter settings change.
  d155f69 Make unifontsel_deselect() clear the preview pane.

Repository:     git://git.tartarus.org/simon/putty.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2015-08-22 13:43:54

commit 81682fbf7037a96b5e7a467580194c6d20d0d7b2
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=81682fbf7037a96b5e7a467580194c6d20d0d7b2;hp=03e21b7cad1dfa856f841dfe5aba39bb3ff89f7e
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Aug 22 13:41:11 2015 +0100

    Fix crash in GTK3 when unifontsel filter settings change.
    
    The call to gtk_list_store_clear() in unifontsel_setup_familylist()
    was causing a call to family_changed() via the GTK signal system,
    which didn't happen in GTK2. family_changed() in turn was calling
    unifontsel_select_font(), which got confused when the tree model
    didn't match reality, and tried to access a bogus tree iterator.
    
    This is easily fixed by using the existing fs->inhibit_response flag,
    which prevents us responding to GTK events when we know they were
    generated by our own fiddling about with the data; it's just that we
    never needed to set it in unifontsel_setup_familylist() before.
    
    Also, added a check of the return value from the key get_iter call in
    unifontsel_select_font(), so that it'll at least fail an assertion
    rather than actually trying to access bogus memory. But that operation
    _should_ still always succeed, and if it doesn't, it's probably a sign
    that we need another use of fs->inhibit_response.

 unix/gtkfont.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

commit d155f698b732bbff5ed48d56b214ef4fa6d83525
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=d155f698b732bbff5ed48d56b214ef4fa6d83525;hp=81682fbf7037a96b5e7a467580194c6d20d0d7b2
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Aug 22 13:41:15 2015 +0100

    Make unifontsel_deselect() clear the preview pane.
    
    In the case where we deselect the previously selected font (e.g.
    because we've just changed the filter settings to remove it from the
    list), we were leaving the preview pane in its previous state, which
    is fine in GTK2 when it just carries on displaying the last thing
    drawn to the backing pixmap but goes wrong in GTK3 where we still have
    to actually respond to draw events.
    
    But it makes more conceptual sense anyway to actually empty the
    preview pane when no font is selected, so now we do that. So now
    unifontsel_draw_preview_text() is called from unifontsel_deselect(),
    and also the preview-drawing code will still draw the background
    rectangle regardless of whether font != NULL.

 unix/gtkfont.c |   39 +++++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 18 deletions(-)



More information about the tartarus-commits mailing list