You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried the code, but get the 2.0.4 style output here. Could you provide this info, so I can try and track it down?
Distro + version etc.
Did you build SDL-2.0.5 yourself or use a pre-built version.
If you built it yourself, was it using cmake or autotools, and was anything printed about IME when building?
The output of 'xprop -root | grep XKB'
The output of 'echo $XMODIFIERS'
The output of 'ps ax | grep ibus'
The output of 'ibus-daemon --version'
Thanks
On 2016-10-27 17:21:21 +0000, Jari Ronkainen wrote:
It seems that Ozkan is right, I now built this twice, both with and without ibus headers. Seems that it works when built with the ibus headers available.
Here's requested info, anyways:
Distro + version etc.
Arch Linux
Did you build SDL-2.0.5 yourself or use a pre-built version.
Used pre-built
The output of 'xprop -root | grep XKB'
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "fi", "", ""
The output of 'ibus-daemon --version'
ibus-daemon - Version 1.5.14
On 2016-10-27 18:00:58 +0000, Ozkan Sezer wrote:
(In reply to Alex Baines from comment # 2)
Distro + version etc.
Fedora 20 - x86_64
Did you build SDL-2.0.5 yourself or use a pre-built version.
Built myself, first without ibus-devel and dbus-devel installed
which displayed the issue, and second time with ibus-devel and
dbus-devel installed which removed the issue.
If you built it yourself, was it using cmake or autotools, and was
anything printed about IME when building?
The output of 'xprop -root | grep XKB'
The output of 'echo $XMODIFIERS'
The output of 'ps ax | grep ibus'
The output of 'ibus-daemon --version'
Will post answers to 3-7 tomorrow if you want them, when I have access
to the same system again.
On 2016-10-27 18:39:21 +0000, Alex Baines wrote:
Ok, I think I understand the issue now.
If neither the ibus nor fcitx headers are present, then XSetLocaleModifiers gets called with "", instead of the usual "@im=none". This means for many people they'll get ibus via XIM.
This means that XFilterEvent will return true for some key events, indicating that no futher processing should happen. However for SDL it makes sense to send key events even if they are filtered, otherwise dead keys will not generate an SDL keypress / release.
The problem is that ibus via XIM has a bad habit of returning true from XFilterEvents for everything, and then resending another event later if it didn't really need to filter it.
In SDL 2.0.4, to avoid this case the extra processing didn't happen after XFilterEvent, so dead keys would not generate any events. For 2.0.5 I added the dead key sending back in, along with setting the locale modifiers to "@im=none" if XMODIFIERS was "@im=ibus" to avoid the resending issue.
However with the addition of fcitx, some of the IME stuff was reworked so if SDL is not built with the ibus headers, then the "@im=none" setting doesn't happen.
So, to fix it, we could:
Go back to not generating key presses after XFilterEvent returns true when built without the ibus headers. (2.0.4 behaviour)
Force "@im=none" when XMODIFIERS is "@im=ibus" even if the dbus path won't be used. (should generate events for dead keys but might break some expectations for people who really want to use ibus via xim)
Find another workaround for ibus' resending, maybe by looking at the timestamps / serials of key events to determine if they're resent ones.
On 2016-10-28 00:33:08 +0000, Alex Baines wrote:
Created attachment 2592
Patch to not forward filtered events when compiled without fcitx/ibus
Here is a patch that implements the 1) solution, since that is the simplest.
The drawback is if SDL is compiled without the dbus fcitx / ibus implementation then dead keys won't generate key events. But that is how 2.0.4 worked.
On 2016-10-28 05:24:43 +0000, Ozkan Sezer wrote:
(In reply to Alex Baines from comment # 6)
Created attachment 2592 [details]
Patch to not forward filtered events when compiled without fcitx/ibus
Here is a patch that implements the 1) solution, since that is the simplest.
The drawback is if SDL is compiled without the dbus fcitx / ibus
implementation then dead keys won't generate key events. But that is how
2.0.4 worked.
Did a 'yum remove dbus-devel ibus-devel', applied the proposed patch, and
built 2.0.5: Doesn't fix the issue for me.
On 2016-10-28 16:43:08 +0000, Alex Baines wrote:
Yeah, my bad.
That patch fixes the double events, but the key repeat logic is still broken with it. I'll investigate further.
On 2016-10-28 18:01:59 +0000, Alex Baines wrote:
Created attachment 2594
fix double events & key repeat flag when built without fcitx/ibus headers
Ok, Here's a better patch. I think I tested all the combinations properly this time.
In addition to the last fix, this one uses XkbSetDetectableAutoRepeat to make the key repeat detection work even if ibus is used via xim. If this call fails, then it forces @im=none.
On 2016-10-28 18:38:06 +0000, Ozkan Sezer wrote:
With the new patch applied, 2.0.5 built both in the absence and in the presence
of dbus-devel/ibus-devel seems to work properly with the testcase for me. Thanks.
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Patch to not forward filtered events when compiled without fcitx/ibus (sdl-filterevent.patch, text/plain, 2016-10-28 00:33:08 +0000, 1436 bytes)Reported in version: 2.0.5
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2016-10-26 00:39:32 +0000, Jari Ronkainen wrote:
On 2016-10-27 09:13:37 +0000, Ozkan Sezer wrote:
On 2016-10-27 16:55:07 +0000, Alex Baines wrote:
On 2016-10-27 17:21:21 +0000, Jari Ronkainen wrote:
On 2016-10-27 18:00:58 +0000, Ozkan Sezer wrote:
On 2016-10-27 18:39:21 +0000, Alex Baines wrote:
On 2016-10-28 00:33:08 +0000, Alex Baines wrote:
On 2016-10-28 05:24:43 +0000, Ozkan Sezer wrote:
On 2016-10-28 16:43:08 +0000, Alex Baines wrote:
On 2016-10-28 18:01:59 +0000, Alex Baines wrote:
On 2016-10-28 18:38:06 +0000, Ozkan Sezer wrote:
On 2016-10-29 00:17:20 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: