After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721069 - gtk_win32_embed_widget_show infinite recursion
gtk_win32_embed_widget_show infinite recursion
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
3.10.x
Other Windows
: Normal critical
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-12-26 03:59 UTC by Morten Welinder
Modified: 2014-05-10 18:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
win32embed: Set the visible flag and avoid recursion (1.26 KB, patch)
2014-03-24 20:53 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Morten Welinder 2013-12-26 03:59:25 UTC
The win32 print dialog is thoroughly broken.

gtk_win32_embed_widget_show is the implementation of GtkWidget::show.
Right now it calls gtk_widget_set_visible which calls gtk_widget_show
and we're right back to gtk_win32_embed_widget_show.  *Boom*
Ditto in gtk_win32_embed_widget_hide.

"s/gtk_widget_set_visible/_gtk_widget_set_visible_flag/" fixes this.

This was introduced in this 2010 commit:

    commit e346d26f700139ba29c38e67f1878a8e65d2f5a7
    Author: Tor Lillqvist <tml@iki.fi>
    Date:   Thu Oct 7 01:14:46 2010 +0300

        Make it compile again for Windows

Using _gtk_widget_set_visible_flag isn't a complete fix for the print
dialog.  When a custom page is used it is not shown as part of the
dialog which looks rather silly.  But that's better than simply crashing.
Comment 1 Morten Welinder 2014-03-24 20:15:47 UTC
Any hope for action on this?
Comment 2 Emmanuele Bassi (:ebassi) 2014-03-24 20:53:49 UTC
Created attachment 272821 [details] [review]
win32embed: Set the visible flag and avoid recursion

We have to use the internal accessor to the visible flag, instead of
calling gtk_widget_set_visible(), from within the show() and hide()
implementations - otherwise we'll recurse.
Comment 3 Emmanuele Bassi (:ebassi) 2014-03-24 20:54:27 UTC
could you please test the change, and check that it's what you meant?
Comment 4 Morten Welinder 2014-03-24 22:15:41 UTC
That's a perfect match to the patch I have been using:

https://git.gnome.org/browse/gnumeric/tree/tools/win32/patches/gtk-gtkwin32embedwidget.patch
Comment 5 Emmanuele Bassi (:ebassi) 2014-05-10 18:44:13 UTC
okay, let's get this in.

Attachment 272821 [details] pushed as 61ed31a - win32embed: Set the visible flag and avoid recursion