mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 12:45:59 +01:00
add misc:mouse_move_focuses_monitor
This commit is contained in:
parent
4ea4efb871
commit
68f56130ba
2 changed files with 17 additions and 15 deletions
|
@ -49,19 +49,20 @@ void CConfigManager::setDefaultVars() {
|
||||||
|
|
||||||
configValues["general:layout"].strValue = "dwindle";
|
configValues["general:layout"].strValue = "dwindle";
|
||||||
|
|
||||||
configValues["misc:disable_hyprland_logo"].intValue = 0;
|
configValues["misc:disable_hyprland_logo"].intValue = 0;
|
||||||
configValues["misc:disable_splash_rendering"].intValue = 0;
|
configValues["misc:disable_splash_rendering"].intValue = 0;
|
||||||
configValues["misc:no_vfr"].intValue = 1;
|
configValues["misc:no_vfr"].intValue = 1;
|
||||||
configValues["misc:mouse_move_enables_dpms"].intValue = 0;
|
configValues["misc:mouse_move_enables_dpms"].intValue = 0;
|
||||||
configValues["misc:always_follow_on_dnd"].intValue = 1;
|
configValues["misc:always_follow_on_dnd"].intValue = 1;
|
||||||
configValues["misc:layers_hog_keyboard_focus"].intValue = 1;
|
configValues["misc:layers_hog_keyboard_focus"].intValue = 1;
|
||||||
configValues["misc:animate_manual_resizes"].intValue = 0;
|
configValues["misc:animate_manual_resizes"].intValue = 0;
|
||||||
configValues["misc:disable_autoreload"].intValue = 0;
|
configValues["misc:disable_autoreload"].intValue = 0;
|
||||||
configValues["misc:enable_swallow"].intValue = 0;
|
configValues["misc:enable_swallow"].intValue = 0;
|
||||||
configValues["misc:swallow_regex"].strValue = STRVAL_EMPTY;
|
configValues["misc:swallow_regex"].strValue = STRVAL_EMPTY;
|
||||||
configValues["misc:focus_on_activate"].intValue = 0;
|
configValues["misc:focus_on_activate"].intValue = 0;
|
||||||
configValues["misc:no_direct_scanout"].intValue = 0;
|
configValues["misc:no_direct_scanout"].intValue = 0;
|
||||||
configValues["misc:hide_cursor_on_touch"].intValue = 1;
|
configValues["misc:hide_cursor_on_touch"].intValue = 1;
|
||||||
|
configValues["misc:mouse_move_focuses_monitor"].intValue = 1;
|
||||||
|
|
||||||
configValues["debug:int"].intValue = 0;
|
configValues["debug:int"].intValue = 0;
|
||||||
configValues["debug:log_damage"].intValue = 0;
|
configValues["debug:log_damage"].intValue = 0;
|
||||||
|
|
|
@ -50,6 +50,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
static auto* const PFOLLOWONDND = &g_pConfigManager->getConfigValuePtr("misc:always_follow_on_dnd")->intValue;
|
static auto* const PFOLLOWONDND = &g_pConfigManager->getConfigValuePtr("misc:always_follow_on_dnd")->intValue;
|
||||||
static auto* const PHOGFOCUS = &g_pConfigManager->getConfigValuePtr("misc:layers_hog_keyboard_focus")->intValue;
|
static auto* const PHOGFOCUS = &g_pConfigManager->getConfigValuePtr("misc:layers_hog_keyboard_focus")->intValue;
|
||||||
static auto* const PFLOATBEHAVIOR = &g_pConfigManager->getConfigValuePtr("input:float_switch_override_focus")->intValue;
|
static auto* const PFLOATBEHAVIOR = &g_pConfigManager->getConfigValuePtr("input:float_switch_override_focus")->intValue;
|
||||||
|
static auto* const PMOUSEFOCUSMON = &g_pConfigManager->getConfigValuePtr("misc:mouse_move_focuses_monitor")->intValue;
|
||||||
|
|
||||||
m_pFoundSurfaceToFocus = nullptr;
|
m_pFoundSurfaceToFocus = nullptr;
|
||||||
m_pFoundLSToFocus = nullptr;
|
m_pFoundLSToFocus = nullptr;
|
||||||
|
@ -140,7 +141,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->onMouseMove(getMouseCoordsInternal());
|
g_pLayoutManager->getCurrentLayout()->onMouseMove(getMouseCoordsInternal());
|
||||||
|
|
||||||
if (PMONITOR && PMONITOR != g_pCompositor->m_pLastMonitor) {
|
if (PMONITOR && PMONITOR != g_pCompositor->m_pLastMonitor && *PMOUSEFOCUSMON) {
|
||||||
g_pCompositor->setActiveMonitor(PMONITOR);
|
g_pCompositor->setActiveMonitor(PMONITOR);
|
||||||
|
|
||||||
// set active workspace and deactivate all other in wlr
|
// set active workspace and deactivate all other in wlr
|
||||||
|
|
Loading…
Reference in a new issue