[wx-dev] [GTK] handling TAB and other navigation keys
Robin Dunn
robin at alldunn.com
Mon Apr 2 14:15:02 PDT 2007
Robert Roebling wrote:
>> As usual when touching GTK+ internals I'd appreciate if somebody
>> could review my changes
>
> I'm not sure if the following problem is caused by your
> changes to focus handling or by my changes from 5 minutes
> ago (to not create any GtkScrolledWindow unless it is
> requested),
BTW, there are several places (such as wxWindowGTK::GetScrollRange) that
expect m_scrollBars to always have non-NULL values, and which will crash
if called on a window without wxHSCROLL|wxVSCROLL. For example, wxSTC
crashes when creating a new instance, as seen in this backtrace:
#0 0xb74dec93 in wxWindow::GetScrollRange (this=0x86513d8, orient=8) at
../src/gtk/window.cpp:4215
#1 0xb5ba592c in ScintillaWX::ModifyScrollBars (this=0x8652b00, nMax=5,
nPage=6) at ../../../../contrib/src/stc/ScintillaWX.cpp:414
#2 0xb5bcf1dc in Editor::SetScrollBars (this=0x8652b00) at
../../../../contrib/src/stc/scintilla/src/Editor.cxx:3300
#3 0xb5bcde67 in Editor::RefreshStyleData (this=0x8652b00) at
../../../../contrib/src/stc/scintilla/src/Editor.cxx:503
#4 0xb5bcf19a in Editor::SetScrollBars (this=0x8652b00) at
../../../../contrib/src/stc/scintilla/src/Editor.cxx:3296
#5 0xb5bcfa89 in Editor::ChangeSize (this=0x8652b00) at
../../../../contrib/src/stc/scintilla/src/Editor.cxx:3321
#6 0xb5ba549b in ScintillaWX::DoSize (this=0x8652b00) at
../../../../contrib/src/stc/ScintillaWX.cpp:842
#7 0xb5bb1b73 in wxStyledTextCtrl::OnSize (this=0x86513d8) at
../../../../contrib/src/stc/stc.cpp:3047
#8 0xb71aae9f in wxAppConsole::HandleEvent (this=0x84ba660,
handler=0x86513d8, func={__pfn = 0xb5bb1b14
<wxStyledTextCtrl::OnSize(wxSizeEvent&)>, __delta = 0},
event=@0xbfdc7d50) at ../src/common/appbase.cpp:305
#9 0xb727a146 in wxEvtHandler::ProcessEventIfMatches
(entry=@0xb5c5d6b0, handler=0x86513d8, event=@0xbfdc7d50) at
../src/common/event.cpp:1202
#10 0xb727bf3e in wxEventHashTable::HandleEvent (this=0xb5c5d4e8,
event=@0xbfdc7d50, self=0x86513d8) at ../src/common/event.cpp:876
#11 0xb727c0a4 in wxEvtHandler::ProcessEvent (this=0x86513d8,
event=@0xbfdc7d50) at ../src/common/event.cpp:1264
#12 0xb74e4945 in wxWindow::DoSetSize (this=0x86513d8, x=-1, y=-1,
width=200, height=100, sizeFlags=0) at ../src/gtk/window.cpp:2770
#13 0xb7b2e1fc in wxWindowBase::SetSize (this=0x86513d8, width=200,
height=100) at /opt/wx/2.9/include/wx-2.9/wx/window.h:241
#14 0xb7b2e22e in wxWindowBase::SetSize (this=0x86513d8,
size=@0xbfdc7e40) at /opt/wx/2.9/include/wx-2.9/wx/window.h:244
#15 0xb7626087 in wxWindowBase::SetInitialSize (this=0x86513d8,
size=@0xb777bd28) at ../src/common/wincmn.cpp:723
#16 0xb5bb4e9e in wxStyledTextCtrl::Create (this=0x86513d8,
parent=0x86508c8, id=-1, pos=@0xb777bd30, size=@0xb777bd28, style=0,
name=@0xb5cd9ae4) at ../../../../contrib/src/stc/stc.cpp:182
#17 0xb5bb4f6a in wxStyledTextCtrl (this=0x86513d8, parent=0x86508c8,
id=-1, pos=@0xb777bd30, size=@0xb777bd28, style=0, name=@0xb5cd9ae4) at
../../../../contrib/src/stc/stc.cpp:150
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wx-dev
mailing list