3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-02-04 17:15:39 +00:00
Commit Graph

6688 Commits

Author SHA1 Message Date
b965fb2a40 flake.lock: bump hyprutils 2025-10-09 08:35:34 +03:00
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
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
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
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
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
c3747fab56 hookSystem: fix anchoring in seekNewPageAddr()
otherwise we might miss the chance to get an anchor
2025-10-07 01:44:03 +01:00
dc72259a54 core/compositor: revert make wl_surface::frame follow pending states (#11896)
This reverts commit 17e77e0407.

Reverted due to severe performance degradation due to accumulating frame
callbacks
2025-10-06 23:44:47 +01:00
02cda6bebf systeminfo: log system package versions (#11946) 2025-10-06 23:20:21 +02:00
73f06434a4 keybinds: fix repeat and long press keybinds release (#11863) 2025-10-06 21:10:56 +02:00
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
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
76d998743a cm: handle inert cm outputs (#11916) 2025-10-04 00:35:22 +02:00
b7ef892ecf [gha] Nix: update inputs 2025-10-03 19:52:11 +00:00
f0b4164e2e cm: fix primaries to proto scale (#11914) 2025-10-03 21:50:57 +02:00
3bcfa94ee4 renderer: add render:non_shader_cm and fixes (#11900) 2025-10-02 12:05:54 +02:00
c467bb2640 renderer: fix popup fadeout blur (#11756)
popups dont get no xray
2025-10-02 12:01:16 +02:00
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
378438ffe7 config: increase default anr_missed_pings value
ref https://github.com/hyprwm/Hyprland/discussions/11884
2025-10-01 12:19:16 +01:00
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
8c54c9b412 protocols/cm: remove unneeded preferred ref (#11877) 2025-10-01 11:04:49 +01:00
38c1e72c9d rules: fix some monitor rules (#11873) 2025-09-29 20:10:34 +02:00
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
4d82cc5957 internal: fix clang-tidy "errors" (#11862) 2025-09-29 13:10:15 +01:00
43fb4753fc gestures: fix gesture direction detection (#11852) 2025-09-29 12:29:40 +01:00
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
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
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
c30036bdac CI/Arch: build hyprgraphics after hyprutils
Ensure no ABI breaks. Hyprgraphics depends on hyprutils.
2025-09-28 19:19:41 +03:00
766acadcf1 seat: release depressed modifiers on leave (#11854) 2025-09-28 00:05:30 +02:00
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
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
ae445606e2 config: allow negative to be used with tags. (#11779) 2025-09-26 18:19:53 +02:00
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
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
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
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
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
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
ec9a72d9fb workspaces: fix persistence with no monitor specified (#11807) 2025-09-23 21:08:30 +02:00
31bd9ec417 foreign-toplevel: continue past skipped invalid windows (#11804) 2025-09-23 19:50:57 +02:00
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
70a7047ee1 renderer: fix uv scaling detection (#11789) 2025-09-22 13:01:59 +01:00
26f293523a renderer: add "noscreenshare" layer rule (#11664) 2025-09-22 12:26:14 +01:00
45f007d412 ci: remove duplicate cp and redundant mkdir commands 2025-09-22 12:31:36 +03:00
22c8bc9b9b CI/Nix: Allow running CI in forks
Rather than hardcoding the repository name in the workflow file,
use a context value. This allows running workflows in forks.
2025-09-22 12:30:39 +03:00
26cbc67385 renderer: fix uv calculations once and for all (#11770)
fixes synchronization of ackd sizes, fixes wrong xdg stuff
2025-09-21 19:27:56 +02:00
41dad38177 config: fix multi-argument gesture dispatcher parsing (#11721)
* config: Fix multi-argument gesture dispatchers parsing

The `dispatcher` gesture handler used to only handle
the first argument to the dispatcher, while some dispatchers
(e.g., `sendshortcut`) want multiple arguments.

This fixes `ConfigManager` to handle all the arguments
provided to the dispatcher gesture handler.

Fixes #11684.

* test/gestures: Add a test for a gesture with a multi-argument dispatcher

* test/gestures: Factor out `waitForWindowCount`

Reduce code duplication in the gestures test.
2025-09-20 17:57:49 +02:00
838439080a vkeyboard: update cached mods before IME; add share_states = 2 config option (#11720) 2025-09-20 17:57:39 +02:00
6a88f2e880 monitors: auto apply suggested scale and notify the user. (#11753) 2025-09-20 17:42:02 +02:00