summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorPhilip Damianik <39028343+pdamianik@users.noreply.github.com>2023-10-15 20:07:23 +0200
committerGitHub <noreply@github.com>2023-10-15 19:07:23 +0100
commit442209942fdedbdded6362cafed736c327da0e1c (patch)
tree8e8b257bc9656f5364be9f56509b8bbdd88b1cdd /src/managers/input/InputManager.cpp
parent43b39e0bc6a83ce190ff09054beb713e0431f19b (diff)
cleanup: Replace find() with C++20 starts_with(), ends_with() and contains() (#3572)
* Replace find() with C++20 starts_with() and ends_with() * Replace find() with C++20 contains()
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index f79278e3..fb93b7bc 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -1001,7 +1001,7 @@ void CInputManager::setPointerConfigs() {
libinput_device_config_accel_set_profile(LIBINPUTDEV, LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE);
} else if (ACCELPROFILE == "flat") {
libinput_device_config_accel_set_profile(LIBINPUTDEV, LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT);
- } else if (ACCELPROFILE.find("custom") == 0) {
+ } else if (ACCELPROFILE.starts_with("custom")) {
CVarList args = {ACCELPROFILE, 0, ' '};
try {
double step = std::stod(args[1]);
@@ -1582,7 +1582,7 @@ void CInputManager::setCursorIconOnBorder(CWindow* w) {
wlr_box box = {w->m_vRealPosition.vec().x, w->m_vRealPosition.vec().y, w->m_vRealSize.vec().x, w->m_vRealSize.vec().y};
eBorderIconDirection direction = BORDERICON_NONE;
wlr_box boxFullGrabInput = {box.x - *PEXTENDBORDERGRAB - BORDERSIZE, box.y - *PEXTENDBORDERGRAB - BORDERSIZE, box.width + 2 * (*PEXTENDBORDERGRAB + BORDERSIZE),
- box.height + 2 * (*PEXTENDBORDERGRAB + BORDERSIZE)};
+ box.height + 2 * (*PEXTENDBORDERGRAB + BORDERSIZE)};
if (!wlr_box_contains_point(&boxFullGrabInput, mouseCoords.x, mouseCoords.y) || (!m_lCurrentlyHeldButtons.empty() && !currentlyDraggedWindow)) {
direction = BORDERICON_NONE;