Commit graph

124 commits

Author SHA1 Message Date
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
62e3953f5b master: guard monitor in recalc 2023-05-26 13:41:52 +02:00
vaxerski
a4c120d608 layouts: ignore direction forces on non-map 2023-05-24 19:23:10 +02: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
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
Person1873
33d06fb0e5
Add ability to split master when only 1 additional window (#2025)
* fix: enable master split less than 2 windows

added a config flag  "master:allow_small_split"
added config to minimum windows check.
TODO: check that no bug added (remove all masters?)

* IMPL:FIX: multiple master windows full width

Implemented the ability to have multiple master windows filling the full
monitor width in master mode.
this is controlled by the config option master:allow_small_split
(true/false)
this defaults to false as it was the original behaviour before this
patch

* BUGFIX: corrected issue with blanks re: addmaster

FIX 1: Treat ORIENTATION_CENTER the same as ORIENTATION_LEFT unless
there are enough STACK_WINDOWS to fill both wings.
FIX 2: enforced last window always set as master in
MasterLayout::CHyperMasterLayout::calculateWorkspace();
FIX 3: fix 2, also fixed focus issues previously noted.

* Changes requested by vaxerski

changed how we access config variables (by reference not value)
fixed a regression previously missed prior to requested changes.
I had somehow broken the very functionality i meant to add.

* added static keyword to config variables

* removed superfluous static tags

I made a mistake with making too many variables static.
this made them only evaluate once per runtime breaking things majorly.
My appologies. I haven't touched C++ in nearly 20 years.

* remove annoying comment

---------

Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
2023-04-13 15:20:58 +01:00
lisuke
dc78c58c77
fix: a fullscreen bug. (#1821) (#1831) 2023-03-20 16:07:18 +00:00
vaxerski
17deeb07ad master: better cycle 2023-03-13 01:07:05 +00:00
hillyu
4f647a8e8b
fix mfact not applying to addmaster (#1715)
Co-authored-by: Hill <hillyu@live.com>
2023-03-06 09:03:49 +00:00
hillyu
7ce92f93ad
add mfact setting for master layout (#1666)
* add mfact setting for master layout

---------

Co-authored-by: Hill <hillyu@live.com>
2023-03-05 16:29:23 +00:00
vaxerski
7c5c7ced91 Convert reverse iterators to ranges 2023-03-01 14:06:52 +00:00
vaxerski
72fc309fb1 make window reserved area less stupid 2023-02-28 21:18:13 +00:00
Marcus Kellerman
492f36f7df
Added center orientation to master layout (#1642)
* Added center orientation to master layout to improve experience on ultra widescreen monitors.

* Added support for orientationcenter layout message for master layout

* Added ability to optionally always center master window when in centered master mode.
2023-02-26 23:12:14 +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
Philipp Mildenberger
97e0f02621
Fix some issues with a lost focus of the maximized window after using swapwithmaster in fullscreen mode (#1524)
* Fix some issues with a lost focus of the maximized window after using swapwithmaster in fullscreen mode

* Keep current fullscreen mode when `prepareNewFocus` is executed
2023-02-11 13:00:05 +00:00
Philipp Mildenberger
42f4664022
Added support for layoutmsg params and added the param 'newfocus' for 'swapwithmaster' and 'focusmaster' (#1522)
* Added support for layoutmsg params and added the param 'newfocus' for 'swapwithmaster' and 'focusmaster', which lets the user decide what the new focused window should be
2023-02-10 19:13:38 +00:00
eaf0fb14c9 reset layout-set render vars on floating 2023-01-31 12:15:40 +00:00
Maxim Baz
7729fa9ac9
master layout: remember size & pos of floating windows on fullscreen 1 (#1374) 2023-01-13 21:58:14 +01:00
a91d0a374a fix mouse resize on master orientations 2022-12-30 13:01:43 +01:00
Maarten van Gompel
edcf4cd61d
fix for gap in master layout orientation right #1171 (#1260) 2022-12-20 22:24:36 +00:00
vaxerski
563835404f remember master width on master close 2022-12-17 22:53:03 +00: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
Julian Schuler
11ba6afdd3
Fix cycleprev bug introduced in 46891b12cf (#1213) (#1242) 2022-12-17 14:37:10 +00:00
Vaxry
98a4fa2b0d
Added clang format (#1239)
* clang-format stuff and format files
2022-12-16 17:17:31 +00:00
vaxerski
1a9ee959dd static-ize master opt 2022-12-12 14:37:49 +00:00
Maarten van Gompel
46891b12cf
Master layout: lose or inherit fullscreen on deliberate window switching (#1213)
* Master layout: Lose fullscreen status when deliberately switching away from a fullscreen window

* Master layout: implemented inherit_fullscreen config parameter

When set, if you are on a fullscreen window and you cycle to the next,
swap master, etc, it will be automatically fullscreened.
2022-12-12 14:34:52 +00:00
vaxerski
06e6c6021e fix memory read-after-free in master layout 2022-12-12 14:18:43 +00:00
Maarten van Gompel
6381b6474f
Implement orientation (placement of master area) for master layout (#1202)
* Implemented choosing placement of master area (#1059)

This implement a per workspace 'orientation' that can be set
to left, right, top or bottom. Reflecting placement of the master area.

Left (default) and right are horizontal layouts, top and bottom produce vertical
layouts. Orientation can be switched with: 'hyprctl dispatch layoutmsg orientationleft'
2022-12-10 21:59:16 +00:00
vaxerski
0a302901d2 Added handling more special workspaces 2022-11-27 22:42:22 +00:00
vaxerski
493fc00953 fix decorations missing after no_gaps_when_only toggle floating 2022-11-26 18:48:16 +00:00
vaxerski
75b7e661e7 damage windows after switch 2022-11-25 19:52:23 +00:00
vaxerski
d504c1e5ab fix master resizes all 2022-11-21 18:14:25 +00:00
vaxerski
f8b9138383 make focus/swap master layoutmsgs two-way 2022-11-20 11:55:50 +00:00
vaxerski
5530cf6e79 respect no_gaps_when_only in fullscreen 1 2022-11-19 17:35:37 +00:00
vaxerski
884fc4f89c fix master window finding on closed 2022-11-13 14:31:12 +00:00
vaxerski
0208dff574 fix invalid master slave pos calc on y != 0 2022-11-10 19:39:16 +00:00
vaxerski
34b145ee65 Added resizing individual master windows 2022-11-10 12:05:22 +00:00
c545ab4993 Added multiple master layoutmsgs 2022-11-08 12:39:52 +00:00
vaxerski
6553fb5a40 fix fullscreen maximize size 2022-11-05 18:25:32 +00:00
vaxerski
206360177f Multiple animation optimization and xwayland wine fixes 2022-11-04 15:56:31 +00:00
vaxerski
349afa0e7a guard header windows in layout messages 2022-11-03 22:55:44 +00:00
abbadanor
61b950d942
Add focusmaster dispatcher (#942)
* added focusmaster dispatcher

* format

Co-authored-by: Adam Nord <adam.nord@abbgymnasiet.se>
Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
2022-11-02 10:15:11 +00:00
vaxerski
34cd8b125a rework focus system to be more safe and faster 2022-10-14 20:46:32 +01:00
Felix Dick
a1319e5110 Merge branch 'main' into fix_bordersize_again 2022-09-29 01:42:28 +02:00
Felix Dick
11ee78f88b Use double literals, don't cast a integer literal to double. 2022-09-28 20:08:41 +02:00
Felix Dick
87afc8c250 Replace clamp with max if there is no upper bound. 2022-09-26 21:10:24 +02:00
Felix Dick
cd2b2c4fba Scale the border size, revert the window scaling according to border 2022-09-26 17:38:08 +02:00
Dickby
c885afcbc6
Scale border size in calculations of windows 2022-09-25 12:42:39 +02:00
695411f1bd don't decorate on only no gaps 2022-09-23 16:47:58 +01:00
5b6c8d5b0f fix misc fullscreen issues 2022-09-20 09:55:25 +01:00
5131a4acaf fix special fullscreen 2022-09-17 15:07:03 +01:00
fa2d81b649 fix animation issues with workspace silent 2022-09-16 21:17:03 +01:00
vaxerski
037d4ed422 handle multi-ws swaps in layouts 2022-09-14 17:30:16 +02:00
vaxerski
fbd2b4799d Fix some more crimes against humanity 2022-09-03 22:49:52 +02:00
vaxerski
00ef40dda1 added swapnext and swapprev for master 2022-08-24 21:50:48 +02:00
vaxerski
ffaf14c19e minor damage fixes 2022-08-24 13:44:48 +02:00
vaxerski
48c9e9d83d damage on force warp resize 2022-08-23 15:08:15 +02:00
bec7501365 fix borders on no_gaps_when_only 2022-08-16 16:19:52 +02:00
d47bfe6af1 remove unused fixXWaylandWindowsOnWorkspace 2022-08-15 00:34:39 +02:00
28867758c4 better fix the last fix 2022-08-14 16:39:56 +02:00
vaxerski
cd37a1533e reject tiling windows that do not meet the max size requirement 2022-08-05 18:10:59 +02:00
vaxerski
cd483a7a37 ignore borders in nogapswhenonly 2022-08-03 15:25:30 +02:00
vaxerski
f36cd350cc do not animate mouse resizes in layouts 2022-08-03 12:27:20 +02:00
vaxerski
60c16f77a6 added master:no_gaps_when_only 2022-08-01 12:57:37 +02:00
vaxerski
3904351678 Added layoutmsg and some master layout msgs 2022-07-28 12:00:10 +02:00
vaxerski
31a079b347 added DPMS 2022-07-27 12:32:00 +02:00
vaxerski
641aaff998 minor code adjustments 2022-07-20 18:39:08 +02:00
vaxerski
6f1b9d6af9 add master:new_on_top 2022-07-16 23:24:42 +02:00
vaxerski
5c836e6460 added master layout 2022-07-16 15:57:31 +02:00