[ wxwindows-Bugs-1908113 ] wxFileSelector Broken in Trunk
SourceForge.net
noreply at sourceforge.net
Mon Mar 10 08:07:54 PDT 2008
Bugs item #1908113, was opened at 2008-03-05 10:04
Message generated for change (Comment added) made by crjjrc
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1908113&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxGTK specific
Group: Must fix
Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: crjjrc (crjjrc)
Assigned to: Paul Cornett (pcor)
Summary: wxFileSelector Broken in Trunk
Initial Comment:
No wxFileSelector seems to work with trunk. The dialog just doesn't appear. This problem can be seen in the dialog sample. Strangely I still get control back to the application, but the window doesn't want to close.
This is on GTK. I don't know if other platforms are affected.
- Chris
----------------------------------------------------------------------
>Comment By: crjjrc (crjjrc)
Date: 2008-03-10 10:07
Message:
Logged In: YES
user_id=1960247
Originator: YES
I can confirm that the patch is the cause of the problem. Here's a run
through with gdb. I've printed out the variables that seem relevant, but
I've probably missed some.
- Chris
Breakpoint 1, wxTopLevelWindowGTK::Show (this=0x8fb6400, show=true) at
../src/gtk/toplevel.cpp:761
761 wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
(gdb) n
763 const bool wasRealized = GTK_WIDGET_REALIZED(m_widget);
(gdb) n
764 bool deferShow = show && m_deferShow && !wasRealized;
(gdb) print wasRealized
$1 = false
(gdb) print show
$2 = true
(gdb) print m_deferShow
$3 = true
(gdb) n
765 if (deferShow)
(gdb) print deferShow
$4 = true
(gdb) n
778 GtkWidget* child = GTK_BIN(m_widget)->child;
(gdb)
779 if (child)
(gdb) n
781 g_object_ref(child);
(gdb)
782 gtk_container_remove(GTK_CONTAINER(m_widget), child);
(gdb)
784 gtk_widget_realize(m_widget);
(gdb)
785 if (child)
(gdb)
787 gtk_container_add(GTK_CONTAINER(m_widget), child);
(gdb)
788 g_object_unref(child);
(gdb)
794 gdk_atom_intern("_NET_REQUEST_FRAME_EXTENTS", false))
!= 0;
(gdb)
796 if (deferShow)
(gdb) print deferShow
$5 = true
(gdb) n
800 memset(&xevent, 0, sizeof(xevent));
(gdb)
801 xevent.type = ClientMessage;
(gdb)
802 xevent.window =
gdk_x11_drawable_get_xid(m_widget->window);
(gdb)
805 gdk_atom_intern("_NET_REQUEST_FRAME_EXTENTS",
false));
(gdb)
806 xevent.format = 32;
(gdb)
807 Display* display =
gdk_x11_drawable_get_xdisplay(m_widget->window);
(gdb)
810 (XEvent*)&xevent);
(gdb)
813 m_isShown = true;
(gdb)
814 return true;
(gdb)
838 }
----------------------------------------------------------------------
Comment By: Vadim Zeitlin (vadz)
Date: 2008-03-07 14:36
Message:
Logged In: YES
user_id=71618
Originator: NO
If this is really due to this change (could you please confirm it by using
the latest trunk but just undoing this patch
http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/src/gtk/dialog.cpp?r1=51612&r2=52170
?) it would mean that wxTopLevelWindowGTK::Show() doesn't work for you.
Could you please trace inside it and see what goes on? In particular what
m_deferShow is and what is it getting set to (this basically depends on
whether your WM supports _NET_REQUEST_FRAME_EXTENTS)?
TIA!
P.S. In the meanwhile I take the liberty of assigning this one to Paul
mainly in order to draw his attention to this bug in case he didn't notice
it yet. If this is not due to your change please just reset it back.
----------------------------------------------------------------------
Comment By: crjjrc (crjjrc)
Date: 2008-03-07 08:44
Message:
Logged In: YES
user_id=1960247
Originator: YES
I tried downgrading src/gtk/dialog.cpp today with:
svn update -r 51612 dialog.cpp
After rebuilding the library, the sample works fine. The log for the
first revision after 51612 says something about Show now being called on a
base class rather than wxWindow. Perhaps that's causing the trouble?
- Chris
----------------------------------------------------------------------
Comment By: crjjrc (crjjrc)
Date: 2008-03-06 12:39
Message:
Logged In: YES
user_id=1960247
Originator: YES
I took out the extra control panel code and I still see (rather, don't
see) the problem. I upgraded to GTK+ 2.12.5 (I didn't know how to check
the version until after upgrading) and still no dialog. wx2.8.7 works fine
with both versions. I tried a fresh checkout of the svn repo, building
with debug, opengl, and unicode.
Stepping through with gdb didn't reveal anything insightful. ShowModal is
called, but it never returns since there's no actual widget for me to
close.
This is mysterious. I wish I knew how to better track this down. The
output of strace doesn't show anything obvious. :(
- Chris
----------------------------------------------------------------------
Comment By: Vadim Zeitlin (vadz)
Date: 2008-03-06 08:42
Message:
Logged In: YES
user_id=71618
Originator: NO
This must be GTK version specific because running the dialogs sample and
pressing Ctrl-O still works just fine for me with GTK+ 2.8.20. What is your
GTK+ version?
Also, does removing the custom controls stuff from the sample help?
Thanks!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1908113&group_id=9863
More information about the wx-dev
mailing list