[wesnoth-commits] [wesnoth/wesnoth] 998e87: Don't consider input events as keypresses without ...

GitHub noreply at github.com
Sat Feb 24 15:03:16 UTC 2018


  Branch: refs/heads/no_implicit_hotkey_repeat
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 998e87a451b19ad7cc7e5d2b2c514f547c195847
      https://github.com/wesnoth/wesnoth/commit/998e87a451b19ad7cc7e5d2b2c514f547c195847
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2018-02-24 (Sat, 24 Feb 2018)

  Changed paths:
    M RELEASE_NOTES
    M changelog
    M src/controller_base.cpp
    M src/editor/controller/editor_controller.cpp
    M src/editor/controller/editor_controller.hpp
    M src/game_events/menu_item.hpp
    M src/game_events/wmi_manager.cpp
    M src/game_events/wmi_manager.hpp
    M src/hotkey/command_executor.cpp
    M src/hotkey/command_executor.hpp
    M src/hotkey/hotkey_handler.cpp
    M src/hotkey/hotkey_handler.hpp

  Log Message:
  -----------
  Don't consider input events as keypresses without release in between

When the player holds a key down, the OS generates multiple key press and
text input events. We can't assume that every such event is a real key
press; instead, we need to track whether there has been a key up event
since we last sent a key press event.

Fixes #1711.

I also moved hotkey::execute_command() into the hotkey::command_executor
class, and renamed the existing member function of same name to
do_execute_command(). I did that because the command_executor class was
the best place to store the "press event already sent" flag.




More information about the Commits mailing list