mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-18 13:02:09 +01:00
add option to toggle cursor icons when hovering over border
This commit is contained in:
parent
7014aa5012
commit
e1e3b122dd
2 changed files with 4 additions and 2 deletions
|
@ -48,6 +48,7 @@ void CConfigManager::setDefaultVars() {
|
||||||
configValues["general:no_cursor_warps"].intValue = 0;
|
configValues["general:no_cursor_warps"].intValue = 0;
|
||||||
configValues["general:resize_on_borders"].intValue = 0;
|
configValues["general:resize_on_borders"].intValue = 0;
|
||||||
configValues["general:extend_border_grab_area"].intValue = 15;
|
configValues["general:extend_border_grab_area"].intValue = 15;
|
||||||
|
configValues["general:hover_icon_on_border"].intValue = 1;
|
||||||
|
|
||||||
configValues["general:layout"].strValue = "dwindle";
|
configValues["general:layout"].strValue = "dwindle";
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
static auto* const PRESIZEONBORDER = &g_pConfigManager->getConfigValuePtr("general:resize_on_borders")->intValue;
|
static auto* const PRESIZEONBORDER = &g_pConfigManager->getConfigValuePtr("general:resize_on_borders")->intValue;
|
||||||
static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
|
static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
|
||||||
static auto* const PBORDERGRABEXTEND = &g_pConfigManager->getConfigValuePtr("general:extend_border_grab_area")->intValue;
|
static auto* const PBORDERGRABEXTEND = &g_pConfigManager->getConfigValuePtr("general:extend_border_grab_area")->intValue;
|
||||||
|
static auto* const PRESIZECURSORICON = &g_pConfigManager->getConfigValuePtr("general:hover_icon_on_border")->intValue;
|
||||||
const auto BORDER_GRAB_AREA = *PRESIZEONBORDER ? *PBORDERSIZE + *PBORDERGRABEXTEND : 0;
|
const auto BORDER_GRAB_AREA = *PRESIZEONBORDER ? *PBORDERSIZE + *PBORDERGRABEXTEND : 0;
|
||||||
|
|
||||||
m_pFoundSurfaceToFocus = nullptr;
|
m_pFoundSurfaceToFocus = nullptr;
|
||||||
|
@ -308,8 +309,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
g_pCompositor->focusWindow(pFoundWindow, foundSurface);
|
g_pCompositor->focusWindow(pFoundWindow, foundSurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
// change cursor icon if hovering over border
|
// change cursor icon if hovering over border, skip if mouse bind (resize or move operations) is active
|
||||||
if (*PRESIZEONBORDER && !pFoundWindow->m_bIsFullscreen && !g_pKeybindManager->m_bIsMouseBindActive) {
|
if (*PRESIZEONBORDER && *PRESIZECURSORICON && !pFoundWindow->m_bIsFullscreen && !g_pKeybindManager->m_bIsMouseBindActive) {
|
||||||
setCursorIconOnBorder(pFoundWindow);
|
setCursorIconOnBorder(pFoundWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue