mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-01-04 06:46:27 +03:00
parent
2b07d54bc7
commit
74cf2281dd
@ -1504,7 +1504,13 @@ CWindow* CCompositor::getWindowInDirection(CWindow* pWindow, char dir) {
|
|||||||
// 0 -> history, 1 -> shared length
|
// 0 -> history, 1 -> shared length
|
||||||
static auto* const PMETHOD = &g_pConfigManager->getConfigValuePtr("binds:focus_preferred_method")->intValue;
|
static auto* const PMETHOD = &g_pConfigManager->getConfigValuePtr("binds:focus_preferred_method")->intValue;
|
||||||
|
|
||||||
const auto WINDOWIDEALBB = pWindow->getWindowIdealBoundingBoxIgnoreReserved();
|
const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
|
||||||
|
|
||||||
|
if (!PMONITOR)
|
||||||
|
return nullptr; // ??
|
||||||
|
|
||||||
|
const auto WINDOWIDEALBB = pWindow->m_bIsFullscreen ? wlr_box{(int)PMONITOR->vecPosition.x, (int)PMONITOR->vecPosition.y, (int)PMONITOR->vecSize.x, (int)PMONITOR->vecSize.y} :
|
||||||
|
pWindow->getWindowIdealBoundingBoxIgnoreReserved();
|
||||||
|
|
||||||
const auto POSA = Vector2D(WINDOWIDEALBB.x, WINDOWIDEALBB.y);
|
const auto POSA = Vector2D(WINDOWIDEALBB.x, WINDOWIDEALBB.y);
|
||||||
const auto SIZEA = Vector2D(WINDOWIDEALBB.width, WINDOWIDEALBB.height);
|
const auto SIZEA = Vector2D(WINDOWIDEALBB.width, WINDOWIDEALBB.height);
|
||||||
|
@ -250,6 +250,7 @@ void CConfigManager::setDefaultVars() {
|
|||||||
configValues["binds:workspace_center_on"].intValue = 1;
|
configValues["binds:workspace_center_on"].intValue = 1;
|
||||||
configValues["binds:focus_preferred_method"].intValue = 0;
|
configValues["binds:focus_preferred_method"].intValue = 0;
|
||||||
configValues["binds:ignore_group_lock"].intValue = 0;
|
configValues["binds:ignore_group_lock"].intValue = 0;
|
||||||
|
configValues["binds:movefocus_cycles_fullscreen"].intValue = 1;
|
||||||
|
|
||||||
configValues["gestures:workspace_swipe"].intValue = 0;
|
configValues["gestures:workspace_swipe"].intValue = 0;
|
||||||
configValues["gestures:workspace_swipe_fingers"].intValue = 3;
|
configValues["gestures:workspace_swipe_fingers"].intValue = 3;
|
||||||
|
@ -1004,6 +1004,7 @@ void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::moveFocusTo(std::string args) {
|
void CKeybindManager::moveFocusTo(std::string args) {
|
||||||
|
static auto* const PFULLCYCLE = &g_pConfigManager->getConfigValuePtr("binds:movefocus_cycles_fullscreen")->intValue;
|
||||||
char arg = args[0];
|
char arg = args[0];
|
||||||
|
|
||||||
if (!isDirection(args)) {
|
if (!isDirection(args)) {
|
||||||
@ -1020,7 +1021,7 @@ void CKeybindManager::moveFocusTo(std::string args) {
|
|||||||
// remove constraints
|
// remove constraints
|
||||||
g_pInputManager->unconstrainMouse();
|
g_pInputManager->unconstrainMouse();
|
||||||
|
|
||||||
const auto PWINDOWTOCHANGETO = PLASTWINDOW->m_bIsFullscreen ?
|
const auto PWINDOWTOCHANGETO = *PFULLCYCLE && PLASTWINDOW->m_bIsFullscreen ?
|
||||||
(arg == 'd' || arg == 'b' || arg == 'r' ? g_pCompositor->getNextWindowOnWorkspace(PLASTWINDOW, true) : g_pCompositor->getPrevWindowOnWorkspace(PLASTWINDOW, true)) :
|
(arg == 'd' || arg == 'b' || arg == 'r' ? g_pCompositor->getNextWindowOnWorkspace(PLASTWINDOW, true) : g_pCompositor->getPrevWindowOnWorkspace(PLASTWINDOW, true)) :
|
||||||
g_pCompositor->getWindowInDirection(PLASTWINDOW, arg);
|
g_pCompositor->getWindowInDirection(PLASTWINDOW, arg);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user