core: make most for loops use const references (#7527)
why not let the compiler optimise things for us at hyprspeeds when we can.
This commit is contained in:
parent
9c5a37a797
commit
8d6c18076f
31 changed files with 169 additions and 169 deletions
|
|
@ -131,7 +131,7 @@ void CAnimationManager::tick() {
|
|||
}
|
||||
|
||||
// damage any workspace window that is on any monitor
|
||||
for (auto& w : g_pCompositor->m_vWindows) {
|
||||
for (auto const& w : g_pCompositor->m_vWindows) {
|
||||
if (!validMapped(w) || w->m_pWorkspace != PWORKSPACE || w->m_bPinned)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -765,7 +765,7 @@ void CKeybindManager::shadowKeybinds(const xkb_keysym_t& doesntHave, const uint3
|
|||
const auto KBKEY = xkb_keysym_from_name(k.key.c_str(), XKB_KEYSYM_CASE_INSENSITIVE);
|
||||
const auto KBKEYUPPER = xkb_keysym_to_upper(KBKEY);
|
||||
|
||||
for (auto& pk : m_dPressedKeys) {
|
||||
for (auto const& pk : m_dPressedKeys) {
|
||||
if ((pk.keysym != 0 && (pk.keysym == KBKEY || pk.keysym == KBKEYUPPER))) {
|
||||
shadow = true;
|
||||
|
||||
|
|
@ -864,7 +864,7 @@ SDispatchResult CKeybindManager::spawn(std::string args) {
|
|||
if (!RULES.empty()) {
|
||||
const auto RULESLIST = CVarList(RULES, 0, ';');
|
||||
|
||||
for (auto& r : RULESLIST) {
|
||||
for (auto const& r : RULESLIST) {
|
||||
g_pConfigManager->addExecRule({r, (unsigned long)PROC});
|
||||
}
|
||||
|
||||
|
|
@ -1708,7 +1708,7 @@ SDispatchResult CKeybindManager::workspaceOpt(std::string args) {
|
|||
PWORKSPACE->m_bDefaultPseudo = !PWORKSPACE->m_bDefaultPseudo;
|
||||
|
||||
// apply
|
||||
for (auto& w : g_pCompositor->m_vWindows) {
|
||||
for (auto const& w : g_pCompositor->m_vWindows) {
|
||||
if (!w->m_bIsMapped || w->m_pWorkspace != PWORKSPACE)
|
||||
continue;
|
||||
|
||||
|
|
@ -2129,7 +2129,7 @@ SDispatchResult CKeybindManager::setSubmap(std::string submap) {
|
|||
return {};
|
||||
}
|
||||
|
||||
for (auto& k : g_pKeybindManager->m_lKeybinds) {
|
||||
for (auto const& k : g_pKeybindManager->m_lKeybinds) {
|
||||
if (k.submap == submap) {
|
||||
m_szCurrentSelectedSubmap = submap;
|
||||
Debug::log(LOG, "Changed keybind submap to {}", submap);
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ void CPointerManager::unlockSoftwareAll() {
|
|||
}
|
||||
|
||||
void CPointerManager::lockSoftwareForMonitor(CMonitor* Monitor) {
|
||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||
for (auto const& m : g_pCompositor->m_vMonitors) {
|
||||
if (m->ID == Monitor->ID) {
|
||||
lockSoftwareForMonitor(m);
|
||||
return;
|
||||
|
|
@ -107,7 +107,7 @@ void CPointerManager::lockSoftwareForMonitor(SP<CMonitor> mon) {
|
|||
}
|
||||
|
||||
void CPointerManager::unlockSoftwareForMonitor(CMonitor* Monitor) {
|
||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||
for (auto const& m : g_pCompositor->m_vMonitors) {
|
||||
if (m->ID == Monitor->ID) {
|
||||
unlockSoftwareForMonitor(m);
|
||||
return;
|
||||
|
|
@ -225,7 +225,7 @@ void CPointerManager::recheckEnteredOutputs() {
|
|||
|
||||
auto box = getCursorBoxGlobal();
|
||||
|
||||
for (auto& s : monitorStates) {
|
||||
for (auto const& s : monitorStates) {
|
||||
if (s->monitor.expired() || s->monitor->isMirror() || !s->monitor->m_bEnabled)
|
||||
continue;
|
||||
|
||||
|
|
@ -279,7 +279,7 @@ void CPointerManager::resetCursorImage(bool apply) {
|
|||
currentCursorImage.scale = 1.F;
|
||||
currentCursorImage.hotspot = {0, 0};
|
||||
|
||||
for (auto& s : monitorStates) {
|
||||
for (auto const& s : monitorStates) {
|
||||
if (s->monitor.expired() || s->monitor->isMirror() || !s->monitor->m_bEnabled)
|
||||
continue;
|
||||
|
||||
|
|
@ -289,7 +289,7 @@ void CPointerManager::resetCursorImage(bool apply) {
|
|||
if (!apply)
|
||||
return;
|
||||
|
||||
for (auto& ms : monitorStates) {
|
||||
for (auto const& ms : monitorStates) {
|
||||
if (!ms->monitor || !ms->monitor->m_bEnabled || !ms->monitor->dpmsStatus) {
|
||||
Debug::log(TRACE, "Not updating hw cursors: disabled / dpms off display");
|
||||
continue;
|
||||
|
|
@ -334,7 +334,7 @@ void CPointerManager::onCursorMoved() {
|
|||
if (!hasCursor())
|
||||
return;
|
||||
|
||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||
for (auto const& m : g_pCompositor->m_vMonitors) {
|
||||
auto state = stateFor(m);
|
||||
|
||||
state->box = getCursorBoxLogicalForMonitor(state->monitor.lock());
|
||||
|
|
@ -1006,7 +1006,7 @@ void CPointerManager::detachTablet(SP<CTablet> tablet) {
|
|||
}
|
||||
|
||||
void CPointerManager::damageCursor(SP<CMonitor> pMonitor) {
|
||||
for (auto& mw : monitorStates) {
|
||||
for (auto const& mw : monitorStates) {
|
||||
if (mw->monitor != pMonitor)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ void CSeatManager::onNewSeatResource(SP<CWLSeatResource> resource) {
|
|||
}
|
||||
|
||||
SP<CSeatManager::SSeatResourceContainer> CSeatManager::containerForResource(SP<CWLSeatResource> seatResource) {
|
||||
for (auto& c : seatResources) {
|
||||
for (auto const& c : seatResources) {
|
||||
if (c->resource == seatResource)
|
||||
return c;
|
||||
}
|
||||
|
|
@ -112,11 +112,11 @@ void CSeatManager::setKeyboardFocus(SP<CWLSurfaceResource> surf) {
|
|||
|
||||
if (state.keyboardFocusResource) {
|
||||
auto client = state.keyboardFocusResource->client();
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != client)
|
||||
continue;
|
||||
|
||||
for (auto& k : s->resource->keyboards) {
|
||||
for (auto const& k : s->resource->keyboards) {
|
||||
if (!k)
|
||||
continue;
|
||||
|
||||
|
|
@ -134,12 +134,12 @@ void CSeatManager::setKeyboardFocus(SP<CWLSurfaceResource> surf) {
|
|||
}
|
||||
|
||||
auto client = surf->client();
|
||||
for (auto& r : seatResources | std::views::reverse) {
|
||||
for (auto const& r : seatResources | std::views::reverse) {
|
||||
if (r->resource->client() != client)
|
||||
continue;
|
||||
|
||||
state.keyboardFocusResource = r->resource;
|
||||
for (auto& k : r->resource->keyboards) {
|
||||
for (auto const& k : r->resource->keyboards) {
|
||||
if (!k)
|
||||
continue;
|
||||
|
||||
|
|
@ -157,11 +157,11 @@ void CSeatManager::sendKeyboardKey(uint32_t timeMs, uint32_t key, wl_keyboard_ke
|
|||
if (!state.keyboardFocusResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != state.keyboardFocusResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& k : s->resource->keyboards) {
|
||||
for (auto const& k : s->resource->keyboards) {
|
||||
if (!k)
|
||||
continue;
|
||||
|
||||
|
|
@ -174,11 +174,11 @@ void CSeatManager::sendKeyboardMods(uint32_t depressed, uint32_t latched, uint32
|
|||
if (!state.keyboardFocusResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != state.keyboardFocusResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& k : s->resource->keyboards) {
|
||||
for (auto const& k : s->resource->keyboards) {
|
||||
if (!k)
|
||||
continue;
|
||||
|
||||
|
|
@ -205,11 +205,11 @@ void CSeatManager::setPointerFocus(SP<CWLSurfaceResource> surf, const Vector2D&
|
|||
|
||||
if (state.pointerFocusResource) {
|
||||
auto client = state.pointerFocusResource->client();
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != client)
|
||||
continue;
|
||||
|
||||
for (auto& p : s->resource->pointers) {
|
||||
for (auto const& p : s->resource->pointers) {
|
||||
if (!p)
|
||||
continue;
|
||||
|
||||
|
|
@ -230,12 +230,12 @@ void CSeatManager::setPointerFocus(SP<CWLSurfaceResource> surf, const Vector2D&
|
|||
}
|
||||
|
||||
auto client = surf->client();
|
||||
for (auto& r : seatResources | std::views::reverse) {
|
||||
for (auto const& r : seatResources | std::views::reverse) {
|
||||
if (r->resource->client() != client)
|
||||
continue;
|
||||
|
||||
state.pointerFocusResource = r->resource;
|
||||
for (auto& p : r->resource->pointers) {
|
||||
for (auto const& p : r->resource->pointers) {
|
||||
if (!p)
|
||||
continue;
|
||||
|
||||
|
|
@ -257,11 +257,11 @@ void CSeatManager::sendPointerMotion(uint32_t timeMs, const Vector2D& local) {
|
|||
if (!state.pointerFocusResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != state.pointerFocusResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& p : s->resource->pointers) {
|
||||
for (auto const& p : s->resource->pointers) {
|
||||
if (!p)
|
||||
continue;
|
||||
|
||||
|
|
@ -276,11 +276,11 @@ void CSeatManager::sendPointerButton(uint32_t timeMs, uint32_t key, wl_pointer_b
|
|||
if (!state.pointerFocusResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != state.pointerFocusResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& p : s->resource->pointers) {
|
||||
for (auto const& p : s->resource->pointers) {
|
||||
if (!p)
|
||||
continue;
|
||||
|
||||
|
|
@ -300,11 +300,11 @@ void CSeatManager::sendPointerFrame(WP<CWLSeatResource> pResource) {
|
|||
if (!pResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != pResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& p : s->resource->pointers) {
|
||||
for (auto const& p : s->resource->pointers) {
|
||||
if (!p)
|
||||
continue;
|
||||
|
||||
|
|
@ -318,11 +318,11 @@ void CSeatManager::sendPointerAxis(uint32_t timeMs, wl_pointer_axis axis, double
|
|||
if (!state.pointerFocusResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != state.pointerFocusResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& p : s->resource->pointers) {
|
||||
for (auto const& p : s->resource->pointers) {
|
||||
if (!p)
|
||||
continue;
|
||||
|
||||
|
|
@ -346,12 +346,12 @@ void CSeatManager::sendTouchDown(SP<CWLSurfaceResource> surf, uint32_t timeMs, i
|
|||
state.touchFocus = surf;
|
||||
|
||||
auto client = surf->client();
|
||||
for (auto& r : seatResources | std::views::reverse) {
|
||||
for (auto const& r : seatResources | std::views::reverse) {
|
||||
if (r->resource->client() != client)
|
||||
continue;
|
||||
|
||||
state.touchFocusResource = r->resource;
|
||||
for (auto& t : r->resource->touches) {
|
||||
for (auto const& t : r->resource->touches) {
|
||||
if (!t)
|
||||
continue;
|
||||
|
||||
|
|
@ -372,12 +372,12 @@ void CSeatManager::sendTouchUp(uint32_t timeMs, int32_t id) {
|
|||
return;
|
||||
|
||||
auto client = state.touchFocusResource->client();
|
||||
for (auto& r : seatResources | std::views::reverse) {
|
||||
for (auto const& r : seatResources | std::views::reverse) {
|
||||
if (r->resource->client() != client)
|
||||
continue;
|
||||
|
||||
state.touchFocusResource = r->resource;
|
||||
for (auto& t : r->resource->touches) {
|
||||
for (auto const& t : r->resource->touches) {
|
||||
if (!t)
|
||||
continue;
|
||||
|
||||
|
|
@ -395,11 +395,11 @@ void CSeatManager::sendTouchMotion(uint32_t timeMs, int32_t id, const Vector2D&
|
|||
if (!state.touchFocusResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != state.touchFocusResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& t : s->resource->touches) {
|
||||
for (auto const& t : s->resource->touches) {
|
||||
if (!t)
|
||||
continue;
|
||||
|
||||
|
|
@ -412,11 +412,11 @@ void CSeatManager::sendTouchFrame() {
|
|||
if (!state.touchFocusResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != state.touchFocusResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& t : s->resource->touches) {
|
||||
for (auto const& t : s->resource->touches) {
|
||||
if (!t)
|
||||
continue;
|
||||
|
||||
|
|
@ -429,11 +429,11 @@ void CSeatManager::sendTouchCancel() {
|
|||
if (!state.touchFocusResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != state.touchFocusResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& t : s->resource->touches) {
|
||||
for (auto const& t : s->resource->touches) {
|
||||
if (!t)
|
||||
continue;
|
||||
|
||||
|
|
@ -446,11 +446,11 @@ void CSeatManager::sendTouchShape(int32_t id, const Vector2D& shape) {
|
|||
if (!state.touchFocusResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != state.touchFocusResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& t : s->resource->touches) {
|
||||
for (auto const& t : s->resource->touches) {
|
||||
if (!t)
|
||||
continue;
|
||||
|
||||
|
|
@ -463,11 +463,11 @@ void CSeatManager::sendTouchOrientation(int32_t id, double angle) {
|
|||
if (!state.touchFocusResource)
|
||||
return;
|
||||
|
||||
for (auto& s : seatResources) {
|
||||
for (auto const& s : seatResources) {
|
||||
if (s->resource->client() != state.touchFocusResource->client())
|
||||
continue;
|
||||
|
||||
for (auto& t : s->resource->touches) {
|
||||
for (auto const& t : s->resource->touches) {
|
||||
if (!t)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ bool CSessionLockManager::isSurfaceSessionLock(SP<CWLSurfaceResource> pSurface)
|
|||
if (!m_pSessionLock)
|
||||
return false;
|
||||
|
||||
for (auto& sls : m_pSessionLock->vSessionLockSurfaces) {
|
||||
for (auto const& sls : m_pSessionLock->vSessionLockSurfaces) {
|
||||
if (sls->surface->surface() == pSurface)
|
||||
return true;
|
||||
}
|
||||
|
|
@ -154,7 +154,7 @@ void CSessionLockManager::removeSessionLockSurface(SSessionLockSurface* pSLS) {
|
|||
if (g_pCompositor->m_pLastFocus)
|
||||
return;
|
||||
|
||||
for (auto& sls : m_pSessionLock->vSessionLockSurfaces) {
|
||||
for (auto const& sls : m_pSessionLock->vSessionLockSurfaces) {
|
||||
if (!sls->mapped)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ void CHyprXWaylandManager::setWindowSize(PHLWINDOW pWindow, Vector2D size, bool
|
|||
|
||||
bool CHyprXWaylandManager::shouldBeFloated(PHLWINDOW pWindow, bool pending) {
|
||||
if (pWindow->m_bIsX11) {
|
||||
for (auto& a : pWindow->m_pXWaylandSurface->atoms)
|
||||
for (auto const& a : pWindow->m_pXWaylandSurface->atoms)
|
||||
if (a == HYPRATOMS["_NET_WM_WINDOW_TYPE_DIALOG"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_SPLASH"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_TOOLBAR"] ||
|
||||
a == HYPRATOMS["_NET_WM_WINDOW_TYPE_UTILITY"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_TOOLTIP"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_POPUP_MENU"] ||
|
||||
a == HYPRATOMS["_NET_WM_WINDOW_TYPE_DOCK"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_DROPDOWN_MENU"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_MENU"] ||
|
||||
|
|
@ -193,7 +193,7 @@ void CHyprXWaylandManager::checkBorders(PHLWINDOW pWindow) {
|
|||
if (!pWindow->m_bIsX11)
|
||||
return;
|
||||
|
||||
for (auto& a : pWindow->m_pXWaylandSurface->atoms) {
|
||||
for (auto const& a : pWindow->m_pXWaylandSurface->atoms) {
|
||||
if (a == HYPRATOMS["_NET_WM_WINDOW_TYPE_POPUP_MENU"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_NOTIFICATION"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_DROPDOWN_MENU"] ||
|
||||
a == HYPRATOMS["_NET_WM_WINDOW_TYPE_COMBO"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_MENU"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_SPLASH"] ||
|
||||
a == HYPRATOMS["_NET_WM_WINDOW_TYPE_TOOLTIP"]) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ void CInputManager::newIdleInhibitor(std::any inhibitor) {
|
|||
|
||||
void CInputManager::recheckIdleInhibitorStatus() {
|
||||
|
||||
for (auto& ii : m_vIdleInhibitors) {
|
||||
for (auto const& ii : m_vIdleInhibitors) {
|
||||
if (ii->nonDesktop) {
|
||||
PROTO::idle->setInhibit(true);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -919,7 +919,7 @@ void CInputManager::setupKeyboard(SP<IKeyboard> keeb) {
|
|||
}
|
||||
|
||||
void CInputManager::setKeyboardLayout() {
|
||||
for (auto& k : m_vKeyboards)
|
||||
for (auto const& k : m_vKeyboards)
|
||||
applyConfigToKeyboard(k);
|
||||
|
||||
g_pKeybindManager->updateXKBTranslationState();
|
||||
|
|
@ -1197,7 +1197,7 @@ void CInputManager::destroyKeyboard(SP<IKeyboard> pKeyboard) {
|
|||
|
||||
if (m_vKeyboards.size() > 0) {
|
||||
bool found = false;
|
||||
for (auto& k : m_vKeyboards | std::views::reverse) {
|
||||
for (auto const& k : m_vKeyboards | std::views::reverse) {
|
||||
if (!k)
|
||||
continue;
|
||||
|
||||
|
|
@ -1673,7 +1673,7 @@ void CInputManager::releaseAllMouseButtons() {
|
|||
if (PROTO::data->dndActive())
|
||||
return;
|
||||
|
||||
for (auto& mb : buttonsCopy) {
|
||||
for (auto const& mb : buttonsCopy) {
|
||||
g_pSeatManager->sendPointerButton(0, mb, WL_POINTER_BUTTON_STATE_RELEASED);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ void CInputManager::onSwipeBegin(IPointer::SSwipeBeginEvent e) {
|
|||
return;
|
||||
|
||||
int onMonitor = 0;
|
||||
for (auto& w : g_pCompositor->m_vWorkspaces) {
|
||||
for (auto const& w : g_pCompositor->m_vWorkspaces) {
|
||||
if (w->m_iMonitorID == g_pCompositor->m_pLastMonitor->ID && !g_pCompositor->isWorkspaceSpecial(w->m_iID)) {
|
||||
onMonitor++;
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ void CInputManager::beginWorkspaceSwipe() {
|
|||
m_sActiveSwipe.speedPoints = 0;
|
||||
|
||||
if (PWORKSPACE->m_bHasFullscreenWindow) {
|
||||
for (auto& ls : g_pCompositor->m_pLastMonitor->m_aLayerSurfaceLayers[2]) {
|
||||
for (auto const& ls : g_pCompositor->m_pLastMonitor->m_aLayerSurfaceLayers[2]) {
|
||||
ls->alpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
|
@ -193,7 +193,7 @@ void CInputManager::endWorkspaceSwipe() {
|
|||
g_pInputManager->refocus();
|
||||
|
||||
// apply alpha
|
||||
for (auto& ls : g_pCompositor->m_pLastMonitor->m_aLayerSurfaceLayers[2]) {
|
||||
for (auto const& ls : g_pCompositor->m_pLastMonitor->m_aLayerSurfaceLayers[2]) {
|
||||
ls->alpha = pSwitchedTo->m_bHasFullscreenWindow && pSwitchedTo->m_efFullscreenMode == FSMODE_FULLSCREEN ? 0.f : 1.f;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ static void unfocusTool(SP<CTabletTool> tool) {
|
|||
tool->setSurface(nullptr);
|
||||
if (tool->isDown)
|
||||
PROTO::tablet->up(tool);
|
||||
for (auto& b : tool->buttonsDown) {
|
||||
for (auto const& b : tool->buttonsDown) {
|
||||
PROTO::tablet->buttonTool(tool, b, false);
|
||||
}
|
||||
PROTO::tablet->proximityOut(tool);
|
||||
|
|
@ -31,7 +31,7 @@ static void focusTool(SP<CTabletTool> tool, SP<CTablet> tablet, SP<CWLSurfaceRes
|
|||
PROTO::tablet->proximityIn(tool, tablet, surf);
|
||||
if (tool->isDown)
|
||||
PROTO::tablet->down(tool);
|
||||
for (auto& b : tool->buttonsDown) {
|
||||
for (auto const& b : tool->buttonsDown) {
|
||||
PROTO::tablet->buttonTool(tool, b, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue