[ wxwindows-Bugs-1770628 ] Modifiers with gtk 2.10 FAIL
SourceForge.net
noreply at sourceforge.net
Thu Aug 23 03:58:15 PDT 2007
Bugs item #1770628, was opened at 2007-08-09 07:34
Message generated for change (Comment added) made by neis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1770628&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: Platform specific
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: jolZ (jolz)
Assigned to: Nobody/Anonymous (nobody)
Summary: Modifiers with gtk 2.10 FAIL
Initial Comment:
SuSE 10.0 (gtk 2.8) works perfectly
SuSE 10.2 (gtk 2.10) shows fails:
Modifiers with some keys are not in the wxKeyEvent
Steps to reproduce:
1. Grap a SuSE 10.2 installation (maybe a gtk 2.10-System is enough)
2. Compile and start the keyboard sample. Press Ctrl+1 and Ctrl+2
You'll see the following output:
15:25:15: Key down event: CONTROL (flags = ---M)
15:25:16: Key down event: '1' (flags = C--M)
15:25:16: Char event: '1' (flags = ----)
15:25:16: Key up event: '1' (flags = C--M)
15:25:16: Key up event: CONTROL (flags = C--M)
15:25:17: Key down event: CONTROL (flags = ---M)
15:25:17: Key down event: '2' (flags = C--M)
15:25:17: Char event: '2' (flags = C--M)
15:25:17: Key up event: '2' (flags = C--M)
15:25:17: Key up event: CONTROL (flags = C--M)
Look at the "Char event" line.
Try the keys [019´ü+öä#,.+-*/<] with some modifiers (Ctrl, Shift, Alt) and see the missing flag. (even the "Meta-Flag" is missing.)
The EVT_CHAR(_HOOK) Event has no modifier set, the up/down events are correct.
Try some oder keys like [2-8a-z] and look to a bug-free wx :-)
This happens at least with at least the following wx-Versions:
- gtk2-ansi-debug-2.6 (2.6.3)
- gtk2-ansi-debug-2.8 (2.8.4)
- gtk2-unicode-release-2.8 (2.8.4)
- gtk2-ansi-debug-2.9 (svn HEAD, Revision 47920 from 2007-08-07)
A few observations which may help fixing the bug:
Ctrl+1 generates an incorrect (?) wxEVT_CHAR_HOOK Event (generated in window.cpp by gtk_wxwindow_commit_cb) which lacks the Control-Flag. "wxFillOtherKeyEventFields" is NOT called.
Ctrl+2 also generates the correct wxEVT_CHAR event (generated in windows.cpp by gtk_window_key_press_callback) with Ctrl-Flag set.
You may also look into my post users mailing list (Subject 'wxGTK and "Ctrl+1"', Date 2007-08-07 <http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?8:mss:101780>)
----------------------------------------------------------------------
>Comment By: Stefan Neis (neis)
Date: 2007-08-23 10:58
Message:
Logged In: YES
user_id=32202
Originator: NO
Ooops, sorry - it's apparently quite normal that the xev output looks the
way you quoted it, I get the same thing over here while not having the
problem you described - so it looks like something is indeed going wrong
on the GTK+ level...
----------------------------------------------------------------------
Comment By: Stefan Neis (neis)
Date: 2007-08-23 10:34
Message:
Logged In: YES
user_id=32202
Originator: NO
Well, if you compare the lines that you get for Ctrl-1 and Ctrl-2 from
xev, you'll notice:
XLookupString gives 1 bytes: (31) "1"
XmbLookupString gives 1 bytes: (31) "1"
so "Ctrl-1" for some reason gives a plain "1" according to the opinion of
the X server, while for "Ctrl-2" you get some special character, as shown
by:
XLookupString gives 1 bytes: (00) ""
XmbLookupString gives 1 bytes: (00) ""
No idea what's going on here, but it doesn't even seem to be a GTK+ bug,
IMHO.
----------------------------------------------------------------------
Comment By: jolZ (jolz)
Date: 2007-08-23 06:06
Message:
Logged In: YES
user_id=927692
Originator: YES
I don't think, it can be an X11 Problem: On the same X-Server, i created a
chroot with "Debian SID" and tried the keyboard sample, and it worked
(Ctrl+1 - EVT_CHAR Event had it's C-Flag)
But, no matter, so here is xev:
Ctrl+1:
KeyPress event, serial 31, synthetic NO, window 0x4400001,
root 0x155, subw 0x0, time 1134348, (408,356), root:(412,385),
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x4400001,
root 0x155, subw 0x0, time 1135427, (408,356), root:(412,385),
state 0x14, keycode 10 (keysym 0x31, 1), same_screen YES,
XLookupString gives 1 bytes: (31) "1"
XmbLookupString gives 1 bytes: (31) "1"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x4400001,
root 0x155, subw 0x0, time 1135500, (408,356), root:(412,385),
state 0x14, keycode 10 (keysym 0x31, 1), same_screen YES,
XLookupString gives 1 bytes: (31) "1"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x4400001,
root 0x155, subw 0x0, time 1136835, (408,356), root:(412,385),
state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
And here is Ctrl+2
KeyPress event, serial 31, synthetic NO, window 0x4400001,
root 0x155, subw 0x0, time 1140324, (408,356), root:(412,385),
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x4400001,
root 0x155, subw 0x0, time 1141576, (408,356), root:(412,385),
state 0x14, keycode 11 (keysym 0x32, 2), same_screen YES,
XLookupString gives 1 bytes: (00) ""
XmbLookupString gives 1 bytes: (00) ""
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x4400001,
root 0x155, subw 0x0, time 1141663, (408,356), root:(412,385),
state 0x14, keycode 11 (keysym 0x32, 2), same_screen YES,
XLookupString gives 1 bytes: (00) ""
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x4400001,
root 0x155, subw 0x0, time 1142637, (408,356), root:(412,385),
state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
----------------------------------------------------------------------
Comment By: Stefan Neis (neis)
Date: 2007-08-22 13:43
Message:
Logged In: YES
user_id=32202
Originator: NO
It might even be the Xserver version or configuration, that is causing the
trouble, not GTK.
Running "xev" and checking what it reports for "Ctrl+1" and "Ctrl+2",
respectively would be helpful...
----------------------------------------------------------------------
Comment By: jolZ (jolz)
Date: 2007-08-22 13:30
Message:
Logged In: YES
user_id=927692
Originator: YES
this is definitly not a wxGTK Bug. 2 reasons:
(1) it works with debian/ubuntu
(2) i copied the working libwx*.so from debian to my SuSE and Ctrl+1 lost
it's C-Flag again :-(
so it has to be a problem with the GTK-Librarys deliverd by SuSE.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1770628&group_id=9863
More information about the wx-dev
mailing list