Vaxry
0a1ae48a9f
core: move all shared_ptrs from the STL to hyprutils ( #9143 )
2025-01-23 21:55:41 +01:00
Tom Englund
4da9b7cc5b
core: reserve vector sizes as much as we can ( #9118 )
...
avoid reallocations as much as possible with a few edge cases where the
reservation overshoots a tiny bit. but a few bytes of memory short term
is better used then the overhead of potential reallocation.
2025-01-19 10:38:42 +00:00
user111111111111111111111111111111111
2bad73354a
core: cleanup header includes ( #9088 )
...
Cleanup some unneeded includes to speed up compilation
2025-01-17 15:21:35 +00:00
vaxerski
8475a8ef99
core: always use goal size to send to clients
2025-01-10 14:09:16 +01:00
Dardo D Kleiner
f9c37ca43b
windows: honor xdg_toplevel_set_fullscreen output hint ( #8965 )
...
Co-authored-by: Dardo D Kleiner <dardo.kleiner@nrl.navy.mil>
2025-01-09 22:38:38 +00:00
vaxerski
67e1e46f9b
window: fixup fade out animation on silent moves
2025-01-07 20:58:49 +01:00
Maximilian Seidler
5642ed331d
core: move parts of the animation system to hyprutils ( #8868 )
...
* core: change animation manager to use Hyprutils::Animation
* config: move animation config to hyprutils animation tree
* use g_pAnimationManager->createAnimation and the new PHLANIMVAR template
* core: use CGenericAnimatedVariabled::{enabled,setConfig,getStyle} and adapt callbacks
* core: adapt animated variable usage (dereference the shared pointer)
* misc: bump CMakeLists to hyprutils 0.3.3
2025-01-07 17:55:14 +00:00
Pollux
a5c14370c1
renderer: Add supercircular window corners ( #8943 )
...
renderer: Add supercircular shadows and borders
config: Add rounding_power to default and example configs
rule: add `roundingpower` window rule
2025-01-05 18:38:49 +00:00
khushal-solves
85632e7c33
internal: update window position/size after changing fullscreenstate ( #8865 )
...
This effects fullscreen group of floating windows.
2024-12-27 15:20:38 +00:00
Vaxry
1cc1a46c2e
core: fade in windows when they are brought from invisible workspaces
2024-12-22 16:04:10 +00:00
Ikalco
5b714f05f8
internal: Make static analysis more happy ( #8767 )
...
* make functions used in 1 file static
* fix invalid substr param -1
* give default initializer to borderGradier
* move RASSERT from printf to std::print
2024-12-19 02:56:01 +01:00
Ikalco
e2c78c00e5
internal: remove dead code ( #8748 )
2024-12-17 17:31:27 +01:00
Vaxry
95cdedee04
windowrules: fix prop rules with boolean values
2024-12-16 18:44:19 +00:00
Vaxry
e06b520427
core: Move regex from stdlib to re2 ( #8736 )
...
Moves the regex handling from stdlib to re2
2024-12-16 19:21:44 +01:00
Vaxry
dab50b3ef3
core: Optimize window/layer rule application and scanning ( #8735 )
...
Optimizes window and layer rule parsing and later usage.
2024-12-16 19:05:24 +01:00
Mike Will
df956a0f6f
windowrules: add rules for mouse and touchpad scroll factors ( #8655 )
2024-12-11 17:27:49 +00:00
Pavel Belyavsky
4d05677e8d
config: add 'force' option for 'cursor:warp_on_change_workspace' ( #8681 )
...
* config: add 'force' option for 'cursor:warp_on_change_workspace'
* manager: throw the expression into the function arguments
* config: fix description of `cursor:warp_on_change_workspace`
2024-12-10 21:55:05 +01:00
Vaxry
8bbeee1173
core: Add clang-tidy ( #8664 )
...
This adds a .clang-tidy file for us.
It's not a strict requirement to be compliant, but I tuned it to be alright.
2024-12-07 18:51:18 +01:00
Vaxry
3c617ce33c
internal: fixup some missed updateColorsOk() calls
2024-12-03 22:58:30 +00:00
Vaxry
320144ae72
core: move colorspace handling to oklab ( #8635 )
...
* Meson: add hyprgraphics
* Nix: add hyprgraphics
* CI/setup_base: get hyprgraphics-git
---------
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2024-12-03 18:58:24 +00:00
Vaxry
745a82ce8a
core: workspace-related function cleanup / refactor
...
CCompositor is massive, and has a lot of functions that could be better optimized if in CWorkspace
2024-11-22 16:01:02 +00:00
Vaxry
e5fa017172
internal: fix some misused configStringToInt conversions
...
fixes #8523
2024-11-20 10:32:50 +00:00
Vaxry
47a1650c48
miscfunctions: move configStringToInt to std::expected
2024-11-18 23:53:38 +00:00
Vaxry
b735295d2b
windows/xdg: minor cleanup of min/max size calculations
...
fixes #8495
2024-11-17 19:31:54 +00:00
MightyPlaza
12c1bb936d
internal: check size limit in layouts ( #8298 )
...
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/events/Windows.cpp
modified: src/helpers/MiscFunctions.cpp
modified: src/helpers/MiscFunctions.hpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/IHyprLayout.cpp
modified: src/layout/MasterLayout.cpp
modified: src/macros.hpp
2024-10-30 18:58:36 +00:00
Aqa-Ib
d49a1334a8
swallow: check if swallow_regex doesn't exist ( #8265 )
...
Avoid to run CWindow::getSwallower() when `swallow_regex` doesn't exist in the user's config file.
2024-10-28 16:52:14 +00:00
Vaxry
5d4b54b012
core: move internal structures to monitor pointers ( #8266 )
2024-10-27 18:45:38 +00:00
Tom Englund
f9b52203f5
internal: optimize cursor move a bit ( #8264 )
...
* window: inline and const getWindowMainSurfaceBox
getWindowMainSurfaceBox gets called a lot of times from deep down from
mousemoveunified, profiling mousemoveunified it spends quite a lot of
cpu time in here, let the compiler optimize the call to
getWindowMainSurfaceBox by inlining and making it const. reducing the
overhead.
* inputmgr: return early and use std::any_of
return early in mousemoveunified to reduce the amount of unnecessery
calls to various pointers when not needed, also make isconstrained use
std::any_of instead of for loop to use the STL optimized paths with
hopes and dreams marginally faster.
* decoration: return early, reduce temporar copy
return earlier and reduce the temp copies by using one .lock instead of
two
2024-10-27 17:51:26 +00:00
Vaxry
f044e4c951
internal: Move CMonitor to SP ( #8178 )
...
* move monitors to sp
* XD
2024-10-19 23:03:29 +01:00
Vaxry
b57086aa43
window: properly break cycles in X11TransientFor
...
ref #8045
2024-10-16 22:23:15 +01:00
MightyPlaza
a364df4c9e
internal: use clampWindowSize to unify min/maxsize handling ( #8014 )
...
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/events/Windows.cpp
2024-10-07 19:52:49 +01:00
AlvinaNancy
e87758529e
internal: Fix change group current fullscreen state query ( #7802 )
2024-09-15 18:25:06 +01:00
Parola Marco
4a42c5ed20
config: Add a variable to prevent groups from merging after being dragged ( #7650 )
...
* config: Add a variable to prevent groups from merging after being dragged
* Fixed code style for [f777f028]
2024-09-05 17:29:33 +01:00
Vaxry
c5fd577181
config: Add a window rule to render while unfocused ( #7582 )
2024-08-30 17:37:52 +02:00
Vaxry
25e72949a1
window/xwayland: minor property cleanup
...
fixes #6921
2024-08-30 14:12:23 +02:00
Vaxry
b9b8e6220f
renderer: fade out windows on silent moves
2024-08-28 21:54:49 +02:00
Vaxry
9642311ac2
window: don't focus on activate if window isn't mapped yet
...
ref #7089
2024-08-28 20:33:38 +02:00
Tom Englund
72c7818ae6
misc: constify the remaining for loops ( #7534 )
...
now we roll loops at blazing constified speed.
2024-08-26 20:24:30 +02:00
Tom Englund
8d6c18076f
core: make most for loops use const references ( #7527 )
...
why not let the compiler optimise things for us at hyprspeeds when we
can.
2024-08-26 17:25:39 +02:00
Tom Englund
4b4971c06f
internal: introduce new types to avoid unsigned int rollover and signed int overflow ( #7216 )
...
* framebuffer: avoid gluint overflow
GLuint was being initialized to -1 and rolling over to unsigned int max,
its defined behaviour but very unnecessery. add a bool and use it for
checking if allocated or not.
* opengl: avoid gluint rollover
-1 rolls over to unsigned int max, use 0xFF instead.
* core: big uint64_t to int type conversion
there were a few uint64_t to int implicit conversions overflowing int
and causing UB, make all monitor/workspaces/windows use the new
typedefs. also fix the various related 64 to 32 implicit conversions
going around found with -Wshorten-64-to-32
2024-08-08 21:01:50 +02:00
Jan Beich
9f5a57ff45
core: Add missing header for libc++ after e989a0bcffac ( #7158 )
...
src/Compositor.cpp:2295:74: error: no member named 'bit_floor' in namespace 'std'
2295 | const eFullscreenMode CURRENT_EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)PWINDOW->m_sFullscreenState.internal);
| ~~~~~^
src/Compositor.cpp:2296:74: error: no member named 'bit_floor' in namespace 'std'
2296 | const eFullscreenMode EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)state.internal);
| ~~~~~^
src/desktop/Window.cpp:1242:34: error: no member named 'bit_floor' in namespace 'std'
1242 | return (eFullscreenMode)std::bit_floor((uint8_t)m_sFullscreenState.internal) == MODE;
| ~~~~~^
2024-08-03 13:02:10 +01:00
Vaxry
37e1411e8d
core/surface/buffer: Buffer lock/release fixes ( #7110 )
2024-07-31 21:47:26 +02:00
MightyPlaza
e989a0bcff
internal: refactor fullscreen states ( #7104 )
...
* refactor fullscreen
modified: src/Compositor.cpp
modified: src/Compositor.hpp
modified: src/config/ConfigManager.cpp
modified: src/config/ConfigManager.hpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/LayerSurface.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/desktop/Workspace.cpp
modified: src/desktop/Workspace.hpp
modified: src/events/Windows.cpp
modified: src/helpers/Monitor.cpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/DwindleLayout.hpp
modified: src/layout/IHyprLayout.cpp
modified: src/layout/IHyprLayout.hpp
modified: src/layout/MasterLayout.cpp
modified: src/layout/MasterLayout.hpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/KeybindManager.hpp
modified: src/managers/input/IdleInhibitor.cpp
modified: src/managers/input/InputManager.cpp
modified: src/managers/input/Swipe.cpp
modified: src/protocols/ForeignToplevelWlr.cpp
modified: src/render/Renderer.cpp
modified: src/render/decorations/CHyprGroupBarDecoration.cpp
* clean up
modified: src/config/ConfigManager.cpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.hpp
modified: src/desktop/Workspace.cpp
modified: src/events/Windows.cpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/input/Swipe.cpp
* fix mapWindow fullscreen
modified: src/events/Windows.cpp
* fix typo
modified: src/desktop/Workspace.cpp
* add fullscreenstate
modified: src/config/ConfigManager.cpp
modified: src/events/Windows.cpp
* change syncFullscreen to lower
modified: src/config/ConfigManager.hpp
* initialize fs state
modified: src/desktop/Window.hpp
2024-07-31 19:55:52 +02:00
MightyPlaza
ad711ef421
input: unify removing currentlyDraggedWindow ( #7071 )
...
modified: src/desktop/Window.cpp
modified: src/events/Windows.cpp
modified: src/layout/IHyprLayout.cpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/KeybindManager.hpp
modified: src/managers/input/InputManager.cpp
2024-07-27 17:46:19 +01:00
Vaxry
016da234d0
Core: Move to aquamarine ( #6608 )
...
Moves Hyprland from wlroots to aquamarine for the backend.
---------
Signed-off-by: Vaxry <vaxry@vaxry.net>
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
Co-authored-by: vaxerski <vaxerski@users.noreply.github.com>
Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com>
Co-authored-by: Tom Englund <tomenglund26@gmail.com>
Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com>
Co-authored-by: diniamo <diniamo53@gmail.com>
2024-07-21 13:09:54 +02:00
Tim Waterhouse
45c4898423
socket2: Add windowtitlev2 event which includes the window address ( #6856 )
...
Fixes #5393
2024-07-13 16:21:32 +02:00
MightyPlaza
a443902abc
core: Improve handling of window properties ( #6776 )
...
* add mWindowProperties
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/events/Windows.cpp
* support int values
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
* create m_sWindowData
modified: src/Compositor.cpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/events/Windows.cpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/IHyprLayout.cpp
modified: src/layout/MasterLayout.cpp
modified: src/managers/AnimationManager.cpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/XWaylandManager.cpp
modified: src/render/OpenGL.cpp
modified: src/render/Renderer.cpp
modified: src/render/decorations/CHyprBorderDecoration.cpp
modified: src/render/decorations/CHyprDropShadowDecoration.cpp
modified: src/render/decorations/CHyprGroupBarDecoration.cpp
* simplify some properties
modified: src/Compositor.cpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/managers/KeybindManager.cpp
* store multiple values in CWindowOverridableVar
modified: src/Compositor.cpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/events/Windows.cpp
modified: src/layout/IHyprLayout.cpp
modified: src/managers/AnimationManager.cpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/XWaylandManager.cpp
modified: src/render/OpenGL.cpp
modified: src/render/Renderer.cpp
modified: src/render/decorations/CHyprBorderDecoration.cpp
modified: src/render/decorations/CHyprDropShadowDecoration.cpp
modified: src/render/decorations/CHyprGroupBarDecoration.cpp
* clean up
modified: src/Compositor.cpp
modified: src/Compositor.hpp
modified: src/config/ConfigManager.cpp
modified: src/config/ConfigManager.hpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/events/Windows.cpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/IHyprLayout.cpp
modified: src/layout/IHyprLayout.hpp
modified: src/layout/MasterLayout.cpp
modified: src/managers/KeybindManager.cpp
* use SET_PROP priority for exec rules
modified: src/config/ConfigManager.hpp
modified: src/desktop/Window.cpp
* add default value
modified: src/Compositor.cpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/events/Windows.cpp
modified: src/layout/IHyprLayout.cpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/XWaylandManager.cpp
modified: src/render/OpenGL.cpp
modified: src/render/Renderer.cpp
modified: src/render/decorations/CHyprBorderDecoration.cpp
modified: src/render/decorations/CHyprDropShadowDecoration.cpp
modified: src/render/decorations/CHyprGroupBarDecoration.cpp
* add setprop toggle
modified: src/config/ConfigManager.hpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.cpp
* add setprop toggle
modified: src/debug/HyprCtl.cpp
* make window rules functional
modified: src/config/ConfigManager.cpp
modified: src/desktop/Window.cpp
* minor fixes
modified: src/Compositor.cpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.hpp
* properly clean layout data
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/events/Windows.cpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/IHyprLayout.cpp
modified: src/layout/IHyprLayout.hpp
modified: src/layout/MasterLayout.cpp
* remove newline
modified: src/events/Windows.cpp
* fixes
modified: src/config/ConfigManager.hpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
* use CamelCase
modified: src/Compositor.cpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/events/Windows.cpp
modified: src/layout/IHyprLayout.cpp
modified: src/managers/AnimationManager.cpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/XWaylandManager.cpp
modified: src/render/OpenGL.cpp
modified: src/render/Renderer.cpp
modified: src/render/decorations/CHyprBorderDecoration.cpp
modified: src/render/decorations/CHyprDropShadowDecoration.cpp
modified: src/render/decorations/CHyprGroupBarDecoration.cpp
2024-07-11 16:10:42 +02:00
Tom Englund
d7ea1b7785
xwayland: break cyclic loop of parents ( #6722 )
...
in X11 some surfaces is a parent of itself and creates a cyclic loop
when trying to find its parent. check for old parent and break if its
beginning to roll over.
2024-07-01 00:26:08 +02:00
Vaxry
fb15b7aa2a
core: Move to hyprutils for Math
...
Moves CRegion, CBox and Vector2D over to hyprutils.
Requires hyprutils>=0.1.4
2024-06-19 16:20:15 +02:00
Vaxry
91fe58f8f2
window: improve swallowing functionality
...
cleanups, fixes, etc.
ref #6095
2024-06-15 18:20:41 +02:00