input: fix Codepoint::INVALID in Press event

The Press event is actually a Press_char event with a default codepoint.
The default codepoint is now

  Codepoint { Codepoint::INVALID } /* value 0xfffe */

in contrast to

  Codepoint { Input::Event::INVALID } /* value 0 */

Issue #3483
This commit is contained in:
Christian Helmuth 2019-08-23 12:15:51 +02:00
parent a97b8043b5
commit 4491c070be

View File

@ -93,7 +93,7 @@ class Input::Event
* types for assignments or for passing an event as return value.
*/
Event(Press_char arg) : _type(PRESS) { _attr.press = arg; }
Event(Press arg) : Event(Press_char{arg.key, Codepoint{INVALID}}) { }
Event(Press arg) : Event(Press_char{arg.key, Codepoint{Codepoint::INVALID}}) { }
Event(Release arg) : _type(RELEASE) { _attr.release = arg; }
Event(Relative_motion arg) : _type(REL_MOTION) { _attr.rel_motion = arg; }
Event(Absolute_motion arg) : _type(ABS_MOTION) { _attr.abs_motion = arg; }