Commit graph

585 commits

Author SHA1 Message Date
e5d2e8aafe
e 2025-12-18 16:43:33 +00:00
b9399c2a9d
cf 2025-12-17 20:10:41 +00:00
6be13e950a
debug: move to hyprutils' logger 2025-12-17 20:08:47 +00:00
9aa313402b
protocols/datadevice: avoid double leave
ref https://github.com/hyprwm/Hyprland/discussions/12494
2025-12-11 00:50:45 +00:00
efe665b455
protocols/compositor: fix null deref on unassigned surface image desc
ref #12603
2025-12-08 22:49:53 +00:00
Vaxry
920353370b
desktop: cleanup, unify desktop elements as views (#12563) 2025-12-08 15:04:40 +00:00
Dominick DiMaggio
532ca053d6
renderer/cm: higher-quality tonemapping (#12204) 2025-12-07 17:58:49 +00:00
SAM
d5c52ef58e
renderer/cm: fix typo on color simage description op (#12551)
fix: typo on color simage description op
2025-12-05 14:11:52 +00:00
UjinT34
3cf0280b11
renderer: add quirks:prefer_hdr to fix HDR activation for some clients (#12436) 2025-12-03 01:30:43 +00:00
SASANO Takayoshi
a51918fd27
src/protocols/types/DMABuffer.cpp: <sys/ioctl.h> is required for ioctl(), not only linux (#12483) 2025-11-27 15:52:04 +00:00
Tom Englund
4036e35e73
protocols/lock: fix missing output enter on surface (#12448) 2025-11-26 22:12:17 +00:00
Tom Englund
210930bef9
buffers: revert state merging (#12461)
8e8bfbb0b1 added fifo and merged non
buffer states before comitting them, something about certain xwl non
buffer commits expects a commit to happend and causes regressions as in
low fps.
2025-11-25 22:51:51 +00:00
Nikolai Nechaev
40d8fa8491
compositor: Configurable behavior when window to be focused conflicts with fullscreen (#12033)
Renames `misc:new_window_takes_over_fullscreen` into
`misc:on_focus_under_fullscreen` and implements the following behavior:

- By default, when a tiling window is being focused on a workspace where
  a fullscreen/maximized window exists, respect
  the `misc:on_focus_under_fullscreen` config variable.
2025-11-25 22:44:26 +00:00
703394affb
protocols/workspace: avoid crash on inert outputs 2025-11-25 13:35:25 +00:00
79a2781923
protocols/workspace: fix crash in initial group sending
fixes #12419
2025-11-21 14:46:05 +00:00
Vaxry
c2670e9ab9
windowrules: rewrite completely (#12269)
Reworks the window rule syntax completely

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2025-11-17 18:34:02 +00:00
b77cbad502
screencopy: fix possible crash in renderMon() 2025-11-12 22:43:46 +00:00
usering-around
c330d4334f
renderer: fix noscreenshare layerrule popups (#12260) 2025-11-11 20:42:53 +00:00
Tom Englund
cadf922417
presentation: only send sync output on presented (#12255)
as protocol states there is two events. 'presented' or 'discarded'.

wp_presentation_feedback::sync_output
As presentation can be synchronized to only one output at a time, this event tells which output it was.
This event is only sent prior to the presented event.
2025-11-11 20:00:59 +00:00
Dominick DiMaggio
b2ea6b010c
renderer: Allow DS for surfaces with inert subsurfaces (#12133) 2025-11-11 12:18:15 +00:00
Aurelle
0bd11d5eb9
protocols/layershell: do not raise protocol error if layer surface is not anchored (#12241) 2025-11-09 15:59:14 +00:00
nikromen
06b37c3907
protocols/outputMgmt: fix wlr-randr by defering success event until monitor reloads (#12236)
wlr-randr disconnects immediately after receiving success event, but
before applying the monitor configuration. This causes the state to be
lost when performMonitorReload() is called.

By postponing the success event until the call of the hook
monitorLayoutChanged we ensure the configuration to remain valid during
the reload process.
2025-11-08 23:45:53 +00:00
Amadej Kastelic
1ca6058bda
chore: fix non-relative imports (#12228) 2025-11-06 20:32:08 +00:00
Tom Englund
8e8bfbb0b1
protocols: add Fifo-v1 and commit-timing-v1 (#12052)
* protocols: add Fifo-v1

introduce fifo-v1

* fifo: only present locked surfaces

dont present to unlocked surfaces and commit pending states from the
fifo protocol.

* fifo: cformat

cformat

* protocols: add committiming and surface state queue

introduce CSurfaceStateQueue and commit-timing-v1

* fifo: schedule a frame if waiting on barrier

if we are waiting on a barrier the state doesnt commit until the next
refresh cycle meaning the monitor might have no pending damage and we
never get onPresented to unlock the barrier, moment 22. so schedule a
frame.

* fifo: properly check monitor intersection

check for m_enteredoutputs or monitor intersection if client hasnt bound
one yet, and dont fifo lock it until the surface is mapped.

* buffer: try to merge states before committing them

try to merge states before committing them meaning way less churn and
surface commits if a surface sends multiple small ones while we wait for
buffer readyness from either fifo locks or simply fences.

* buffer: dont commit states past the buffer

certain changes are relative to the buffer attached, cant go beyond it
and apply those onto the next buffer.

* buffer: set the lockmask directly

cant use .lock since the state hasnt been queued yet, set the lockmask
directly when exporting buffer fence.

* fifo: dont fifo lock on tearing

dont fifo lock on tearing.

* buffer: queue the state directly

queue the state directly and use the .lock function instead of directly
modify the lockMask on the state.

* buffer: revert creating texture at commit time

fifo barriers introduces such long wait that upon commit time a
race happends with current xdg configure implentation that the buffer
and image is actually destroyed when entering commitState, doing it at
buffer creation time with EGL_PRESERVED_KHR means it sticks around until
we are done. so revert 82759d4 and 32f3233 for now.

* buffer: rename enum and lockreasons

eLockReason and LOCK_REASON_NONE.

* fifo: workaround direct scanout lock

workaround cursor commits causing fifo to get forever locked, this
entire thing needs to be worked out.
2025-11-06 13:25:49 +00:00
André Silva
d82538c69f
protocols/dmabuf: handle null pointer in CLinuxDMABufV1Protocol::resetFormatTable (#12207) 2025-11-04 15:13:50 +00:00
Matteo Golinelli
8e9add2afd
sessionlock: fix crash when sendScale is called on a disconnected (#12171) 2025-10-31 00:15:18 +00:00
Vaxry
5e6cec962c
cursor: refactor override handling (#12166)
much cleaner and more reliable. Should fix https://github.com/hyprwm/Hyprland/issues/12088
2025-10-31 00:14:08 +00:00
83a0a62004
protocols/core: round dnd drop surface box 2025-10-29 17:20:44 +00:00
Dominick DiMaggio
17d0d696be
screencopy: wait longer to re-enable DS (#12135) 2025-10-26 18:57:20 +00:00
748d2f656e
xdg-shell: implement invalid parent errors 2025-10-26 12:34:35 +00:00
d560c26419
internal: fix cf 2025-10-21 22:47:06 +01:00
MithicSpirit
59ff7b2f89
dispatchers: add forceidle (#11922)
The forceidle dispatcher resets all ext-idle-notify timers as if the
user had been idle for the specified number of seconds. If a
notification has already fired, but would now be set with a nonzero
delay, then it is reset. Conversely, if a timer has not yet fired, but
would now be set to a nonpositive delay, then it is immediately fired.
This process ignores any existing inhibitors, but timers are otherwise
reset as normal if any new inhibitors are created or destroyed.
2025-10-19 13:54:27 +02:00
Bang Lee
39d62e1487
protocols: fix output power protocol not sending mode confirmation (#12072)
Use setDPMS() instead of directly manipulating m_dpmsStatus to ensure the dpmsChanged event fires and protocol
clients receive mode change confirmation via sendMode().
2025-10-18 20:44:55 +02:00
Virt
ab11af9664
ext-foreign-toplevel: remove stale entries when remapping (#12037) 2025-10-15 14:37:39 +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
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
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
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
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
UjinT34
76d998743a
cm: handle inert cm outputs (#11916) 2025-10-04 00:35:22 +02: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
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
UjinT34
4d82cc5957
internal: fix clang-tidy "errors" (#11862) 2025-09-29 13:10:15 +01: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
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
omar
31bd9ec417
foreign-toplevel: continue past skipped invalid windows (#11804) 2025-09-23 19:50:57 +02:00
0xFMD
26f293523a
renderer: add "noscreenshare" layer rule (#11664) 2025-09-22 12:26:14 +01:00
Vaxry
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