Re: [wxVTK] [ wxvtk-Bugs-1919659 ] keyboard events not caught
Brought to you by:
malat
From: Mathieu M. <mat...@gm...> - 2008-04-14 15:12:31
|
done thanks. $ cvs ci -m"BUG: Apparently SetFocus is also needed on linux. Thanks to Juha-Ville Juntunen for report/patch" wxVTKRenderWindowInteractor.cxx Checking in wxVTKRenderWindowInteractor.cxx; /cvsroot/wxvtk/wxVTK/src/wxVTKRenderWindowInteractor.cxx,v <-- wxVTKRenderWindowInteractor.cxx new revision: 1.36; previous revision: 1.35 done On Mon, Apr 14, 2008 at 4:25 PM, Juha-Ville Juntunen <jul...@gm...> wrote: > Hi Mathieu, > > Tried HEAD version on Gentoo with wxSample and the problem is still there. > > Btw. I noticed > > this->SetFocus() > > added into OnButtonDown(event) method, but it's #ifdefine'd only for Mac OSX > and Windows. If I take those #ifdefines out, behaviour changes a bit:I still > don't get keyboard events caught by wxVTK when I enter the wxSample window, > but after I click the window keyevents are caught. Is there reason > SetFocus() is not meant to be invoked on linux ? > > cheers > -j > > 2008/4/13, Mathieu Malaterre <mat...@gm...>: > > > Julle > > > > If you get a chance, could you please try the CVS HEAD version of wxVTK. > > > > Thanks > > -Mathieu > > > > On Tue, Apr 8, 2008 at 11:11 PM, Mathieu Malaterre > > <mat...@gm...> wrote: > > > Hi there, > > > > > > Is anyone using wx 2.8.7 ? Could anyone confirm the bug ? > > > > > > Thanks > > > -Mathieu > > > > > > > > > > > > > > > > > ---------- Forwarded message ---------- > > > From: SourceForge.net <no...@so...> > > > Date: Wed, Mar 19, 2008 at 4:30 PM > > > Subject: [ wxvtk-Bugs-1919659 ] keyboard events not caught > > > To: no...@so... > > > > > > > > > Bugs item #1919659, was opened at 2008-03-19 14:30 > > > Message generated for change (Tracker Item Submitted) made by Item > Submitter > > > You can respond by visiting: > > > > https://sourceforge.net/tracker/?func=detail&atid=669338&aid=1919659&group_id=114757 > > > > > > 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: Interface > > > Group: v1.0 (example) > > > Status: Open > > > Resolution: None > > > Priority: 5 > > > Private: No > > > Submitted By: JulleJuntunen (jullejuntunen) > > > Assigned to: Mathieu Malaterre (malat) > > > Summary: keyboard events not caught > > > > > > Initial Comment: > > > Hi, > > > > > > Keyboard events are not caught on Gentoo Linux (2.6.22-gentoo-r5) > > > using wxWidgets GTK 2.8.7. > > > This means VTK keyboard interactions won't work in a wxVTK window. > > > > > > This behaviour can be seen simply by adding a printout as the first > > > line in wxVTKRenderWindowInteractor::OnKeyDown() method and then > > > running any of the included test applications -> on any keypress the > > > OnKeyDown() is not invoked (no printout). > > > > > > Problem seems to be due to not passing keyboard focus to wxVTK > > > (wxGLCanvas) window. > > > > > > One simple fix that works for me is to add line > > > SetFocus() into method wxVTKRenderWindowInteractor::OnEnter(), i.e. > > > when ever the VTK window is entered the keyboard focus is forced to > > > this window. Not sure if this works as a general fix, but I guess > > > similar thing should be done at least when clicking the window. > > > > > > My wxVTK versions are > > > > > > 1.30 for wxVTKRenderWindowInteractor.cxx > > > 1.16 for wxVTKRenderWindowInteractor.h > > > > > > I've checked this also on windows, with exactly the same results. > > > > > > cheers > > > -julle > > > > > > ---------------------------------------------------------------------- > > > > > > You can respond by visiting: > > > > https://sourceforge.net/tracker/?func=detail&atid=669338&aid=1919659&group_id=114757 > > > > > > > > > > > > > > -- > > > Mathieu > > > > > > > > > > > -- > > > > Mathieu > > > > -- Mathieu |