Ticket #3194: alternative_working_but_seems_wrong.patch

File alternative_working_but_seems_wrong.patch, 747 bytes (added by elexis, 7 years ago)

Passes blackbox testing, but seems wrong to never send IN_HANDLED, needs exploration.

  • source/gui/CGUI.cpp

    InReaction CGUI::HandleEvent(const SDL_E  
    7373
    7474        std::map<CStr, std::vector<IGUIObject*> >::iterator it = m_HotkeyObjects.find(hotkey);
    7575        if (it != m_HotkeyObjects.end())
    7676            for (IGUIObject* const& obj : it->second)
    7777            {
    78                 // Update hotkey status before sending the event,
    79                 // else the status will be outdated when processing the GUI event.
    80                 HotkeyInputHandler(ev);
    81                 ret = IN_HANDLED;
    82 
    8378                if (ev->ev.type == SDL_HOTKEYDOWN)
    8479                    obj->SendEvent(GUIM_PRESSED, "press");
    8580                else
    8681                    obj->SendEvent(GUIM_RELEASED, "release");
    8782            }