Commit Graph

135 Commits

Author SHA1 Message Date
MightyPlaza eeebbc0e7e groupbar: fix title scaling (#5969)
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.hpp
2024-05-09 22:02:19 +01:00
MightyPlaza 85f7f69046
decorations: fix groupbar input (#5963)
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.hpp
2024-05-09 19:19:32 +01:00
Vaxry 96365309de deco-positioner: avoid infinite recalcs
fixes #5908
2024-05-07 11:53:29 +01:00
Vaxry 1ed1ce9506
internal: new shared_ptr and weak_ptr implementation (#5883)
moves std::shared_ptrs to a new implementation

Advantages:
- you can dereference a weak_ptr directly. This will obviously segfault on a nullptr deref if it's expired.
   - this is useful to avoid the .lock() hell where we are 100% sure the pointer _should_ be valid. (and if it isn't, it should throw.)
- weak_ptrs are still valid while the SP is being destroyed.
   - reasoning: while an object (e.g. CWindow) is being destroyed, its `weak_ptr self` should be accessible (the sp is still alive, and so is CWindow), but it's not because by stl it's already expired (to prevent resurrection)
   - this impl solves it differently. w_p is expired, but can still be dereferenced and used. Creating `s_p`s is not possible anymore, though.
   - this is useful in destructors and callbacks.
2024-05-05 17:16:00 +01:00
Vaxry a3309b51a2 shadow: fix small pixel gaps between border
huge fix
2024-05-04 20:30:03 +01:00
zakk4223 d2899a6c27
layout: Trigger layout recalcuation on deco position/size change (#5821)
* Trigger layout recalcuation on deco position/size change

* Remove now unneeded code

* Formatting
2024-05-01 12:59:40 +01:00
Vaxry bca7804bb6
internal: Window storage rework - part 1 (#5762)
* Window storage rework - part 1

* format

* remove useless include

* fix pch

* format

* fix crash in dwindle

* fix vram leak

* prefer .expired() for bool checks
2024-04-27 12:43:12 +01:00
Vaxry 4ad739ec63 HookSystem: improve callback safety 2024-04-20 20:16:42 +01:00
Vaxry efdc1af044 renderer: some fixes for renderModif 2024-04-03 14:09:58 +01:00
Vaxry ef23ef60c5
Workspace/core: Refactor workspace storage (#5380)
* refactor workspaces to use ptrs

* clang-format
2024-04-02 20:32:39 +01:00
thejch 9ae0c47a21
deco: fix groupbar offset (#5364) 2024-04-01 02:58:21 +01:00
thejch e1e41e5448
reenderer: Add 1 border damage to fix number rounding issues (#5343)
* add 1 to border damage to avoid rounding issues

* add 1 to rounding too
2024-03-31 14:59:22 +01:00
thejch 16a9c16d9f
renderer/animations: Fix various inaccurate damage tracking issues and offsets (#5297) 2024-03-31 02:14:26 +01:00
MightyPlaza 397e08c16a
input: focus window on mouse down on groupbar (#5224)
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
2024-03-22 17:41:20 +00:00
Vaxry 8593c45be3 refactor: move window.hpp to desktop/ 2024-03-20 01:44:51 +00:00
Vaxry a01949dd28 deco: fix warnings 2024-03-09 16:39:38 +00:00
Vaxry 063708df26 config: improve config value infrastructure 2024-03-03 18:41:38 +00:00
Vaxry cc94123fa7 renderer: minor fixes to transformations 2024-03-03 02:18:06 +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 ea3fd13e24 shadow: fix missed invalid use of cfg val ptr
fixes #4785
2024-02-21 19:26:21 +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
Ben Landon 289d4241be
groupbar: scale groupbar text according to monitor scale (#4640) 2024-02-08 22:29:10 +00:00
MightyPlaza f14c5ea5c5
groupbar: separate gradients from title (#4444)
* separate gradients from title logic
modified:   src/config/ConfigManager.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* fix disabled extents
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* fix disabled height
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
2024-01-15 16:17:42 +01:00
MightyPlaza 2ba2c8aeee
groupbar: improve gradient handling (#4390)
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
2024-01-08 19:38:22 +01:00
Vaxry 813af393f1 layout: update rules before applying fullscreen nodes in layouts 2024-01-02 14:21:36 +01:00
dranull 583b05a8c6
groupbar: Drag single window instead of destroying group (#4327) 2024-01-02 13:37:03 +01:00
MightyPlaza 2ad2e1d5f5
groupbar: add enabling groupbar and setting priority (#4299) 2023-12-30 15:18:53 +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
Vaxry 9242b03317 internal: minor include fixes and missed format 2023-12-29 10:27:09 +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
MightyPlaza 5f65946c84
hyprctl: add decorations (#4275)
* add hyprctl decorations

modified:   hyprctl/main.cpp
modified:   src/debug/HyprCtl.cpp
modified:   src/render/decorations/CHyprBorderDecoration.cpp
modified:   src/render/decorations/CHyprBorderDecoration.hpp
modified:   src/render/decorations/CHyprDropShadowDecoration.cpp
modified:   src/render/decorations/CHyprDropShadowDecoration.hpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.hpp
modified:   src/render/decorations/IHyprWindowDecoration.cpp
modified:   src/render/decorations/IHyprWindowDecoration.hpp

* fixes
modified:   hyprctl/main.cpp
modified:   src/render/decorations/IHyprWindowDecoration.cpp
2023-12-28 16:38:16 +01:00
MightyPlaza 1ecd173c7a
groupbar: remove extra border size from groupbars (#4262)
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
2023-12-27 11:43:55 +01:00
MightyPlaza b25b06430b
groupbar: add egl context to refreshGroupBarGradients() (#4238)
* add egl context to refreshGroupBarGradients()

modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* don't unsetEGL
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
2023-12-24 19:29:04 +01:00
dranull 5c7e23f86b
shadow: Avoid rounded shadows when rounding is 0 (#4230) 2023-12-23 20:40:07 +01:00
Vaxry b9c1414f25 border: fix missed translate by offset 2023-12-23 16:11:26 +01:00
Vaxry c416880cf9 shadow: correctly scale boxes 2023-12-22 19:54:31 +01:00
Vaxry 8191e635a3 deco-positioner: include sticky in sent geometry 2023-12-11 16:46:20 +00:00
Vaxry 167f2ed3b2 border: fix failed assert on small windows
fixes #4115
2023-12-10 19:32:03 +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
Vaxry b80c72c7dd groupbar: fix crash in renderGradientTo
fixes #3985
2023-11-29 13:36:37 +00:00
Vaxry e2f18f8c7f groupbar: more safety around gradient textures 2023-11-28 19:03:02 +00:00
MightyPlaza 7a0a5666d5
groupbar: allow reload and fix locked groupbar gradient (#3546)
modified:   src/config/ConfigManager.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.hpp
2023-11-26 17:59:49 +00:00
thejch 7d1c8d827a
shadow: add workspace offset to floating window shadow (#3906) 2023-11-20 22:34:28 +00:00
MightyPlaza 7e0c90b92c
groupbar: fix text pos with verical offset (#3893)
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
2023-11-19 12:29:26 +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
Vaxry 4868d4dfd3 shadow: avoid fatal mutation of the windowBox for calcs
fixes #3865
2023-11-16 17:31:52 +00:00
Vaxry 28ef18a921 shadow: avoid using glClear and don't draw behind window if ignore_window
fixes #3860
2023-11-16 11:42:53 +00:00
Dickby 91d6be1f09
groupbar: Fix position of groupbar titles on monitor scales != 1.0 (#3856) 2023-11-15 20:32:44 +00:00
Vaxry 5edb4e4a30 decorations: recalc layout and positioner on add/remove 2023-11-13 16:42:58 +00:00