Commit 6fe71050 authored by Mathieu Bridon's avatar Mathieu Bridon

Work around integer overflow in pygobject on 32 bits systems

This is causing a bug for us, where all input from the user is doubled
on 32 bits systems.

The workaround is not pretty, but it's needed until most distros ship a
fixed version. :(
parent e61f3513
......@@ -263,6 +263,13 @@ class Engine(IBus.Engine):
if (state & IBus.ModifierType.RELEASE_MASK):
return False
# Work around integer overflow bug on 32 bits systems:
# https://bugzilla.gnome.org/show_bug.cgi?id=693121
# The bug is fixed in pygobject 3.7.91, but many distributions will
# ship the previous version for some time. (e.g Fedora 18)
if (state & 1073741824):
return False
if state & (IBus.ModifierType.CONTROL_MASK |
IBus.ModifierType.MOD1_MASK):
# Ignore Alt+<key> and Ctrl+<key>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment