Commit Graph

370 Commits

Author SHA1 Message Date
Vaxry 063708df26 config: improve config value infrastructure 2024-03-03 18:41:38 +00:00
thejch 28272d2d74
master: Fix animate resize (#4942)
* fix master animate resize

* fix some other pointers
2024-03-03 17:03:23 +00:00
Vaxry d2289d8327 xdg: minor improvements to initial size reporting
fixes #4918
2024-03-02 18:53:17 +00:00
Vaxry 8811f4b69a drag: check min size for reisze drags
fixes #4920
2024-03-02 15:25:32 +00:00
GartoxFR b2c3440477
animations: Refactor AnimatedVariable (#4911)
* animation: Refactor AnimatedVariable

This commit decomposes the AnimatedVariable class into a base class
with the common attribute to all variable types and a templated derived
type containing strongly typed info on the type being animated.

Access to the typed version is perfomed using the visitor pattern. A
utility is provided to build a visitor on the fly using lambdas.

Adding a new type to be animated should just be a matter of adding the
typed in the list defined by the ANIMABLE_TYPES macro

The size of the commit is justified by the API change in the
AnimatedVariable class. No more vec(), fl() or col() method but a unified
value() method.

* animation: Remove visitor pattern

* animation: Fix coding style

* animation: Fix coding style
2024-03-02 00:35:17 +00:00
Vaxry f4f3aa2e50 layout: add size prediction for initial xdg commits
fixes #4022
2024-02-28 11:45:43 +00:00
Dashie ddf022d61c
feat: Add css style gaps (#4723) 2024-02-21 11:07:39 +00:00
Vaxry 13f6f0b923
Migrate the config to hyprlang (#4656)
* Migrate to hyprlang

* pop up errors

* fix swapped args

* Meson & Nix: build with hyprlang

* CI: add hyprlang to setup action

* add infra for plugin stuff

* fix hyprctl getoption

* fix hyprctl getoption with json

* format

* fix post parse logic

* fix autogen config

* oops missed exec-once

* fmt

* fix ws rules

* require 0.3.0 for hyprlang

* nix: flaek

* minor type fixes

* fix cfg usages in swipe

* use cvarlist for ws rules

* fix throw in addPluginConfigVar

* Nix: update hyprlang

* minor fixes

* fix disableLogs

* mention hyprlang docs

* bump hyprlang dep in cmake

* Meson: bump min hyprlang version

Nix: update hyprlang

* minor fix

* Nix: update meson patch

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2024-02-18 15:00:34 +00:00
Niklas Haas d5950f7719
dwindle: add swapsplit dispatcher (#4702)
This is distinct from `swapwindow` in that it allows swapping the entire
tree node with its neighbour.

Fixes: https://github.com/hyprwm/Hyprland/issues/4701
2024-02-14 17:58:28 +00:00
Vaxry 0608791480 dwindle: round wbox before setting 2024-02-14 11:44:47 +00:00
Epilepsy Gatherings 2a3429d4cf
internal: add `forcenofocus` prop (#4672)
* add forcenofocus

* change nofocus to overridable var
2024-02-13 18:07:19 +00:00
MightyPlaza cbadf3e3f3
input: focus window on mouse down on decoration (#4514)
Also unifies vectorToWindow funcs
2024-02-04 15:40:20 +00:00
Vaxry 341e04a36c dwindle: avoid sending negative sizes to wlr
fixes #4591
2024-02-02 15:04:04 +00:00
rszyma 12d79d6342
dwindle: fix windows being created at incorrect position when cursor is over reserved area (#4520)
* fix: smart_split not working correctly when creating a window with cursor over reserved area

* use getClosestNodeOnWorkspace instead of getFirstNodeOnWorkspace when hovering over reserved area

* optimize `getClosestNodeOnWorkspace`

* remove unused methods
2024-01-26 22:30:36 +00:00
bvr-yr 08e3519747
layout: save float props before setting fs state (#4537)
fixes #4388
2024-01-26 17:24:00 +00:00
Epilepsy Gatherings 9f20a15955
input: remove animate checks on resize limiter (#4480) 2024-01-19 15:45:51 +01:00
Clyybber 8d31c84483
layout: Round window pos and size on togglefloating (#4407)
Also restore the behaviour introduced in bc4a51dbbb
2024-01-10 18:08:58 +01:00
thejch 880996b053
master: Add more null checks for rollnext (#4343)
* add more null check for rollnext

* remove pwindow check
2024-01-04 16:17:17 +01:00
Vaxry 1512b81126 master: guard PNODE in roll*
fixes #4331
2024-01-02 22:18:38 +01:00
Vaxry 813af393f1 layout: update rules before applying fullscreen nodes in layouts 2024-01-02 14:21:36 +01:00
dranull 5f8e4068e5
groupbar: Middle click on groupbar to close tab (#4297)
* Prevent window swapping when the head is removed

* Bring floating windows to top when selected

* Allow clicks on gropubar in fullscreen 1

* Close window on groupbar with middle click
2023-12-30 00:38:12 +01:00
dranull 8321d6be46
internal: Unify input handling on decorations (#4280)
* Unify input handling on decorations

* Make input methods private

* Optional data
2023-12-28 23:54:41 +01:00
dranull 34b0ce66b3
dwindle: Use window->middle() when cursor is on reserved area (#4253) 2023-12-26 17:24:31 +01:00
thejch 7cec618fe4
master: add dispatchers rollnext and rollprev (#4209) 2023-12-22 12:37:38 +01:00
Vaxry 9fd928e114 internal: nuke CWindow::m_bMappedX11
it's useless. m_bIsMapped is the same.
2023-12-17 20:00:18 +00:00
dranull 4de986072c
layout: Focus a floating window after closing the last tiled (#4137) 2023-12-12 16:44:31 +00:00
Vaxry ea7569d7e0 config: improve layoutopt handling for workspacerules 2023-12-11 22:58:51 +00:00
Vaxry 9f5b9053c6
internal: Remake borders as window decorations (#4104) 2023-12-10 16:28:12 +00:00
François Conzelmann 4a42344e97
style/ci: apply clang-format and verify it in ci (#4039)
* style: apply clang-format

* ci: add new clang-format job to CI
2023-12-06 22:54:56 +00:00
thejch 758cf90ea1
workspacerules: Add workspace rule for master layout orientation (#3964)
* add workspace rule for master layout orientation

* change rule format

* edit rule name

* use map for layoutopts

* use std::any instead of string
2023-12-02 14:42:49 +00:00
MightyPlaza add23a9ba2
group: fix dragging into floating groups (#3719)
* allow dragging into floating groups

modified:   src/Compositor.cpp
modified:   src/Compositor.hpp
modified:   src/layout/IHyprLayout.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* floating-only
modified:   src/layout/IHyprLayout.cpp
2023-11-19 12:29:01 +00:00
Dickby 6ad5f26cfe
layout: Don't update pseudoSize after window moved by mouse. (#3873) 2023-11-18 19:59:12 +00:00
Vaxry 9be6fbf5ea
decorations: Decoration Positioner (#3800) 2023-11-11 14:37:17 +00:00
Vaxry 8dd02eb5f3 xdg-shell: update reported size on ack_configure 2023-11-09 22:43:52 +00:00
Vaxry a0fcda301d layout: round box in mouseMove
fixes #3792
2023-11-07 20:47:09 +00:00
Vaxry a1b7a5a53d layout: fix various rounding errors
maybe finally will end #3761
2023-11-06 17:00:37 +00:00
Vaxry ecf98069f6 layout: round window boxes after special scale factor
fixes #3761 again
2023-11-05 19:57:23 +00:00
Vaxry 9404972732 events: set reported size on floating map
fixes #3767
2023-11-05 14:12:55 +00:00
Vaxry d3e5796ee1 layout: fix missed setWindowSize in no_gaps_when_only node apply
fixes #3758
2023-11-04 23:00:20 +00:00
Vaxry 931927de29 dwindle: move to CBox for expressing nodes 2023-11-04 21:45:34 +00:00
Vaxry 55b4f84fea
Internal: Hyprland box implementation (#3755)
* box impl

* remove unused operators

* missed applyfromwlr
2023-11-04 17:03:05 +00:00
Vaxry 73e78f05ad
Decos: Window decoration flags, shadow improvements (#3739) 2023-11-04 13:10:52 +00:00
thejch ed3d5053b2
Master: fix drop_at_cursor when there are only two windows (#3734)
* make drop_at_cursor work when dragging into a one-window workspace

* fix drop_at_cursor when new_is_master is enabled
2023-11-03 17:02:59 +00:00
Vaxry 0f6e530798 layout: better storage for no fullscreen checks var
fixes #3731
2023-11-03 12:19:23 +00:00
thejch f10996b575
master: fix moving window between monitors (#3721) 2023-11-02 17:20:32 +00:00
Vaxry 7b32b4214d layout: avoid redundant size sets on new fullscreen 2023-11-01 01:28:43 +00:00
MightyPlaza a1924ae435
internal: create canBeGroupedInto() (#3693)
modified:   src/Window.cpp
modified:   src/Window.hpp
modified:   src/layout/DwindleLayout.cpp
modified:   src/layout/MasterLayout.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
2023-10-30 14:54:12 +00:00
MightyPlaza 9abfa9efc6
input: handle mouse on decorations (#3560) 2023-10-29 20:14:47 +00:00
thejch bab2f6a664
master: fix movewindow across monitors (#3628) 2023-10-20 18:01:04 +01:00
thejch 20e7ccd480
master: fix resizing wrong window behind in special workspace (#3591) 2023-10-17 12:06:16 +01:00