220144276b
layout: unfullscreen on toggle into tiled fullscreen
...
fixes a bug where the tiled window would be on top
2024-03-10 22:31:49 +00:00
Epilepsy Gatherings
e52d3fa852
windowrules: Make min/maxsize rules dynamic ( #4775 )
...
* rebase
* simplify and remove prop
* Stuff
- add back win prop
- change minsize defaults
- change request formatting for setprop
* style fix
* remove empty line
* change defaults
* redo string to vec
* remove redundant parsing
* change to vec
* support commas
* remove static rules
* take out garbage
* format
* don't allow commas and resize on setprop
* use isNumber
2024-03-08 02:24:44 +00:00
bvr-yr
fb87e332c5
input: fix window move stutter by introducing additional checks for low-hz monitors ( #4553 )
...
* resize-limiter: add additional check for low-hz monitors
* simplify checker
* add comment
* rename variable
2024-03-06 00:15:44 +00:00
Junxuan Liao
f8a081b56d
layout: warp the cursor when focusing windows ( #4982 )
...
Similar to the `focuswindow` dispatcher, when focusing a window with
wlr-foreign-toplevel-management, the cursor should be warped. Otherwise, the
focus is lost immediately after the cursor moves.
2024-03-05 17:56:06 +00:00
063708df26
config: improve config value infrastructure
2024-03-03 18:41:38 +00:00
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
f4f3aa2e50
layout: add size prediction for initial xdg commits
...
fixes #4022
2024-02-28 11:45:43 +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
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
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
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
4de986072c
layout: Focus a floating window after closing the last tiled ( #4137 )
2023-12-12 16:44:31 +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
8dd02eb5f3
xdg-shell: update reported size on ack_configure
2023-11-09 22:43:52 +00:00
a0fcda301d
layout: round box in mouseMove
...
fixes #3792
2023-11-07 20:47:09 +00:00
a1b7a5a53d
layout: fix various rounding errors
...
maybe finally will end #3761
2023-11-06 17:00:37 +00:00
9404972732
events: set reported size on floating map
...
fixes #3767
2023-11-05 14:12:55 +00:00
Vaxry
55b4f84fea
Internal: Hyprland box implementation ( #3755 )
...
* box impl
* remove unused operators
* missed applyfromwlr
2023-11-04 17:03:05 +00:00
MightyPlaza
9abfa9efc6
input: handle mouse on decorations ( #3560 )
2023-10-29 20:14:47 +00:00
vaxerski
3b657257ec
layout: check for specialworkspace in floating toggle
2023-09-24 23:20:15 +01:00
alaricljs
e4ddfcfa0c
keybinds: implement pushactivetobottom dispacher ( #3217 )
...
Co-authored-by: Leeman <lstrout@enlj.com>
2023-09-21 22:18:26 +01:00
memchr
3785defaf1
logging: implement std::formatter for some types ( #3380 )
2023-09-20 16:25:03 +01:00
memchr
6594b50e57
logging/format: use std::format_string to catch formatting string errors at compile time ( #3377 )
...
* fix(log): use constexpr format string
* deprecate getFormat
2023-09-20 08:26:20 +01:00
memchr
6b1ac659e0
layout: add direction parameter to onWindowCreated and friends ( #3269 )
...
* feat(layout): add direction parameter to onWindowCreated and friends
In addition:
- Implement directional moveWindowOutOfGroup for `movewindoworgroup`
when using dwindle layout. (augmentation of #3006 )
- Replace `DWindleLayout::OneTimeFocus` with `IHyprLayout::eDirection`.
- Slight formatting change (clang-format).
* fix: nullptr dereference in dwindle window creation
* refactor: generalized eDirection
* refactor: eliminate DIRECTION_NONE
* Update IHyprLayout.hpp
2023-09-13 11:13:29 +01:00
outfoxxed
b0d5e4008b
layout: Allow the layout to control how windows are raised in groups ( #3275 )
...
* Allow the layout to control how windows are raised in groups
Previously windows could only be focused if they weren't hidden or
were part of a group. This shifts the logic for picking the window out
of a group to the layout allowing for alternate group implementations
to function normally.
* Fix doc comment consistency
* Fix tabs in comments
2023-09-12 22:37:08 +01:00
memchr
e96e0dc02d
refactor: utilize 'middle()' method for window/montior center ( #3253 )
2023-09-11 10:09:34 +01:00
Philip Damianik
8c83852704
internal: Remove all .c_str()
calls when using std::vformat
( #3198 )
...
Signed-off-by: pdamianik <39028343+pdamianik@users.noreply.github.com>
2023-09-06 21:45:37 +02:00
Vaxry
61a71c65ac
internal: Formatter rework ( #3186 )
2023-09-06 12:51:36 +02:00
memchr
69439871e6
refactor: replace manual iteration of CWindow with existing methods ( #3147 )
2023-09-04 15:13:39 +02:00
vaxerski
c6c820d16d
layout: always center floating xdg windows
2023-09-03 13:07:40 +02:00
memchr
69ce11a063
fix: use-after-free of CWindow* in CHyprGroupBarDecoration::draw ( #3146 )
2023-09-02 19:58:01 +02:00
MightyPlaza
b10cae3010
decos: groupbar mouse interaction ( #3102 )
...
* allow groupbar clicking
modified: src/Window.cpp
modified: src/Window.hpp
modified: src/managers/input/InputManager.cpp
modified: src/render/decorations/CHyprGroupBarDecoration.cpp
modified: src/render/decorations/CHyprGroupBarDecoration.hpp
* remove setting pos inside insertWindowToGroup()
modified: src/Window.cpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/MasterLayout.cpp
modified: src/managers/KeybindManager.cpp
* add group window by index and group size functions
modified: src/Window.cpp
modified: src/Window.hpp
modified: src/managers/input/InputManager.cpp
* allow dragging into groupbar
modified: src/Window.cpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/MasterLayout.cpp
* allow dragging from groupbar
modified: src/managers/KeybindManager.cpp
* try groupbar clicking before border resize
modified: src/managers/input/InputManager.cpp
* block grabbing groupbar on floating (crash)
remove later when crashing is fixed
modified: src/managers/KeybindManager.cpp
* remove redundant { }
modified: src/layout/DwindleLayout.cpp
modified: src/layout/MasterLayout.cpp
* implement getWindowDecorationBox()
modified: src/Window.cpp
modified: src/Window.hpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/MasterLayout.cpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/input/InputManager.cpp
modified: src/render/decorations/CHyprDropShadowDecoration.cpp
modified: src/render/decorations/CHyprGroupBarDecoration.cpp
modified: src/render/decorations/IHyprWindowDecoration.cpp
modified: src/render/decorations/IHyprWindowDecoration.hpp
* fix crash when moveoutofgroup in floating windows
also removes dragging from floating windows limitation
modified: src/layout/IHyprLayout.cpp
modified: src/managers/KeybindManager.cpp
* use CRegion in getWindowDecorationBox()
modified: src/helpers/Region.cpp
modified: src/helpers/Region.hpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/MasterLayout.cpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/input/InputManager.cpp
modified: src/render/decorations/IHyprWindowDecoration.cpp
modified: src/render/decorations/IHyprWindowDecoration.hpp
* add groupbar scrolling
modified: src/config/ConfigManager.cpp
modified: src/managers/input/InputManager.cpp
* change name to getWindowDecorationRegion()
modified: src/layout/DwindleLayout.cpp
modified: src/layout/MasterLayout.cpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/input/InputManager.cpp
modified: src/render/decorations/IHyprWindowDecoration.cpp
modified: src/render/decorations/IHyprWindowDecoration.hpp
* make dragging from group less hacky for floating
modified: src/managers/KeybindManager.cpp
2023-08-30 17:39:22 +02:00
vaxerski
981386d2ae
layout: allow changing float status of fullscreen windows
2023-08-28 22:55:52 +02:00
vaxerski
b8f38dcbd3
layout: allow drag on fullscreen windows
2023-08-28 22:54:23 +02:00
vaxerski
9dae8ece71
layout: use full box for visibility check of floating xdg
...
Fixes #3069 , if an xdg dialog pops up and is partially off bounds, just move it to the center.
2023-08-25 18:10:12 +02:00
MightyPlaza
7155b4c266
renderer: Border improvements ( #2986 )
...
* simplify getting border size
modified: src/Window.cpp
modified: src/Window.hpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/MasterLayout.cpp
modified: src/render/decorations/CHyprGroupBarDecoration.cpp
* fix border damage and input box
modified: src/Window.cpp
modified: src/managers/AnimationManager.cpp
* add border size in resize_on_border box
modified: src/managers/input/InputManager.cpp
* simplify border (fixes possible typo)
modified: src/Window.cpp
* use updateSpecialRenderData()
modified: Window.cpp
modified: Window.hpp
modified: events/Windows.cpp
modified: layout/DwindleLayout.cpp
modified: layout/IHyprLayout.cpp
modified: layout/MasterLayout.cpp
modified: render/Renderer.cpp
* update window workspace rule data on reload
modified: src/config/ConfigManager.cpp
* use rounding()
modified: src/Window.cpp
2023-08-17 10:13:19 +02:00
Dashie
19c4855afc
layout: Use refreshrate tick on all manual animations ( #2988 )
2023-08-16 10:56:48 +02:00
4986d74ef2
xwayland: fix use of xwayland coords in native spaces
2023-08-15 20:10:43 +02:00
MightyPlaza
6295cbe9cb
keybinds: Keep aspect ratio ( #2907 )
2023-08-08 18:52:20 +02:00
MightyPlaza
b925f1b497
fix workspace change focus ( #2891 )
2023-08-05 20:53:13 +02:00
vaxerski
61dc0909ae
layout: use warp() instead of setValue()
2023-07-20 20:03:27 +02:00
outfoxxed
5cd5631fb2
Add bringWindowToTop function to IHyprLayout ( #2747 )
...
* Add bringWindowToTop function to IHyprLayout
* Rename `bringWindowToTop` to `requestFocusForWindow`
* Fix doc
2023-07-19 12:39:45 +02:00
MightyPlaza
b159634ef9
move/resize window ( #2706 )
2023-07-13 20:20:40 +02:00
Daniel Adolfsson
d3a644d81c
Dwindle: Make resize more intuitive ( #2681 )
...
* improved resize
* clang-format
* rewrite
* almost legacy behavior when using CORNER_NONE
2023-07-13 16:52:11 +02:00
vaxerski
6f91997f06
layout: improve time restraints in window drag
2023-07-04 11:49:24 +02:00