Commit graph

326 commits

Author SHA1 Message Date
thejch
f10996b575
master: fix moving window between monitors (#3721) 2023-11-02 17:20:32 +00:00
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
MightyPlaza
d537815d43
groups: create group and groupbar config sections (#3522)
* config: create group section

modified:   src/Compositor.cpp
modified:   src/config/ConfigManager.cpp
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/CHyprGroupBarDecoration.cpp

* separate group border and groupbar colors

modified:   src/Compositor.cpp
modified:   src/config/ConfigManager.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* add new line
modified:   config/ConfigManager.cpp
2023-10-10 17:42:45 +01:00
Michał Lewandowski
7f8e0a1318
dwindle: Avoid rounding errors in window position (#3524)
* Avoid rounding errors in window position

* Fix naming scheme

* Fix unwanted window movement
2023-10-09 12:28:58 +01:00
Jeremy Huang
61d3d4dee7
master: fix drop_at_cursor on workspace 2 (#3512) 2023-10-06 22:33:11 +01:00
Jeremy Huang
d61e4f9ad7
master: add option to drag and drop windows at cursor position (#3465)
* add option to drag and drop a window at cursor position

* use getWindowIdealBoundingBoxIgnoreReserved
2023-10-03 22:16:57 +01:00
vaxerski
1f4eab176e layout: don't discard fullscreen on new tiling 2023-09-28 17:49:40 +01:00
vaxerski
3b657257ec layout: check for specialworkspace in floating toggle 2023-09-24 23:20:15 +01:00
memchr
1357b66091
windowrules: add rule group to map windows grouped (#3279)
* windows: add rule group to map windows grouped

* group rule: use `invade` to force open a window in a locked group
2023-09-22 00:42:00 +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
Jeremy Huang
cc630c90b5
master: partially revert 0e64dd2e and fix the animation (#3327) 2023-09-15 22:13:23 +01:00
Jeremy Huang
d3cbec2d1a
master: Add mfact dispatcher (#3298)
* add mfact dispatcher

* limit mfact to between 0.05 and 0.95

* add try catch block for stof

* change log to err
2023-09-15 12:03:05 +01:00
vaxerski
2536630049 dwindle: fix moving windows on special 2023-09-14 15:37:45 +01:00
memchr
e6651334f2
refactor: flatten nesting ifs in layout window creation method (#3294) 2023-09-14 12:27:16 +01:00
Jeremy Huang
0e64dd2ea5
master: respect the resizing animation option in master layout (#3300) 2023-09-14 12:14:10 +01:00
memchr
0dc8289b02
dwindle: fix: don't merge groups when moving window (#3302) 2023-09-14 11:56:29 +01:00
Jeremy Huang
2ad429dfe0
master: Fix the wrong resize speed in master layout center orientation (#3289)
* rebase

* change isStackVertical variable to make it more readable

* fix some code getting unnecessarily repeating in a loop
2023-09-13 11:48:19 +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
Jeremy Huang
19bbdeed47
master: Add smart resizing option for master layout (#3210)
* add smart resizing for master layout

* fix smart resizing workspace check

* master layout fix smart resize when at max size

* change resizing for center orientation so it doesnt use all nodes

* master layout resizing, simplify code for calculating total height and weight

* remove the redundant smart resizing check
2023-09-10 22:58:06 +01:00
memchr
a781c152ff
fix(layout): remove focusWindow calls from onWindowCreatedTiling (#3233) 2023-09-10 12:55:18 +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
shadowmax31
b4c832a1f2
master: Add orientationcycle command on MasterLayout (#3128) 2023-09-04 16:45:58 +02:00
vaxerski
9f3a64481e dwindle: add proper movement for window move binds
ditches the "movewindow = swapwindow" mechanism. Fixes #2804
2023-09-04 15:34:13 +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
Jeremy Huang
90c03e5bd2
master: layout resize makes the wrong size changes (#3064) 2023-08-24 11:57:30 +02:00
MightyPlaza
41d9b6f0d7
dwindle: use smart on display borders (#2897) 2023-08-21 20:57:55 +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
kbtz
2b4537606f
master: fix always_center_master (#2961)
* master: fix always_center_master

* master: allow resizing single centered window

---------

Co-authored-by: kbtz <github@kbtz.dev>
2023-08-15 18:13:45 +02:00
MightyPlaza
4b568ae5f6
remove shadow no_gaps_when_only master (#2958)
* remove shadow no_gaps_when_only
	modified:   src/Window.hpp
	modified:   src/config/ConfigManager.cpp
	modified:   src/config/ConfigManager.hpp
	modified:   src/layout/DwindleLayout.cpp
	modified:   src/render/decorations/CHyprDropShadowDecoration.cpp

* add master
	modified:   src/layout/MasterLayout.cpp

* fix wrong
	modified:   src/layout/MasterLayout.cpp
2023-08-13 10:18:48 +02:00
MightyPlaza
739598717b
remove shadow no_gaps_when_only (#2956)
modified:   src/Window.hpp
	modified:   src/config/ConfigManager.cpp
	modified:   src/config/ConfigManager.hpp
	modified:   src/layout/DwindleLayout.cpp
	modified:   src/render/decorations/CHyprDropShadowDecoration.cpp
2023-08-12 23:37:55 +02:00
e4e8ae8f88 dwindle: disallow togglesplit on fullscreen 2023-08-10 22:01:34 +02:00
MightyPlaza
6295cbe9cb
keybinds: Keep aspect ratio (#2907) 2023-08-08 18:52:20 +02:00
261c3307f7 internal: cleanup headers in helpers/ 2023-08-07 13:36:14 +02:00