mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 18:09:50 +01:00
Access config value statically
This commit is contained in:
parent
95a626f72e
commit
46d11f7646
1 changed files with 3 additions and 3 deletions
|
@ -167,14 +167,14 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
|||
Vector2D surfaceLocal = surfacePos == Vector2D(-1337, -1337) ? surfaceCoords : mouseCoords - surfacePos;
|
||||
|
||||
if (pFoundWindow) {
|
||||
const int FOLLOWMOUSE = g_pConfigManager->getInt("input:follow_mouse");
|
||||
if (FOLLOWMOUSE != 1 && !refocus) {
|
||||
static auto *const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue;
|
||||
if (*PFOLLOWMOUSE != 1 && !refocus) {
|
||||
if (pFoundWindow != g_pCompositor->m_pLastWindow && g_pCompositor->windowValidMapped(g_pCompositor->m_pLastWindow) && (g_pCompositor->m_pLastWindow->m_bIsFloating != pFoundWindow->m_bIsFloating)) {
|
||||
// enter if change floating style
|
||||
g_pCompositor->focusWindow(pFoundWindow, foundSurface);
|
||||
wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, foundSurface, surfaceLocal.x, surfaceLocal.y);
|
||||
}
|
||||
else if (FOLLOWMOUSE == 2) {
|
||||
else if (*PFOLLOWMOUSE == 2) {
|
||||
wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, foundSurface, surfaceLocal.x, surfaceLocal.y);
|
||||
}
|
||||
wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, time, surfaceLocal.x, surfaceLocal.y);
|
||||
|
|
Loading…
Reference in a new issue