refactor: EiScreen sonar adjustments
This commit is contained in:
@ -197,7 +197,7 @@ std::uint32_t EiScreen::registerHotKey(KeyID key, KeyModifierMask mask)
|
||||
|
||||
auto set = m_hotkeys.find(key);
|
||||
if (set == m_hotkeys.end()) {
|
||||
m_hotkeys.emplace(key, HotKeySet{key});
|
||||
m_hotkeys.try_emplace(key, HotKeySet{key});
|
||||
set = m_hotkeys.find(key);
|
||||
}
|
||||
set->second.addItem(HotKeyItem(mask, id));
|
||||
@ -207,8 +207,9 @@ std::uint32_t EiScreen::registerHotKey(KeyID key, KeyModifierMask mask)
|
||||
|
||||
void EiScreen::unregisterHotKey(uint32_t id)
|
||||
{
|
||||
for (auto &set : m_hotkeys) {
|
||||
if (set.second.removeById(id)) {
|
||||
for (auto &[key, set] : m_hotkeys) {
|
||||
(void)key;
|
||||
if (set.removeById(id)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -689,7 +690,7 @@ void EiScreen::onMotionEvent(ei_event *event)
|
||||
}
|
||||
}
|
||||
|
||||
void EiScreen::onAbsMotionEvent(const ei_event *event) const
|
||||
void EiScreen::onAbsMotionEvent(const ei_event *) const
|
||||
{
|
||||
assert(m_isPrimary);
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#include "deskflow/PlatformScreen.h"
|
||||
|
||||
#include <libei.h>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
@ -96,14 +97,14 @@ private:
|
||||
void onPointerScrollEvent(ei_event *event);
|
||||
void onPointerScrollDiscreteEvent(ei_event *event);
|
||||
void onMotionEvent(ei_event *event);
|
||||
void onAbsMotionEvent(const ei_event *event) const;
|
||||
void onAbsMotionEvent(const ei_event *) const;
|
||||
bool onHotkey(KeyID key, bool is_press, KeyModifierMask mask);
|
||||
void eiLogEvent(ei_log_priority priority, const char *message) const;
|
||||
|
||||
void handleConnectedToEisEvent(const Event &event);
|
||||
void handlePortalSessionClosed();
|
||||
|
||||
static void handleEiLogEvent(ei *ei, ei_log_priority priority, const char *message, ei_log_context *context)
|
||||
static void handleEiLogEvent(ei *ei, const ei_log_priority priority, const char *message, ei_log_context *)
|
||||
{
|
||||
auto screen = static_cast<EiScreen *>(ei_get_user_data(ei));
|
||||
screen->eiLogEvent(priority, message);
|
||||
|
||||
Reference in New Issue
Block a user