diff options
| author | Felix Dick <felix.dick@web.de> | 2022-09-25 20:07:48 +0200 |
|---|---|---|
| committer | Felix Dick <felix.dick@web.de> | 2022-09-25 20:07:48 +0200 |
| commit | bf3f519eb76bfa8d5f7d71f882b7b803c699aee1 (patch) | |
| tree | 77126f8d49917fc0bcd44af7859e88fb88d7bfaa /src/managers | |
| parent | 190229942f60ea5b8905a673ddea44c05da14de3 (diff) | |
Remove trailing whitespace.
Diffstat (limited to 'src/managers')
| -rw-r--r-- | src/managers/AnimationManager.cpp | 6 | ||||
| -rw-r--r-- | src/managers/KeybindManager.cpp | 24 | ||||
| -rw-r--r-- | src/managers/KeybindManager.hpp | 2 | ||||
| -rw-r--r-- | src/managers/LayoutManager.cpp | 4 | ||||
| -rw-r--r-- | src/managers/XWaylandManager.cpp | 10 | ||||
| -rw-r--r-- | src/managers/input/InputManager.cpp | 18 | ||||
| -rw-r--r-- | src/managers/input/InputManager.hpp | 4 | ||||
| -rw-r--r-- | src/managers/input/InputMethodRelay.cpp | 8 | ||||
| -rw-r--r-- | src/managers/input/Tablets.cpp | 10 |
9 files changed, 43 insertions, 43 deletions
diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp index f262411e..27653766 100644 --- a/src/managers/AnimationManager.cpp +++ b/src/managers/AnimationManager.cpp @@ -167,7 +167,7 @@ void CAnimationManager::tick() { } case AVARDAMAGE_BORDER: { RASSERT(PWINDOW, "Tried to AVARDAMAGE_BORDER a non-window AVAR!"); - + // damage only the border. static auto *const PROUNDING = &g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue; const auto ROUNDINGSIZE = *PROUNDING + 1; @@ -222,7 +222,7 @@ void CAnimationManager::tick() { break; } } - + // set size and pos if valid, but only if damage policy entire (dont if border for example) if (g_pCompositor->windowValidMapped(PWINDOW) && av->m_eDamagePolicy == AVARDAMAGE_ENTIRE && PWINDOW->m_iX11Type != 2) @@ -438,4 +438,4 @@ std::string CAnimationManager::styleValidInConfigVar(const std::string& config, } return ""; -}
\ No newline at end of file +} diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 4607fdd4..99f6bab5 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -243,7 +243,7 @@ bool CKeybindManager::onAxisEvent(wlr_pointer_axis_event* e) { bool found = false; if (e->source == WLR_AXIS_SOURCE_WHEEL && e->orientation == WLR_AXIS_ORIENTATION_VERTICAL) { - if (e->delta < 0) { + if (e->delta < 0) { found = g_pKeybindManager->handleKeybinds(MODS, "mouse_down", 0, 0, true, 0); } else { found = g_pKeybindManager->handleKeybinds(MODS, "mouse_up", 0, 0, true, 0); @@ -391,7 +391,7 @@ void CKeybindManager::shadowKeybinds(const xkb_keysym_t& doesntHave, const int& for (auto& pk : m_dPressedKeysyms) { if ((pk == KBKEY || pk == KBKEYUPPER)) { shadow = true; - + if (pk == doesntHave && doesntHave != 0) { shadow = false; break; @@ -609,7 +609,7 @@ void CKeybindManager::changeworkspace(std::string args) { return; } - // Workspace_back_and_forth being enabled means that an attempt to switch to + // Workspace_back_and_forth being enabled means that an attempt to switch to // the current workspace will instead switch to the previous. const auto PCURRENTWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace); static auto *const PBACKANDFORTH = &g_pConfigManager->getConfigValuePtr("binds:workspace_back_and_forth")->intValue; @@ -624,11 +624,11 @@ void CKeybindManager::changeworkspace(std::string args) { static auto *const PALLOWWORKSPACECYCLES = &g_pConfigManager->getConfigValuePtr("binds:allow_workspace_cycles")->intValue; if (!*PALLOWWORKSPACECYCLES) PCURRENTWORKSPACE->m_iPrevWorkspaceID = -1; - + } else if (PCURRENTWORKSPACE->m_iID == workspaceToChangeTo && !internal) return; - // remove constraints + // remove constraints g_pInputManager->unconstrainMouse(); // if it's not internal, we will unfocus to prevent stuck focus @@ -699,7 +699,7 @@ void CKeybindManager::changeworkspace(std::string args) { // warp and focus if (anotherMonitor) g_pCompositor->warpCursorTo(PWINDOW->m_vRealPosition.vec() + PWINDOW->m_vRealSize.vec() / 2.f); - + g_pCompositor->focusWindow(PWINDOW, g_pXWaylandManager->getWindowSurface(PWINDOW)); if (g_pCompositor->cursorOnReservedArea()) // fix focus on bars etc @@ -853,7 +853,7 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) { // Hack: So that the layout doesnt find our window at the cursor PWINDOW->m_vPosition = Vector2D(-42069, -42069); - + g_pLayoutManager->getCurrentLayout()->onWindowCreated(PWINDOW); // and restore it @@ -997,7 +997,7 @@ void CKeybindManager::moveFocusTo(std::string args) { return; } - + const auto PWINDOWTOCHANGETO = g_pCompositor->getWindowInDirection(PLASTWINDOW, arg); if (PWINDOWTOCHANGETO) { @@ -1147,7 +1147,7 @@ void CKeybindManager::moveCursorToCorner(std::string arg) { } void CKeybindManager::workspaceOpt(std::string args) { - + // current workspace const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace); @@ -1484,7 +1484,7 @@ void CKeybindManager::pass(std::string regexp) { else wlr_seat_pointer_enter(g_pCompositor->m_sSeat.seat, g_pXWaylandManager->getWindowSurface(PWINDOW), 1, 1); } - + wlr_keyboard_modifiers kbmods = {g_pInputManager->accumulateModsFromAllKBs(), 0, 0, 0}; wlr_seat_keyboard_notify_modifiers(g_pCompositor->m_sSeat.seat, &kbmods); @@ -1507,7 +1507,7 @@ void CKeybindManager::pass(std::string regexp) { } else { wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastMouseCode, WLR_BUTTON_PRESSED); wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastMouseCode, WLR_BUTTON_RELEASED); - } + } } if (XWTOXW) @@ -1553,7 +1553,7 @@ void CKeybindManager::dpms(std::string arg) { for (auto& m : g_pCompositor->m_vMonitors) { wlr_output_enable(m->output, enable); - + if (!wlr_output_commit(m->output)) { Debug::log(ERR, "Couldn't commit output %s", m->szName.c_str()); } diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index ed1f8059..561d90a0 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -38,7 +38,7 @@ public: bool onKeyEvent(wlr_keyboard_key_event*, SKeyboard*); bool onAxisEvent(wlr_pointer_axis_event*); bool onMouseEvent(wlr_pointer_button_event*); - + void addKeybind(SKeybind); void removeKeybind(uint32_t, const std::string&); uint32_t stringToModMask(std::string); diff --git a/src/managers/LayoutManager.cpp b/src/managers/LayoutManager.cpp index 8e7e397b..155b0bfc 100644 --- a/src/managers/LayoutManager.cpp +++ b/src/managers/LayoutManager.cpp @@ -2,7 +2,7 @@ IHyprLayout* CLayoutManager::getCurrentLayout() { switch (m_iCurrentLayoutID) { - case DWINDLE: + case DWINDLE: return &m_cDwindleLayout; case MASTER: return &m_cMasterLayout; @@ -28,4 +28,4 @@ void CLayoutManager::switchToLayout(std::string layout) { } else { Debug::log(ERR, "Unknown layout %s!", layout.c_str()); } -}
\ No newline at end of file +} diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index a8952af0..f3f301da 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -46,7 +46,7 @@ void CHyprXWaylandManager::activateSurface(wlr_surface* pSurface, bool activate) if (activate) wlr_xwayland_surface_restack(wlr_xwayland_surface_from_wlr_surface(pSurface), NULL, XCB_STACK_MODE_ABOVE); } - + } void CHyprXWaylandManager::activateWindow(CWindow* pWindow, bool activate) { @@ -166,7 +166,7 @@ bool CHyprXWaylandManager::shouldBeFloated(CWindow* pWindow) { { if (pWindow->m_uSurface.xwayland->window_type[i] == HYPRATOMS["_NET_WM_WINDOW_TYPE_DROPDOWN_MENU"] || pWindow->m_uSurface.xwayland->window_type[i] == HYPRATOMS["_NET_WM_WINDOW_TYPE_MENU"]) pWindow->m_bX11ShouldntFocus = true; - + pWindow->m_bNoInitialFocus = true; return true; } @@ -196,7 +196,7 @@ bool CHyprXWaylandManager::shouldBeFloated(CWindow* pWindow) { return true; } else { const auto PSTATE = &pWindow->m_uSurface.xdg->toplevel->current; - + if ((PSTATE->min_width != 0 && PSTATE->min_height != 0 && (PSTATE->min_width == PSTATE->max_width || PSTATE->min_height == PSTATE->max_height)) || pWindow->m_uSurface.xdg->toplevel->parent) return true; } @@ -207,7 +207,7 @@ bool CHyprXWaylandManager::shouldBeFloated(CWindow* pWindow) { void CHyprXWaylandManager::moveXWaylandWindow(CWindow* pWindow, const Vector2D& pos) { if (!g_pCompositor->windowValidMapped(pWindow)) return; - + if (pWindow->m_bIsX11) { wlr_xwayland_surface_configure(pWindow->m_uSurface.xwayland, pos.x, pos.y, pWindow->m_vRealSize.vec().x, pWindow->m_vRealSize.vec().y); } @@ -222,7 +222,7 @@ void CHyprXWaylandManager::checkBorders(CWindow* pWindow) { pWindow->m_uSurface.xwayland->window_type[i] == HYPRATOMS["_NET_WM_WINDOW_TYPE_DROPDOWN_MENU"] || pWindow->m_uSurface.xwayland->window_type[i] == HYPRATOMS["_NET_WM_WINDOW_TYPE_COMBO"] || pWindow->m_uSurface.xwayland->window_type[i] == HYPRATOMS["_NET_WM_WINDOW_TYPE_MENU"] || pWindow->m_uSurface.xwayland->window_type[i] == HYPRATOMS["_NET_WM_WINDOW_TYPE_SPLASH"] || pWindow->m_uSurface.xwayland->window_type[i] == HYPRATOMS["_NET_WM_WINDOW_TYPE_TOOLTIP"]) { - + pWindow->m_bX11DoesntWantBorders = true; return; } diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index ccb9bda5..a5ba9c65 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -288,7 +288,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { if (*PFOLLOWMOUSE != 0 || pFoundWindow == g_pCompositor->m_pLastWindow) wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, time, surfaceLocal.x, surfaceLocal.y); - + m_bLastFocusOnLS = false; return; // don't enter any new surfaces } else { @@ -372,7 +372,7 @@ void CInputManager::setClickMode(eClickBehaviorMode mode) { break; default: break; - } + } } void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) { @@ -467,11 +467,11 @@ void CInputManager::newKeyboard(wlr_input_device* keyboard) { const auto PKEYBOARD = (SKeyboard*)owner; g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", PKEYBOARD->name + "," +getActiveLayoutForKeyboard(PKEYBOARD)}, true); // force as this should ALWAYS be sent - + }, PNEWKEYBOARD, "Keyboard"); disableAllKeyboards(false); - + m_pActiveKeyboard = PNEWKEYBOARD; PNEWKEYBOARD->active = true; @@ -502,7 +502,7 @@ void CInputManager::newVirtualKeyboard(wlr_input_device* keyboard) { const auto PKEYBOARD = (SKeyboard*)owner; g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", PKEYBOARD->name + "," +getActiveLayoutForKeyboard(PKEYBOARD)}, true); // force as this should ALWAYS be sent - + }, PNEWKEYBOARD, "Keyboard"); disableAllKeyboards(true); @@ -599,7 +599,7 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) { } else { KEYMAP = xkb_keymap_new_from_file(CONTEXT, fopen(path.c_str(), "r"), XKB_KEYMAP_FORMAT_TEXT_V1, XKB_KEYMAP_COMPILE_NO_FLAGS); } - } + } if (!KEYMAP) { KEYMAP = xkb_keymap_new_from_names(CONTEXT, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS); @@ -642,7 +642,7 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) { g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->name + "," +getActiveLayoutForKeyboard(pKeyboard)}, true); // force as this should ALWAYS be sent Debug::log(LOG, "Set the keyboard layout to %s and variant to %s for keyboard \"%s\"", rules.layout, rules.variant, pKeyboard->keyboard->name); -} +} void CInputManager::newMouse(wlr_input_device* mouse, bool virt) { m_lMice.emplace_back(); @@ -879,7 +879,7 @@ void CInputManager::constrainMouse(SMouse* pMouse, wlr_pointer_constraint_v1* co } } } - + wlr_pointer_constraint_v1_send_deactivated(pMouse->currentConstraint); } @@ -969,7 +969,7 @@ std::string CInputManager::getActiveLayoutForKeyboard(SKeyboard* pKeyboard) { if (xkb_state_layout_index_is_active(STATE, i, XKB_STATE_LAYOUT_EFFECTIVE)) { const auto LAYOUTNAME = xkb_keymap_layout_get_name(KEYMAP, i); - if (LAYOUTNAME) + if (LAYOUTNAME) return std::string(LAYOUTNAME); return "error"; } diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp index 17fd6271..85af33fc 100644 --- a/src/managers/input/InputManager.hpp +++ b/src/managers/input/InputManager.hpp @@ -29,7 +29,7 @@ public: void onMouseMoved(wlr_pointer_motion_event*); void onMouseWarp(wlr_pointer_motion_absolute_event*); void onMouseButton(wlr_pointer_button_event*); - void onMouseWheel(wlr_pointer_axis_event*); + void onMouseWheel(wlr_pointer_axis_event*); void onKeyboardKey(wlr_keyboard_key_event*, SKeyboard*); void onKeyboardMod(void*, SKeyboard*); @@ -136,4 +136,4 @@ private: void applyConfigToKeyboard(SKeyboard*); }; -inline std::unique_ptr<CInputManager> g_pInputManager;
\ No newline at end of file +inline std::unique_ptr<CInputManager> g_pInputManager; diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index f9582f54..25d8dfb9 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -97,7 +97,7 @@ void CInputMethodRelay::onNewIME(wlr_input_method_v2* pIME) { }, this, "IMERelay"); hyprListener_IMENewPopup.initCallback(&m_pWLRIME->events.new_popup_surface, [&](void* owner, void* data) { - + const auto PNEWPOPUP = &m_lIMEPopups.emplace_back(); PNEWPOPUP->pSurface = (wlr_input_popup_surface_v2*)data; @@ -120,7 +120,7 @@ void CInputMethodRelay::onNewIME(wlr_input_method_v2* pIME) { } void CInputMethodRelay::updateInputPopup(SIMEPopup* pPopup) { - if (!pPopup->pSurface->mapped) + if (!pPopup->pSurface->mapped) return; // damage last known pos & size @@ -404,7 +404,7 @@ void CInputMethodRelay::onKeyboardFocus(wlr_surface* pSurface) { for (auto& ti : m_lTextInputs) { if (ti.pPendingSurface) { - if (pSurface != ti.pPendingSurface) + if (pSurface != ti.pPendingSurface) setPendingSurface(&ti, nullptr); } else if (ti.pWlrInput->focused_surface) { @@ -446,4 +446,4 @@ void CInputMethodRelay::setPendingSurface(STextInput* pInput, wlr_surface* pSurf } else { pInput->hyprListener_pendingSurfaceDestroy.removeCallback(); } -}
\ No newline at end of file +} diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp index ba79c458..173f6961 100644 --- a/src/managers/input/Tablets.cpp +++ b/src/managers/input/Tablets.cpp @@ -66,7 +66,7 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { if (EVENT->updated_axes & WLR_TABLET_TOOL_AXIS_SLIDER) wlr_tablet_v2_tablet_tool_notify_slider(PTOOL->wlrTabletToolV2, EVENT->slider); - if (EVENT->updated_axes & WLR_TABLET_TOOL_AXIS_WHEEL) + if (EVENT->updated_axes & WLR_TABLET_TOOL_AXIS_WHEEL) wlr_tablet_v2_tablet_tool_notify_wheel(PTOOL->wlrTabletToolV2, EVENT->wheel_delta, 0); if (EVENT->updated_axes & WLR_TABLET_TOOL_AXIS_TILT_X) @@ -95,7 +95,7 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { else { wlr_send_tablet_v2_tablet_tool_up(PTOOL->wlrTabletToolV2); } - + }, PNEWTABLET, "Tablet"); PNEWTABLET->hyprListener_Button.initCallback(&wlr_tablet_from_input_device(pDevice)->events.button, [](void* owner, void* data) { @@ -104,7 +104,7 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { const auto PTOOL = g_pInputManager->ensureTabletToolPresent(EVENT->tool); wlr_tablet_v2_tablet_tool_notify_button(PTOOL->wlrTabletToolV2, (zwp_tablet_pad_v2_button_state)EVENT->button, (zwp_tablet_pad_v2_button_state)EVENT->state); - + }, PNEWTABLET, "Tablet"); PNEWTABLET->hyprListener_Proximity.initCallback(&wlr_tablet_from_input_device(pDevice)->events.proximity, [](void* owner, void* data) { @@ -120,13 +120,13 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { wlr_tablet_v2_tablet_tool_notify_proximity_out(PTOOL->wlrTabletToolV2); PTOOL->pSurface = nullptr; } - + } else { PTOOL->active = true; g_pInputManager->refocus(); g_pInputManager->focusTablet(PTAB, EVENT->tool); } - + }, PNEWTABLET, "Tablet"); } |
