Discussion:
D17415: Fix event type checking
Andras Mantia
2018-12-07 20:13:28 UTC
Permalink
amantia created this revision.
amantia added reviewers: Plasma, Plasma Accessibility, aacid.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
amantia requested review of this revision.

REVISION SUMMARY
The ev->xkbType looks to be a value that is defined in xkb.xml (usually
in /usr/share/xcb), and that indicates which bit refers to a certain event.
The XCB_XKB_EVENT_TYPE_* enum is a bitmask value though, they cannot be
compared directly. E.g BellNotify even mean bit 8 is set, that means the value
is 2^8 = 256.
This fixes bell, visual bell and accessibility event handling.

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D17415

AFFECTED FILES
kaccess/kaccess.cpp

To: amantia, #plasma, #plasma_accessibility, aacid
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
David Edmundson
2018-12-07 21:31:18 UTC
Permalink
davidedmundson added a comment.


Seems to be an XCB bug.

We should have wrappers for both:

XkbNewKeyboardNotify, XkbMapNotify, etc.

and

XkbNewKeyboardNotifyMask, XkbMapNotifyMask, etc.

the latter being used for event selection masks.

That's what XKB.h from X11 has, and XCB normally copies that.

But you're right, XCB only has an enum with names from the first one and with the values from the second :/

---

My rules for workarounds is we should have an upstream bug report submitted and a comment in the code.

There's a bug report already here: https://bugs.freedesktop.org/show_bug.cgi?id=51295

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D17415

To: amantia, #plasma, #plasma_accessibility, aacid
Cc: davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
Andras Mantia
2018-12-08 12:59:15 UTC
Permalink
amantia updated this revision to Diff 47100.
amantia added a comment.


Added comment for workaround

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D17415?vs=47065&id=47100

REVISION DETAIL
https://phabricator.kde.org/D17415

AFFECTED FILES
kaccess/kaccess.cpp

To: amantia, #plasma, #plasma_accessibility, aacid
Cc: davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
Loading...