3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2025-10-29 19:34:47 +00:00

6546 Commits

Author SHA1 Message Date
Richard Potter
7fcaf332e8
layouts: apply [min|max]size window rules to dwindle & master layouts (#11898)
Uses min/max rules in the tiled layouts, akin to pseudotiling
2025-10-13 13:08:40 +01:00
Mihai Fufezan
6582f42db8 meson: disable lto explicitly 2025-10-13 09:27:33 +03:00
Virt
ed93643021
core: disable lto for hyprland builds (#11972)
LTO has the tendency to remove functions completely by inlining them, which breaks function hooks.

Force disable LTO to not have plugins break.
2025-10-12 02:06:31 +02:00
ItsOhen
d599513d4a
config: add automatic closing to submaps (#11760)
* Allow submaps to auto reset to parent.

* Really should be a stack instead.

If hyprlang would allow for { } i would be so happy.

* Fixed: Somewhat better way to do it..

Lets you define what submap you want to go to instead.

* squash! Fixed: Somewhat better way to do it..

* God i hate cf..

* Force clang-format on the whole thing..

* Removed {}.

* Added tests

Tests and reset fix.
2025-10-11 02:40:18 +02:00
epsilonshmepsilon
6a01c399a9
input: add option to rotate device input (#11947) 2025-10-10 17:05:51 +02:00
Nikolai Nechaev
da31e82aab
internal: prevent early exit processes from being zombies (#11995)
Prevent `exec`/`exec-once` processes which terminate very early
(before Hyprland declares that it does not want to reap zombies)
from getting stuck as zombie processes.
2025-10-10 17:03:34 +02:00
Tom Englund
32f3233324
dmabuffer: ensure we only create one texture per buffer (#11990)
buffer can be recomitted, when moving texture creation from constructor
to committime it means same buffer recommit can cause a new texture
unless we store it per buffer and return the pointer for it.
2025-10-10 14:13:14 +02:00
Vaxry
2b0926dcd4
tests: disable one test as it fails on ci 2025-10-10 13:11:32 +01:00
Damino
b965fb2a40 flake.lock: bump hyprutils 2025-10-09 08:35:34 +03:00
Tom Englund
82759d4095
buffer: move texture creation to commit time (#11964)
* buffer: move texture creation to commit time

move creating texture away from buffer attach into commitstate in an
attempt to postpone gpu work until its really needed. best case scenario
gpu clocks have ramped up before because we are actively doing things
causing surface states and a commit to happend meaning less visible lag.

* buffer: simplify texture creation

make createTexture return a shared ptr directly, remove not needed
member variables as m_success and m_texture.
2025-10-08 22:25:55 +02:00
Linux User
0dc45b54f3
managers/helpers: add missing includes (#11969)
* managers: include string header

Fixes error `implicit instantiation of undefined template 'std::basic_string<char>'` on llvm/musl

* helpers: include unistd header

Fixes error `use of undeclared identifier 'pipe'` on llvm/musl
2025-10-08 22:24:40 +02:00
Nj0be
ba24547d3d
dispatchers: add set, unset and toggle to fullscreen (#11893)
Add set, unset and toggle to fullscreen
2025-10-08 11:07:55 +01:00
Tom Englund
5ba2d2217b
compositor: make wl_surface::frame follow pending states (#11953)
* compositor: make pending states store frame callbacks

move frame callbacks to pending states so they are only committed in the
order they came depending on the buffer wait for readyness.

* buffer: damage is relative to current commit

ensure the damage is only used once, or we are constantly redrawing
things on state commits that isnt a buffer.

thanks PlasmaPower.

* compositor: move callbacks back to compositor

move SSurfaceStateFrameCB back to compositor in the class
CWLCallbackResource as per request, but still keep the state as owning.

* compositor: ensure commits come in order

if a buffer is waiting any commits after it might be non buffer commits
from the "future" and applying directly. and when the old buffer that
was waiting becomes ready it applies its states and overwrites the
future changes.

move things to scheduleState and add a m_pendingWaiting guard. and
schedule the next pending state from the old buffer commit when done.
and as such it loops itself and keeps thing orderly.
2025-10-07 12:49:38 +01:00
Vaxry
5a20862126
hookSystem: use a full trampo setup for hooks
instead of planting a longjmp at the fn head, make a shortjmp to a launch trampo

this helps with shortjmps that can be in the fn and will break when relocated. They are very unlikely to occur within the first 5 bytes (jmp rel32) but can happen in the first 10 or so (longjmp)

fixes csgo-vk-fix on latest main with release building on gcc / clang
2025-10-07 12:49:36 +01:00
Vaxry
c3747fab56
hookSystem: fix anchoring in seekNewPageAddr()
otherwise we might miss the chance to get an anchor
2025-10-07 01:44:03 +01:00
Vaxry
dc72259a54
core/compositor: revert make wl_surface::frame follow pending states (#11896)
This reverts commit 17e77e0407bebd5d24521012ee1d04b156d6b9f4.

Reverted due to severe performance degradation due to accumulating frame
callbacks
2025-10-06 23:44:47 +01:00
Vaxry
02cda6bebf
systeminfo: log system package versions (#11946) 2025-10-06 23:20:21 +02:00
rfresh2
73f06434a4
keybinds: fix repeat and long press keybinds release (#11863) 2025-10-06 21:10:56 +02:00
Tom Englund
17e77e0407
core/compositor: make wl_surface::frame follow pending states (#11896)
* compositor: make pending states store frame callbacks

move frame callbacks to pending states so they are only committed in the
order they came depending on the buffer wait for readyness.

* buffer: damage is relative to current commit

ensure the damage is only used once, or we are constantly redrawing
things on state commits that isnt a buffer.

thanks PlasmaPower.

* compositor: move callbacks back to compositor

move SSurfaceStateFrameCB back to compositor in the class
CWLCallbackResource as per request, but still keep the state as owning.

* compositor: ensure commits come in order

if a buffer is waiting any commits after it might be non buffer commits
from the "future" and applying directly. and when the old buffer that
was waiting becomes ready it applies its states and overwrites the
future changes.

move things to scheduleState and add a m_pendingWaiting guard. and
schedule the next pending state from the old buffer commit when done.
and as such it loops itself and keeps thing orderly.
2025-10-06 12:20:04 +01:00
Dave Walker
cfac27251a
debug: fix data race in Debug::log() (#11931)
* debug: fix data race in Debug::log()

The templated Debug::log() had mutex protection but the non-template
overload it calls didn't, causing crashes when plugins called log from
background threads (like hypr-dynamic-cursors loading cursor themes).

Fixed by moving the mutex lock from the template version into the
non-template version, so all writes to shared state are protected.

Fixes: hyprwm/Hyprland#11929
Fixes: VirtCode/hypr-dynamic-cursors#99

* debug: apply clang-format to Log.cpp

Fix formatting to satisfy CI clang-format check.

---------

Co-authored-by: Dave Walker <dave@daviey.com>
2025-10-05 16:24:49 +02:00
UjinT34
76d998743a
cm: handle inert cm outputs (#11916) 2025-10-04 00:35:22 +02:00
vaxerski
b7ef892ecf [gha] Nix: update inputs 2025-10-03 19:52:11 +00:00
UjinT34
f0b4164e2e
cm: fix primaries to proto scale (#11914) 2025-10-03 21:50:57 +02:00
UjinT34
3bcfa94ee4
renderer: add render:non_shader_cm and fixes (#11900) 2025-10-02 12:05:54 +02:00
Vaxry
c467bb2640
renderer: fix popup fadeout blur (#11756)
popups dont get no xray
2025-10-02 12:01:16 +02:00
Vaxry
e0c96276df
renderer: optimize border drawcalls (#11891)
calculates the specific border region to avoid sampling on regions where the border cannot be at
2025-10-01 12:38:17 +01:00
vaxerski
378438ffe7 config: increase default anr_missed_pings value
ref https://github.com/hyprwm/Hyprland/discussions/11884
2025-10-01 12:19:16 +01:00
Vaxry
13648d196a
protocols/seat: force down rounding of coords at the surface edge (#11890)
ref https://github.com/hyprwm/Hyprland/discussions/11665
2025-10-01 12:15:23 +01:00
UjinT34
8c54c9b412
protocols/cm: remove unneeded preferred ref (#11877) 2025-10-01 11:04:49 +01:00
ItsOhen
38c1e72c9d
rules: fix some monitor rules (#11873) 2025-09-29 20:10:34 +02:00
UjinT34
0959672591
renderer/cm: add more monitor cm options (#11861)
Adds more cm options for monitors: DCIP3, Apple P3, Adobe
2025-09-29 13:22:42 +01:00
UjinT34
4d82cc5957
internal: fix clang-tidy "errors" (#11862) 2025-09-29 13:10:15 +01:00
Vaxry
43fb4753fc
gestures: fix gesture direction detection (#11852) 2025-09-29 12:29:40 +01:00
Tom Englund
f854b5bffb deco: reduce virtual calls in drop shadow
damageEntire() in CHyprdDropShadow is pretty much called per window per
frame, instead of all the PWINDOW-> virtual calls, store pos and size
once and move the duplicated code to a lambda. reducing it a bit.

shows up in profiling as minor waste.
2025-09-28 23:20:52 +02:00
Tom Englund
eb25dfd399 opengl: move from unordered_set to array
setCapStatus is a a heavy used function in hot rendering paths, it
shows up in profiling as using a bit of cpu just because of
unordered_set hashing etc, move to a enum and array and cache only the
heavily used ones.
2025-09-28 23:20:52 +02:00
Tom Englund
b627885788 decoration: reduce virtual calls
this shows up as top contender in idle cpu usage, because decos in
animations keeps locking weak pointers to shared pointers per window per
frame when its not really needed, use weakpointers all the way and it
drops to a bottom contender. marginal gains in the big picture. but
gains is gains.
2025-09-28 23:20:52 +02:00
Mihai Fufezan
c30036bdac
CI/Arch: build hyprgraphics after hyprutils
Ensure no ABI breaks. Hyprgraphics depends on hyprutils.
2025-09-28 19:19:41 +03:00
usering-around
766acadcf1
seat: release depressed modifiers on leave (#11854) 2025-09-28 00:05:30 +02:00
omar
ef479ff539
viewporter: clamp sub-pixel overflow (#11845)
Clamps the pending wp_viewport source rect back inside the attached buffer when it misses by <= 1 px, so if clients request something that falls within the 256-increment wl_fixed_from_double precision error it’s still treated as valid.
2025-09-27 20:14:43 +02:00
ItsOhen
6f1d2e771d
config: fix rules with no parameters not being counted as invalid (#11849)
Quite a big whoopsie to insert invalid rules.

Also adds special: cases.
2025-09-27 01:04:22 +02:00
ItsOhen
ae445606e2
config: allow negative to be used with tags. (#11779) 2025-09-26 18:19:53 +02:00
Nikolai Nechaev
4f3dd1ddb4
config: fix gesture dispatcher parsing with whitespaces (#11784)
* config: fix gesture dispatcher parsing with whitespaces

Some dispatcher functions (e.g., `moveFocusTo`) expect the given string to be
stripped of whitepsaces.

This fixes `gesture` line parsing: rather than calling dispatcher functions
with the original string, we reuse words parsed by `CConstVarList` and join
them with a comma.

* tests/gestures: Add a test for `movecursortocorner`
2025-09-26 15:49:07 +02:00
ItsOhen
d8f615751a
config: support more than 1 window rule per rule line. (#11689)
Adds support for specifying multiple rules in one line
2025-09-26 00:33:58 +02:00
João V. Farias
7ce451d20c
renderer: disable anti-aliasing on cursor:zoom_factor (#6135) (#11828)
use nearest-neighbor filtering for cursor scaling to avoid blurriness
2025-09-25 21:14:04 +02:00
Tom Englund
5212099b9f
layout: avoid nullptr deref (#11831)
OPENINGON can be a nullptr and that makes FLOATEDINTOTILED to nullptr
deref and segfault.
2025-09-25 15:30:04 +02:00
Tom Englund
8cce3b98ce
shm: refactor to UP and correct m_data check (#11820)
use unique pointers and rvalue references where applicable, buffer is
still a shared pointer because CHLBufferReference uses it to hold it
locked.

in CSHMPool destructor add a check for m_data != MAP_FAILED same in
resize, because mmap returns (void *) -1 on failure and that is not
comparable to nullptr. delete default constructor so we dont end up in
weird states with m_data.
2025-09-25 01:44:33 +02:00
Tom Englund
683fc77f80
hyprctl: nullptr guard --systeminfo (#11822)
running Hyprland --systeminfo from a console/tty calls systemInfoRequest
without us having a g_pCompositor or g_pHyprOpengl, so just if check them
and make --systeminfo not segfault and atleast print what info we can.
2025-09-25 01:44:07 +02:00
Vaxry
ec9a72d9fb
workspaces: fix persistence with no monitor specified (#11807) 2025-09-23 21:08:30 +02:00
omar
31bd9ec417
foreign-toplevel: continue past skipped invalid windows (#11804) 2025-09-23 19:50:57 +02:00
Nikolai Nechaev
29b103c376
exec: Spawn processes as direct children (#11735)
* exec: Spawn processes as direct children

Spawn processes as children rather than grandchildren.
This way, spawned processes may track Hyprland's state
by watching their parent, either directly or indirectly
(e.g., Linux's `PR_SET_PDEATH_SIG`).

Fixes #11728

* tests/exec: Add the test on process spawning

Add a test that ensures that:
- A spawned process remains a direct child of Hyprland;
- Upon termination, the process does not become a zombie.
2025-09-23 19:32:48 +02:00