Commit graph

200 commits

Author SHA1 Message Date
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
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
vaxerski
1f4eab176e layout: don't discard fullscreen on new tiling 2023-09-28 17:49:40 +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
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
memchr
0dc8289b02
dwindle: fix: don't merge groups when moving window (#3302) 2023-09-14 11:56:29 +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
memchr
a781c152ff
fix(layout): remove focusWindow calls from onWindowCreatedTiling (#3233) 2023-09-10 12:55:18 +01:00
Vaxry
61a71c65ac
internal: Formatter rework (#3186) 2023-09-06 12:51:36 +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
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
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
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
6db3c4ef5e
layout: no_border_when_only-improvements (#2791) 2023-07-24 12:13:40 +02:00
end-4
9845f99b60
add config option to enable/disable new intuitive resizing (#2774)
dwindle:smart_resizing = 1 by default
== 1 then use new resizing
else use old resizing
2023-07-23 15:50:09 +02:00
MightyPlaza
d3bba2489d
render: Border fixes (#2781)
* Window.cpp

* layout

* CHyprGroupBarDecoration.cpp
2023-07-23 15:49:49 +02:00
vaxerski
2c7b2ad6ca windowrules: add border size rule 2023-07-18 00:11:29 +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
Daniel Adolfsson
64e7d5345d
Add support for smart splitting (#2676)
* Add support for smart splitting

* clang-format

* smart_split default to 0, and make smart_split behave like preserve_split
2023-07-11 13:37:25 +02:00
MightyPlaza
05047f60f4
groupbar fixes (#2630)
Fixes multiple groupbar decoration issues:

  -  togglegroup removes fullscreen to avoid to avoid weird state
 -   fixes issue where a group had multiple windows with head = true
 -   fixes issue where merging 2 groups would cause a window to have 2 groupbar decorations
  -  fixes issue where merging a group with more than 1 window into another group would make windows have no groupbar decoration
  -  fixes issue where ungrouping windows could just move them into another group on the same workspace


---------

Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
2023-07-03 12:49:56 +02:00
memchr
bca3068db2
feat: add lockactivegroup dispatcher (#2478)
* feat: add lockactivegroup dispatcher

The `lockactivewindow` dispatcher takes `lock`, `toggle` or `unlock` as arguments. When a group is locked, no window or group can be added to it, nor can it be added to another group, but the `moveintogroup` and `moveoutofgroup` dispatches are not affected.

Implementation details:

the lock is implement via `SGroupData.locked` flag (defaults to false).

The flag is only relevant to the group head, and upon the group head's succession, the flag will be passed down to the new head. Meanwhile, the old head's flag will be set to false.

The flag is set to false when a group is dismissed.

New condition checks have been added to the dwindle and master layout to check if target group is unlocked (and if the source is also a group and unlocked) before adding windows to the target group.

* refactor: `lockactivegroup dispatcher code ordering
2023-06-09 23:44:18 +02:00
2629cfeeab layouts: make aware of borderSize prop 2023-06-04 21:35:23 +02:00
vaxerski
a4c120d608 layouts: ignore direction forces on non-map 2023-05-24 19:23:10 +02:00
vaxerski
eb1f832fce decos: recalc on add 2023-05-23 14:26:38 +02:00
Dashie
a8541d5f64
Add split preselection (#2240) 2023-05-06 01:02:18 +01:00
jacekpoz
a663823af2
only ignore no_gaps_when_only when the workspace rule specifies a border (#2217)
Co-authored-by: jacekpoz <jacekpoz@cock.li>
2023-05-03 14:48:46 +01:00
levnikmyskin
c949173bc9
Added some workspace-specific rules (#1986)
* added some workspace-specific rules

* added some worskpace-specific rules, with windowrule like syntax

* monitor is not mandatory anymore

* pointers to config are now static

* fixed optional WorkspaceRule fields

* Windows can now specify border size

* removed CHyprOpenGLImpl::renderBorder borderSize default value

* stuff

---------

Co-authored-by: Alessio Molinari <alessiomolinari@gmail.com>
Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
2023-05-01 22:28:27 +01:00
outfoxxed
849d657595
Window resizing for pseudotiled windows (#2140)
* Window resizing for pseudotiled windows

* Use `m_vRealSize` to determine scaled window size
2023-04-25 16:53:18 +01:00
vaxerski
1f80154823 layouts: add missing static modifiers to config vars 2023-04-25 16:49:06 +01:00
vaxerski
8b3d8dc792 Format: use %lx for all addresses 2023-04-17 17:35:28 +01:00
lisuke
dc78c58c77
fix: a fullscreen bug. (#1821) (#1831) 2023-03-20 16:07:18 +00:00
a85a6fa6c8 Dwindle: Added default_split_ratio 2023-03-07 14:24:10 +00:00
vaxerski
72fc309fb1 make window reserved area less stupid 2023-02-28 21:18:13 +00:00
a66ef50469 added a lockgroups dispatcher 2023-02-21 12:13:41 +00:00
Vaxry
e5a4c0c986
Group/Tab Rework (#1580) 2023-02-19 21:07:32 +00:00
Vaxry
1b56cc4e99
Added an Event Hook System (#1578)
* added an eventHookSystem

* Add all socket2 events to hooks
2023-02-19 20:54:53 +00:00
eaf0fb14c9 reset layout-set render vars on floating 2023-01-31 12:15:40 +00:00
7f595ed0ca support gradients in dwindle group colors 2022-12-31 16:23:56 +01:00
Julian Schuler
2daabfa0e9
Add 'exact' option for 'splitratio' (#1245)
* Simplify getPlusMinusKeywordResult()

* Add an 'exact' option for 'splitratio'
2022-12-17 22:37:44 +00:00
vaxerski
2076905d6e remember size and pos on fullscreen 1 2022-12-17 12:14:43 +00:00
Vaxry
98a4fa2b0d
Added clang format (#1239)
* clang-format stuff and format files
2022-12-16 17:17:31 +00:00
vaxerski
20899b597e log more in group creation 2022-12-16 00:22:23 +00:00