mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-18 12:03:00 +01:00
feat: add config option general:resize_on_gaps
This commit is contained in:
parent
d03c7eebc4
commit
e1d0495cff
2 changed files with 3 additions and 1 deletions
|
@ -46,6 +46,7 @@ void CConfigManager::setDefaultVars() {
|
|||
((CGradientValueData*)configValues["general:col.inactive_border"].data.get())->reset(0xff444444);
|
||||
configValues["general:cursor_inactive_timeout"].intValue = 0;
|
||||
configValues["general:no_cursor_warps"].intValue = 0;
|
||||
configValues["general:resize_on_gaps"].intValue = 0;
|
||||
|
||||
configValues["general:layout"].strValue = "dwindle";
|
||||
|
||||
|
|
|
@ -387,12 +387,13 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) {
|
|||
static auto* const PPASSMOUSE = &g_pConfigManager->getConfigValuePtr("binds:pass_mouse_when_bound")->intValue;
|
||||
const auto PASS = g_pKeybindManager->onMouseEvent(e);
|
||||
static auto* const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue;
|
||||
static auto* const PGAPRESIZE = &g_pConfigManager->getConfigValuePtr("general:resize_on_gaps")->intValue;
|
||||
|
||||
if (!PASS && !*PPASSMOUSE)
|
||||
return;
|
||||
|
||||
// TODO is there a more direct way to check if a window is tiled?
|
||||
if (TEMP_CONFIG_RESIZE_ON_BORDER && g_pCompositor->m_pLastWindow && !g_pCompositor->m_pLastWindow->m_bIsFullscreen && !g_pCompositor->m_pLastWindow->m_bIsFloating) {
|
||||
if (*PGAPRESIZE && g_pCompositor->m_pLastWindow && !g_pCompositor->m_pLastWindow->m_bIsFullscreen && !g_pCompositor->m_pLastWindow->m_bIsFloating) {
|
||||
const auto w = g_pCompositor->vectorToWindowIdeal(getMouseCoordsInternal());
|
||||
const wlr_box box = w->getFullWindowBoundingBox();
|
||||
const wlr_box real = {w->m_vRealPosition.vec().x, w->m_vRealPosition.vec().y, w->m_vRealSize.vec().x, w->m_vRealSize.vec().y};
|
||||
|
|
Loading…
Add table
Reference in a new issue