Commit Graph

747 Commits

Author SHA1 Message Date
Vaxry 4868d4dfd3 shadow: avoid fatal mutation of the windowBox for calcs
fixes #3865
2023-11-16 17:31:52 +00:00
Vaxry 859841f4d1 renderer: don't make snapshots of invisible windows on close 2023-11-16 12:24:07 +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 e8469f8b1b renderer: drop unnecessary spammy logs 2023-11-14 19:51:47 +00:00
Vaxry 5edb4e4a30 decorations: recalc layout and positioner on add/remove 2023-11-13 16:42:58 +00:00
Vaxry 2e26542e3b renderer: use viewporter corrected size for uv calcs 2023-11-12 23:57:53 +00:00
Vaxry 68935ba9dc renderer: separate oversize uv calcs in dimensions 2023-11-12 23:27:52 +00:00
Vaxry 824ccd957b renderer: pass proper arg to main param of uv calcs
was fucking up some non-fitting subsurfaces
2023-11-12 22:59:19 +00:00
Vaxry 45e86d4fdf groupbar: translate box by workspace offset 2023-11-12 22:40:21 +00:00
Vaxry 0ba2e68704 deco-positioner: don't remove hidden windows' data 2023-11-12 17:02:42 +00:00
Dickby e974d1fe98
shaders: Some more changes in rgb2hsl. (#3834) 2023-11-12 16:20:23 +00:00
Alessio Molinari 1bfd4a2bff
output-layout: fix wlroots display handling (#3718) 2023-11-12 13:14:05 +00:00
Vaxry 91cbe93cf8 decoration: add NON_SOLID flag for shadow
fixes #3841
2023-11-12 13:01:23 +00:00
Vaxry f39a6ca17c decoration-positioner: improve stability 2023-11-11 18:07:56 +00:00
Dickby 6eb2abcb20
shaders: Small optimization in rgb2hsl. (#3831) 2023-11-11 17:20:18 +00:00
Vaxry 52cf122a0a shadow: move workspace offset calcs to draw
fixes #3829
2023-11-11 16:15:23 +00:00
Dickby 844da8db56
shaders: Avoid calculating unused values in hsl2rgb. (#3827) 2023-11-11 15:43:31 +00:00
Vaxry bea828ea45 decoration-positioner: improve extent handling 2023-11-11 15:18:17 +00:00
Vaxry cc04b52ce1 deco-positioner: recalc after uncache 2023-11-11 14:52:27 +00:00
Vaxry 9be6fbf5ea
decorations: Decoration Positioner (#3800) 2023-11-11 14:37:17 +00:00
Dickby 7345b1a1ea
shaders: Use clamp in doubleCircleSigmoid. (#3824) 2023-11-11 13:15:37 +00:00
Vaxry e44d6de555 shadow: alpha treatment improvements 2023-11-11 00:52:40 +00:00
Vaxry 14195835ef opengl: switch to black-and-white for alpha mattes
also fixes shadows on 10b
2023-11-09 22:11:54 +00:00
Vaxry 11432f69b9 opengl: remove unused alpha matte from shadow 2023-11-09 22:11:54 +00:00
Visual-Dawg 29e0a7112e
renderer: added new customization options to the blur shaders (#3650)
Adds to `decoration:blur:` `vibrancy` and `vibrancy_darkness`
2023-11-06 18:49:03 +00:00
David Leal 0476e1b498
groups: add option to configure font name (#3751) 2023-11-05 19:25:50 +00:00
Vaxry 56dec1c6a2 renderer: properly set currentFB on snapshot renders 2023-11-04 22:25:09 +00:00
Vaxry 2b07d54bc7 shadow: fix missed fullBox.scale 2023-11-04 20:11:22 +00:00
Vaxry 66a3719b86 renderer: allow transform enabling from outside opengl 2023-11-04 19:35:49 +00:00
Vaxry 64a084477e shadows: fix on transformed 2023-11-04 19:32:50 +00:00
Vaxry 7a09d24065 shadow: fix ignore_window false 2023-11-04 17:45:31 +00:00
Vaxry 55b4f84fea
Internal: Hyprland box implementation (#3755)
* box impl

* remove unused operators

* missed applyfromwlr
2023-11-04 17:03:05 +00:00
Vaxry 73e78f05ad
Decos: Window decoration flags, shadow improvements (#3739) 2023-11-04 13:10:52 +00:00
Vaxry 15b25d5850 renderer: render oversized blur with respect to fade alpha 2023-11-03 21:58:02 +00:00
Vaxry 9d2a5fb417 renderer: improvements to wayland surface small() detection 2023-11-03 19:12:09 +00:00
pastalian 49fdffacea
renderer: fix legacy_renderer build (#3732)
In GLES2, `GL_RGB10_A2` and `GL_UNSIGNED_INT_2_10_10_10_REV` are defined as
`GL_RGB10_A2_EXT` and `GL_UNSIGNED_INT_2_10_10_10_REV_EXT` respectively.
2023-11-03 15:47:20 +00:00
MightyPlaza c44e255194
group: fixes for dragging groups onto groupbars (#3708)
* fixes for dragging groups onto groupbars

modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* use onWindowRemoved()
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
2023-11-01 19:13:39 +00:00
Vaxry 1c9d6b94d1 renderer: fix small surface's blur region being offset by monitor coords 2023-10-30 16:20:30 +00:00
Vaxry 4b592d0819 renderer: properly pass 10-bit formats to opengl 2023-10-30 15:56:16 +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
Vaxry 8e91c038db renderer: use optional for cursor surface storing
because nullptr is a valid surface.

fixes #3692
2023-10-30 00:18:40 +00:00
Vaxry b95c0c318e renderer: fixup blend disable conditions in renderSurface
Fixes #3680
2023-10-29 20:54:14 +00:00
MightyPlaza 9abfa9efc6
input: handle mouse on decorations (#3560) 2023-10-29 20:14:47 +00:00
Vaxry 7a5234a0cc input: better cursor image infrastructure
Improves handling of cursor images/surfaces
Fixes an issue with decos and cursors
Fixes #3471
2023-10-29 18:09:05 +00:00
Vaxry b0b88a63b6 renderer: fix missed box scale 2023-10-25 22:38:14 +01:00
Vaxry 5b0dc779ed renderer: blur properly behind small surfaces 2023-10-25 22:20:58 +01:00
Vaxry 8991be671f renderer: respect viewporter dest on base surfaces 2023-10-25 22:05:04 +01:00
Vaxry 03771d3aa9 windowrules: add nearestneighbor 2023-10-24 21:29:03 +01:00
Vaxry d0367d8560 renderer: use preOffset pos instead of offset
offset is not passed to transformers, so if they change pos, decos will be in the wrong place
2023-10-21 19:51:14 +01:00
Vaxry 95db9108e5 transformers: allow modifying renderdata pre-pass 2023-10-21 19:25:44 +01:00
Vaxry a61eb7694d hooksystem: add callbackinfo struct and cancellable events 2023-10-21 14:52:43 +01:00
Vaxry c6233a790f renderer: avoid drawing invisibly small surfaces in renderSurface 2023-10-21 14:20:06 +01:00
Vaxry 92311d260a renderer: add transformers 2023-10-21 14:15:56 +01:00
Vaxry 4a79718fe8 renderer: fix shimmers when manual resizing 2023-10-20 20:32:47 +01:00
Vaxry 7f35f33b4c surface/wayland: conform to small surface requirements
do not stretch small surfaces, instead center them if they fit.
2023-10-20 20:15:57 +01:00
Vaxry 6e15590e98 shaders: support changing the outer radius of borders independently 2023-10-19 14:05:02 +01:00
Jan Beich 93676f91a0
renderer: cast std::clamp args to be of the same type (#3589)
src/render/OpenGL.cpp:1769:41: error: no matching function for call to 'clamp'
    const auto         FORCEWALLPAPER = std::clamp(*PFORCEWALLPAPER, -1L, 2L);
                                        ^~~~~~~~~~
/usr/include/c++/v1/__algorithm/clamp.h:38:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('int64_t' (aka 'long long') vs. 'long')
clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi)
^
/usr/include/c++/v1/__algorithm/clamp.h:27:1: note: candidate function template not viable: requires 4 arguments, but 3 were provided
clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi, _Compare __comp)
^
2023-10-17 01:29:06 +01:00
Philip Damianik 442209942f
cleanup: Replace find() with C++20 starts_with(), ends_with() and contains() (#3572)
* Replace find() with C++20 starts_with() and ends_with()

* Replace find() with C++20 contains()
2023-10-15 19:07:23 +01:00
Vaxry 424c9a7e70 render: stop locking SWC on tearing 2023-10-13 22:11:21 +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
DaniD3v 7d7565e7ec
renderer: add force_wallpaper instead of no_hypr_chan (#3459) 2023-10-07 14:08:38 +01:00
vaxerski cb7dd1ac6e layershell: avoid configure on unchanged size
fixes #3496
2023-10-06 14:00:05 +01:00
vaxerski 230356012b renderer: extract solitary check into frame handler 2023-10-04 13:48:44 +01:00
vaxerski f8c18ff797 renderer: fixup solitary conditions 2023-10-04 13:30:13 +01:00
vaxerski 2901bb0d2f renderer: add further conditions to solitary recheck 2023-10-04 09:44:07 +01:00
vaxerski fc1d7acd9a renderer: fix missing check for surfaceCount in rechecking solitary
closes #3470
2023-10-02 14:02:19 +01:00
vaxerski 763bb2d3bc renderer: remove old debug log 2023-10-02 10:50:33 +01:00
vaxerski a2a29a60e5 tearing: cleanup vars and avoid rendering before drm is ready 2023-09-30 17:07:50 +01:00
vaxerski e2b72b2975 renderer: avoid spamming software cursor locks 2023-09-30 16:55:41 +01:00
Dickby 772c7d1d3c
shaders: Remove redundant clamp of smoothsteps return value. (#3456) 2023-09-30 13:12:48 +01:00
vaxerski b8f8912db2 renderer: lock software cursors while tearing 2023-09-30 13:12:01 +01:00
vaxerski c298439433 renderer: nuke multisample_edges in favor of a faster algorithm 2023-09-30 01:41:05 +01:00
vaxerski 495d4f2d11 shaders: improve border rounding 2023-09-30 01:35:05 +01:00
vaxerski a44ab7748f renderer: optimize render pipeline when there is a solitary client 2023-09-29 17:51:07 +01:00
Vaxry 88b63a00b6
renderer: Tearing implementation (#3441) 2023-09-28 21:48:33 +01:00
vaxerski 3b1e09e5a1 renderer: fix missing dontRound check in renderSurface
fixes 3296
2023-09-23 00:06:48 +01:00
vaxerski ea45bfb63c renderer: cleanup drm format selection 2023-09-22 20:15:12 +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
Mihai Fufezan f72e04d63b
misc: add disable_hypr_chan option (#3343) 2023-09-17 15:26:24 +01:00
Philip Damianik 6c855dd6e4
internal: Fix wlr output management (#3234) 2023-09-10 13:14:27 +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
vaxerski c3a83daa1e monitor: minor adjustments 2023-09-05 22:16:14 +02:00
Dickby fa3de9b70e
renderer: Fix blur for passes set to 0. (#3181) 2023-09-05 16:33:40 +02:00
memchr 69439871e6
refactor: replace manual iteration of CWindow with existing methods (#3147) 2023-09-04 15:13:39 +02:00
vaxerski 32f75ebb70 renderer: separate workspace window render logic
Makes the logic used to render stuff over the windows (special, popups, ime, lockscreen) unified by yeeting the workspace window logic (which is separate cuz fullscreen windows) into their own funcs. Fixes #2053
2023-09-04 15:07:56 +02:00
staz 01c6c5ae22
internal: Revert rounding of window size (#3153)
* Revert "renderer: round coords and size in renderWindow"

This reverts commit fc0c1896e0.

* Revert "xwaylandmgr: round reported sizes"

This reverts commit 2985e20e6a.
2023-09-03 12:51:48 +02:00
vaxerski 423b129b24 renderer: don't set enabled in applyMonitorRule 2023-09-03 12:43:57 +02:00
vaxerski d4ec54d048 renderer: render IME popups in fullscreen
fixes #1353
2023-09-02 20:32:15 +02:00
vaxerski d2a785dfe3 renderer: fixup occlusion conditions
fixes #3123 I fucking hate yall
2023-09-01 23:01:59 +02:00
memchr 1a13d44d5d
refactor: raise SIGABRT instead of write to null address (#3124) 2023-08-31 22:52:02 +02:00
vaxerski fc0c1896e0 renderer: round coords and size in renderWindow 2023-08-31 09:55:38 +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 84c4a14dad opengl: cleanup framebuffer style 2023-08-29 23:24:35 +02:00
vaxerski df691859fb renderer: make contrast and brightness adjustments before rendering 2023-08-28 18:29:44 +02:00
vaxerski 299d201e56 renderer: don't blur special on disabled blur 2023-08-26 11:48:04 +02:00
vaxerski 870471dd96 internal: allow opening empty special workspaces
Fixes point 2 of #2596
2023-08-25 18:05:08 +02:00
vaxerski 23e17700a7 renderer: add decoration:blur:special
will blur behind the special ws
2023-08-25 17:44:17 +02:00