3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-02-04 13:35:32 +00:00
Commit Graph

6814 Commits

Author SHA1 Message Date
fec17e5e79 desktop/ruleApplicator: fix typo in border color rule parsing (#12995)
ref https://github.com/hyprwm/Hyprland/discussions/12746
2026-01-16 16:43:25 +01:00
eff484b96c core: optimize some common branches 2026-01-16 16:40:48 +01:00
2e697ce2bf cmakelists: don't require debug for tracy 2026-01-16 16:26:58 +01:00
0b13d398fe desktop/window: avoid uaf on instant removal of a window
ref https://github.com/hyprwm/Hyprland/discussions/12999
2026-01-16 09:11:21 +01:00
ac9df44788 desktop/workspaceHistory: fix tracking for multiple monitors (#12979) 2026-01-15 17:00:47 +01:00
e0cf88809d protocols/cm: Fix image description info events (#12781)
* fix image description info events

* always send some target primaries

* set edid values as target primaries and luminances

* init monitor image description

* set default luminances for tf

* fix BT1886 luminances

* fix mastering values and overrides

* set maxCLL & maxFALL

* typo

* add FALL & CLL to preferred HDR image description

* fix ref luminances
2026-01-13 16:44:36 +01:00
e43f949f8a shm: ensure we use right gl unpack alignment (#12975)
gl defaults to 4 and not all formats is divisible with 4 meaning its
going to pad out ouf bounds and cause issues. check if the stride is
divisible with 4 otherwise set it to 1, aka disable it.

GL_UNPACK_ALIGNMENT only takes 1,2,4,8 but formats like RGB888 has
bytesPerBlock 3.
2026-01-13 16:42:31 +01:00
8d03fcc8d7 protocols/syncobj: fix DRM sync obj support logging (#12946) 2026-01-12 18:28:08 +01:00
5e18111121 renderer: shader code refactor (#12926)
* shader: begin the shader refactor

make SShader a class and rename it to CShader, move createprogram,
compileshader, logshadererror to CShader.

* shader: move uniform creation to CShader

move uniform creation to CShader, reduces tons of duplicated effort,
however forcing uniform names to be same in all shaders.

* shader: move to array based frag handling

use an array with an enum so it gets easier dealing with multiple
shaders, move creating program to a for loop and array, reduces line of
code a lot.

* shader: use shared ptr for frags

with smart pointers we can now rename useProgram to useShader and return
the shader directly, means only place we have to decide the shader frag
is when calling useShader. easier for future shader splitting to reduce
branching.

* shader: move unneded public members to private

move structs and uniforms to private add a get/set for initialtime
and add a getUniformLocation to make the code tell what its doing,
instead of direct array getting when all we wanted to get was its value,
also limits the setting of uniformLocations to the createProgram as it should
be.

* shader: fix style nits

set first enum member to 0 , remove extra {}

* shader: dont show a failed notif on success

the logic got inverted in the refactor here.

* shader: split CM shader to rgba/rgbx variants

split shader to rgba/rgbx variants, use bool, and reduce branching.

* shader: split up blurprepare CM and non CM

split up blurprepare, remove skipcm, move gain to gain.glsl.
remove ternary operator and reduce branching by using step() and mix()
use vec3 for gain, make brightness a cheap mulitplication with max.

* shader: split up border to CM/noncm variants

splitup border shader to CM/noncm variant, move common used things to
border.glsl , there is room for optimisations here but its a complex
shader im putting it for future PR.

* shader: touchup blurfinish

make brightness a cheap multiplication instead of branching.
mod is redundant, fract in hash already returns a value in [0.0, 1.0]
2026-01-12 18:27:16 +01:00
fbf421df88 LICENSE: update year 2026-01-11 16:13:52 +01:00
8f8b31e7a6 decoration: take desiredExtents on all sides into account (#12935) 2026-01-10 20:53:57 +01:00
81e7498ec2 nix: add hyprland-uwsm to passthru.providedSessions
Fix issue with displayManager `defaultSession` not accepting the
stringsince it's missing from the lookup it does
with`passthru.providedSessions`.
2026-01-10 01:09:41 +02:00
fa41c8229d desktop/window: track explicit workspace assignments to prevent X11 configure overwrites (#12850)
* fix: track explicit workspace assignments to prevent X11 configure overwrites

Instead of only checking for special workspaces, track when workspaces are
explicitly assigned via window rules or user actions (movetoworkspace).
This prevents onX11ConfigureRequest from overwriting any explicit workspace
assignment based on window position.

Changes:
- Add m_workspaceExplicitlyAssigned flag to CWindow
- Set flag when window rules assign workspace
- Set flag when user moves window via dispatcher
- Check flag in onX11ConfigureRequest instead of just special workspace
- Add debug logging for explicit workspace assignments

* fix: simplify X11 configure request handling for special workspaces

X11 apps send configure requests with positions based on XWayland's
monitor layout, which could incorrectly move windows off special
workspaces.

Skip workspace reassignment when the window is on a special workspace
or staying on the same monitor, but always run z-order, fullscreen flag,
and damage logic since the configure request may include geometry changes.
2026-01-09 19:25:37 +01:00
5b1b79c29c fix: handle fullscreen windows on special workspaces (#12851)
* fix: handle fullscreen windows on special workspaces

inFullscreenMode() only checked m_activeWorkspace, missing fullscreen
windows on special workspaces. This caused crashes and incorrect
behavior when fullscreen windows were on special workspaces.

Changes:
- inFullscreenMode() now checks special workspace first since it
  renders on top of regular workspaces
- Added getFullscreenWindow() helper to safely get fullscreen window
  from either active or special workspace
- Updated callers (shouldSkipScheduleFrameOnMouseEvent, Renderer,
  getFSImageDescription) to use the new helper
- Reset m_aboveFullscreen for layer surfaces when opening, closing,
  or stealing special workspaces between monitors

* test: add special workspace fullscreen detection tests

Add tests for the new special workspace fullscreen handling introduced
in the previous commit. The tests cover:

1. Fullscreen detection on special workspace - verifies that a window
   made fullscreen on a special workspace is correctly detected

2. Special workspace fullscreen precedence - verifies that when both
   regular and special workspaces have fullscreen windows, the special
   workspace window can be focused when the special workspace is opened

3. Toggle special workspace behavior - verifies that toggling the
   special workspace off properly hides it and returns focus to the
   regular workspace's fullscreen window

These tests exercise the key code paths modified in the fix:
- inFullscreenMode() checking special workspace first
- getFullscreenWindow() helper returning correct window
- Layer surface m_aboveFullscreen reset on special workspace toggle
2026-01-08 22:27:00 +01:00
eb623bd91d animationMgr: avoid uaf in ::tick() if handleUpdate destroys AV
ref https://github.com/hyprwm/Hyprland/discussions/12840
2026-01-08 22:22:58 +01:00
3dcaadbdf5 desktop/ls: fix invalid clamp 2026-01-08 22:22:58 +01:00
a649dbe4c4 main: add watchdog-fd and safe-mode options to help message (#12922)
Additionally, don't print the "you're not using start-hyprland" warning when using `--verify-config`
2026-01-08 17:50:11 +01:00
f767782e3f desktop/reservedArea: clamp dynamic types to 0
ref https://github.com/hyprwm/Hyprland/discussions/12880
2026-01-08 12:25:39 +01:00
f54dd4da4a desktop/reservedArea: clamp to 0
ref https://github.com/hyprwm/Hyprland/discussions/12880
2026-01-08 12:24:29 +01:00
3aa4e02720 config: don't crash on permission with a config check
ref #12872
2026-01-08 12:19:22 +01:00
8368566044 start: use nixGL if Hyprland is nix but not NixOS (#12845)
---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2026-01-08 10:57:56 +01:00
918e2bb9be renderer/gl: add internal gl formats and reduce internal driver format conversions (#12879)
* format: add internal formats for drm formats

cross referenced with weston and added internal formats and types for a
lot of missing ones. also added a isFormatYUV helper.

* framebuffer: ensure we use right internalformat

ensure we use the right internal format to avoid internal driver
blitting, also since we only attach the GL_STENCIL_ATTACHMENT we might
just aswell only use the GL_STENCIL_INDEX8 to not confuse drivers that
we want a depth aswell.

* texture: use external on yuv or non linear mods

using external makes us use the gpu's internal detiler.
and this is makes intel a lot happier then having to format convert it
to a linear format internally.

* shaders: add external support to CM frag

add external support to CM frag, and correct ext.frag typo.

* formats: remove duplicates and fix a typo in cm.frag

remove duplicate formats and a typo in cm.frag

* formats: add swizzle logic to all formats

add swizzle logic from weston for all formats and use it in shm texture
paths.

* format: more format changes

use monitor drm format instead of forcing something different.

* shader: remove external from cm.frag

drivers want this resolved at compiletime cant use both
samplerExternalOES and sampler2d and then runtime branch it.

* screencopy: swizzle textures in screencopy

swizzle textures in screencopy, to get the right colors when copying.

* screencopy: restore old behaviour

try restore old behaviour before the gles3 format changes.
glReadPixels had the wrong format, so i went to far trying to mitigate
it. should be like before now.
2026-01-07 19:53:42 +01:00
wbg
a383ca1866 groupbar: added group:groupbar:text_padding (#12818)
Co-authored-by: Roman Weinberger // ACL <roman.weinberger@acl.at>
2026-01-07 16:52:02 +01:00
f1652b2951 start: add parent-death handling for BSDs (#12863)
* Add parent-death handling for BSDs

prctl() is a system call specific to Linux. So we cannot use it on BSDs.

FreeBSD has a system call procctl() which is similar to prctl(). We can
use it with PROC_PDEATHSIG_CTL.

OpenBSD, NetBSD, and DragonFly BSD do not appear to have a similar
mechanism. So intead of relying on a system call, we need to manually
poll ppid to see if the parent process has died.

With the changes, the spawned Hyprland process is terminated when the
launcher process exits, matching Linux behavior as closely as possible
on BSD platforms.

* Remove ppid polling on OpenBSD, NetBSD, and DragonFly BSD
2026-01-06 14:38:25 +01:00
cbfbd9712a anr: open anr dialog on parent's workspace (#12509) 2026-01-06 14:29:17 +01:00
9817553c66 config: return windowrulev2 layerrulev2 error messages (#12847) 2026-01-06 00:00:14 +01:00
6fce2d7288 renderer/opengl: invalidate intermediate FBs post render, avoid stencil if possible (#12848) 2026-01-05 22:37:54 +01:00
107275238c desktop/ls: clamp layer from protocol 2026-01-05 18:53:29 +01:00
3b77c784e2 protocols/contentType: fix missing destroy 2026-01-05 18:53:29 +01:00
d46df728fd protocols/contentType: fix typo in already constructed check 2026-01-05 18:53:29 +01:00
8eb3ecc755 input/TI: avoid UAF in destroy 2026-01-05 18:53:29 +01:00
97c8a2f1cf protocolMgr: remove IME / virtual input protocols from sandbox whitelist 2026-01-05 18:53:29 +01:00
a492fa3866 desktop/window: catch bad any cast tokens 2026-01-05 18:53:29 +01:00
e165f84184 core/compositor: immediately do readable if adding waiter fails for scheduling state 2026-01-05 18:53:29 +01:00
686eda9d48 eventLoop: remove failed readable waiters 2026-01-05 18:53:29 +01:00
70c5fe5cd8 systemd/sdDaemon: fix incorrect strnlen 2026-01-05 18:53:29 +01:00
32978176b1 systemd/sdDaemon: initialize sockaddr_un 2026-01-05 18:53:29 +01:00
1761909bca mainLoopExecutor: fix incorrect pipe check 2026-01-05 18:53:29 +01:00
7d8f57083e testers: add missing #include <unistd.h> (#12862)
FreeBSD clang needs the header to be included for read(), write(),
pipe(), close(), etc.
2026-01-05 16:42:35 +01:00
a3c8533d74 subprojects: bump tracy 2026-01-05 12:57:40 +01:00
0b3b012817 framebuffer: revert viewport (#12842)
to much stuff are relying on the viewport being set like this, just
revert it to not regress further. this needs a overhaul.
2026-01-04 11:44:19 +01:00
583c4074a5 [gha] Nix: update inputs 2026-01-03 21:12:46 +00:00
922e53c68c pluginsystem: fix crash when unloading plugin hyprctl commands (#12821) 2026-01-03 22:11:05 +01:00
17bc3b83db renderer/fb: dont forget to set m_drmFormat (#12833)
fab3370 accidently removed the setting of m_drmFormat, causing it to
think format changed on each alloc.
2026-01-03 16:48:43 +01:00
fab3370254 renderer: minor framebuffer and renderbuffer changes (#12831)
* framebuffer: dont release if format or size changes

we dont have to release and recreate both the texture and framebuffer if
size or format changes, we can just bind the texture and call glTexImage2D
with the new format and size.

* framebuffer: set the alloced viewport size

if monitor size mismatch with the allocated m_size its going to set a
mismatched viewport and cause rendering issues. and if they are
mismatching there is a missing alloc call.

* renderbuffer: cleanup unneded binds

the renderbuffer is attached to the fbo and trying to rebind it in
bind() is causing unnecessery state changes, just bind the fbo.

add safeguard in the destructor, the constructor can return early on
failure and leave m_rbo empty or m_image as EGL_NO_IMAGE_KHR.
2026-01-03 15:13:01 +01:00
ee67278038 hyprerror: fix horizontal overflow and damage box (#12719)
* hyprerror: fix horizontal overflow and damage box

* hyprerror: remove redundant m_queued preservation logic

The logic to save and restore m_queued into a temporary string 'q' was redundant because m_queued is explicitly cleared at the end of createQueued() (line 164). Restoring it to a non-empty state would cause createQueued() to be called every frame in draw(), which is not the intended behavior for the static error bar.

* Fixes style
2026-01-02 20:10:47 +01:00
b9bd9d147f desktop/layerRuleApplicator: fix an epic c+p fail
ref https://github.com/hyprwm/Hyprland/discussions/12779
2026-01-02 18:17:35 +01:00
ec4beb1b39 core/xwaylandmgr: fix min/max clamp potentially crashing 2026-01-02 14:06:46 +01:00
31d3181e1e dekstop/window: read static rules before guessing initial size if possible (#12783) 2026-01-01 21:49:57 +01:00
9b93d621b1 desktop/window: use workArea for idealBB (#12802) 2026-01-01 16:48:23 +01:00