3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-08-18 02:51:23 +00:00
Commit Graph

7721 Commits

Author SHA1 Message Date
f7daeb7f79 hyprctl: random Lua-adjacent fixes (#15767)
* hyprctl(repl): go interactive if no Lua was given via args

The previous check would mess up if `-i` was provided, since it'd see
*an argument* and refuse to go interactive, even when it should've (i.e.
`hyprctl -i 0 repl`).

* ipc(socket1): new escape parsing for batch commands

Semicolons are still the command separator, so those have to be escaped
if they appear anywhere inside of commands (e.g. multi-statement Lua
code). Also, literal backslashes need to be escaped as well.

* tests(ipc): add test for hyprctl batch mode

This test case includes slightly weird stuff (semicolons in Lua code;
square brackets) that would break the old parsing logic.

* format: dang braces
2026-08-09 20:00:17 +02:00
b20621d48b layout: pinned floating windows now retain their last position (#15784)
information when changing workspaces (fixes not reverting to the last
position after exiting fullscreen)
2026-08-09 15:46:47 +02:00
5dee44a724 [gha] Nix: update inputs 2026-08-08 22:23:34 +00:00
0e98ddc9c3 render/cm: re-send HDR metadata when its content changes (#15761)
Compare the metadata we would send against what is already committed and
send if there is any difference.

Found this testing whether MaxCLL influences in-panel tonemapping.
setHDRMetadata was only called when the monitor entered or left HDR or
in some cases surrounding direct scanout. Changes to the metadata itself
while the monitor stayed in HDR was computed and stored in the image
description, but never sent.

This particularly effects mastering data and min/max/max_avg luminance
changes.

Signed-off-by: Will Temple <will@wtemple.net>
2026-08-09 00:21:00 +02:00
05819c4ad6 tests: prefer SPAWN_KITTY over Tests::spawn_kitty in tests (#15754)
* tests: Recommend using macros instead of Tests::{spawnKitty,spawnLayerKitty}

* tests: Replace `Tests::spawnKitty` with `SPAWN_KITTY` where possible
2026-08-09 00:20:47 +02:00
dcd544e422 input: no keyboard exclusivity during dnd (#15780) 2026-08-09 00:20:16 +02:00
5b1c0fda73 renderer/fp16: fix blur clear and invalidate (#15791)
the clear was scissored to m_renderData.damage while we fakeDamaged full
monitor. so in render pass when m_blurFBShouldRender is hit the FB was
cleared over partial damage but rendered over whole monitor causing
stale blur blends into the new outside damage. so save old damage,
render fakeDamage, restore old damage.

invalidate({GL_DEPTH_STENCIL_ATTACHMENT}) at end of
renderTextureWithBlurInternal cant set m_cleared = false because its not
invalidated the COLOR_ATTACHMENT, so guard invalidate.
2026-08-08 22:46:26 +02:00
006bcc69a1 config/lua: display dispatcher names in binds list and when stringifying (#15722) 2026-08-08 22:41:40 +02:00
a2636192b5 shaders: fix gradient NaN on out of gamut colors (#15793)
GLSL pow(x, y) gives undefined results for x < 0, use float
multiplication as exampled by the Oklab creator himself.
2026-08-08 14:51:54 +02:00
65be579e9c tests: fix subtest shortcutLongPress from keybinds tests (#15783)
* fix subtest shortcutLongPress from keybinds tests

* fix clang format
2026-08-07 23:17:57 +02:00
face6d144b core/fullscreen: set pos/size of all group members to the same value when FSing groups (#15577)
* Fix group members not having uniform size when FSed

* fix the same bug - but for scrolling

* format

* fix include

* ditto

* groups are evil

* format

* TEST - Default handled FS -- tested in dwindle

Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>

* TEST - Default handled FS -- tested in scrolling

Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>

* TEST - layout handled FS -- Scrolling

Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>

* format and comment fix

* spelling is hard

* slight fix for posterity

* spelling is very hard

* thankyouclangdverycool

* revert change that made all windows in a group show up as FS in hyprctl clients

* change test to reflect the reversion

* mirror mirror can you tell me who forgot to revert that change after it was redundant?

* tribute to the magic mirror

* clean up includes

* format

* Hope is the first step on the road to disappointment

Fix tests failing

---------

Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
2026-08-07 16:53:28 +02:00
7d4a3c5768 codeowners: set erstarr to codeowners for fullscreen related stuff (#15752) 2026-08-06 15:13:29 +02:00
5bec961bb4 internal: remove duplicate call to fullscreen function (#15745) 2026-08-06 15:08:58 +02:00
4ffd88e5e6 buffer: dont drop damage until actually read (#15718)
we cant drop dmabuf damage until we have actually hit a frame that reads
it, otherwise clients like firefox attaches a buffer with damage,
eventually sends a .frame() and .commit() then we clear the damage and
the render has nothing to use.
2026-08-06 15:04:55 +02:00
64962f89e4 renderer/transformer: make window transformers adapt to viewport constraints (#15759) 2026-08-05 20:38:11 +02:00
cab296c38b protocols/bell: play a sound by default (#15502)
---------

Co-authored-by: thompty <tatthompson44@gmail.com>
2026-08-05 15:16:20 +02:00
db95de4f5b config/lua: clean up HLMonitor:set_workspace() and set_special_workspace() (#15534)
* lua: make HLMonitor:set_workspace "silent" (no focus or mouse move)

* lua: report correct function name when HLMonitor:set_special_workspace errors

* monitor: allow setting special workspace on monitor without focusing that monitor

* lua: make HLMonitor:set_special_workspace also "silent"

* workspace: support not carrying focus with us in moveWorkspaceToMonitor

This leaves focus on the same monitor, rather than carrying it along
with the moved workspace as usual.

* lua: fix HLMonitor:set_workspace placing the same WS on different monitors

I thought this was already handled for me; apparently not.

* lua: support creating new workspaces via HLMonitor:set_workspace(), set_special_workspace()

* monitor: don't send workspace events on non-focusing workspace change

* lua: better handle (non-)?special selectors in HLMonitor:set_workspace(), set_special_workspace()

Both now check that they're given a workspace of the appropriate
special-ness.

* lua: don't require a table arg for HLMonitor:set_workspace(), set_special_workspace()

Also, names given to `set_special_workspace()` no longer require a
`special:` prefix, matching the toggle_special dispatcher's behavior.

* misc: allow getting workspaces relative to a given monitor

Not just the currently focused one.

* lua: reference targeted monitor for relative WS selectors in set_workspace()

Now, e.g. `m+1` selects the next workspace on the *targeted* monitor,
rather than on the focused monitor.

* tests: HLMonitor:set_workspace() behavior

* tests: HLMonitor:set_special_workspace() behavior

* tests: don't force unnecessary refreshes in luaGetWorkspace test

* lua: return workspace name as selector for special workspaces

Previously this would be the ID, which was negative and would then be
interpreted later as a *relative* ID. Normal workspaces can still return
their (positive) IDs, that's fine.

* monitor: properly leave focus behind when stealing a special workspace
2026-08-05 14:10:45 +02:00
5aacb62147 desktop/windowRule: add no_wobble window rule and workspace rule (#15735) 2026-08-05 14:09:01 +02:00
d10194c63b keybinds: refactor, clean up code, move to new style (#15568) 2026-08-05 13:26:45 +02:00
91f29f23bb flake.lock: update, drop glaze version requirement 2026-08-05 02:10:08 +03:00
961c6df0dd desktop/rules: fix gaps_out rule overriding float_gaps (#15662)
* desktop/rules: fix gaps_out rule overriding float_gaps

* test for distinct tiled and float gaps
2026-08-04 22:16:47 +02:00
fa45db49c6 hdr: reset surface metadata on change (#15598)
if we dont reset surface metadata, the monitor is stuck in using the
surfaces metadata, and doesnt restore back ours. meaning after DS and
gaming and returning, colors stay stuck fringed until a new metadata
modeset.

however this causes a modeset on returning that isnt wanted if a
notification temporarly shows and vanishes. but a future PR in perhaps
using a timer if DS reenters in a short bit we dont care about the notif
fringing?

better then leaving the monitor permanently wrong colors.
2026-08-04 22:14:55 +02:00
10d320fde6 committiming: release for intersected monitors (#15744)
some clients never binds an output, so check for intersection like fifo
does aswell.
2026-08-04 22:14:24 +02:00
ea95499cd7 hyprctl: fix wiki strings (#15739)
do not keep raw URLs, those can change. Just direct the user.
2026-08-04 14:33:39 +02:00
1bf16447d7 config/monitorRuleManager: recheck mirrors on ensure (#15733)
ref #15695
2026-08-04 14:33:26 +02:00
901881c9f2 render: always render in normal transform (#15714)
fixes a lot of effects needing to know about the output transform, screencopy, etc.
2026-08-04 14:33:08 +02:00
ef0d600e47 algo/scrolling: fix unFSing window sticking to the left corner instead of respecting focus_fit_method (#15716)
ref #15715
2026-08-04 13:14:34 +02:00
c82ff80fde hyprctl/repl: support multiline interactive input (#15663)
* lua: include Lua's error code in eval/repl error responses

* hyprctl: let interactive repl handle multiline input

repl with a simple command (i.e. Lua code provided as a hyprctl arg)
handles multiline input just fine already, but interactive didn't. This
uses the Lua repl's own approach of trying to execute, and letting the
user continue if the exec attempt returns an "unexpected EOF"-type
syntax error. It's a little clunky, but if it's fine for them, it should
be fine for us.

Ref: 7579fc9d7e/lua.c (L569-L582)

* hyprctl: append full multiline command to repl history

* fix format :(

* lua: fix crash on print with no args

Co-authored-by: Dregu <dregu@dreg.us>

---------

Co-authored-by: Dregu <dregu@dreg.us>
2026-08-04 13:13:14 +02:00
275e27704a layout/drag: add binds:drag_center_window (#15563)
* layout/drag: add binds:drag_center_window

* drag: add m_dragHotspot and map it proportionally on size change

* tests/drag: add tests for binds:drag_center_window
2026-08-04 11:41:26 +02:00
78e2f9b6d1 desktop/hitTest: exclusive layer popup event handling (#15729)
Native wayland popups attached to layers with keyboard interactivity set
to exclusive didn't receive any mouse event, the layer was eating it
all.

In practice this resulted in many popups outright closing on click,
since very often clicking outside of the popup makes the application
close the popup.

Only affects applications making use of native wayland popups of course.
2026-08-03 23:46:47 +02:00
e2b2e6bcd4 core/fullscreen: fix floating window rendering order when one of them is FSed (#15703) 2026-08-03 23:36:27 +02:00
5c6f0aa2df debug/flame-graph: fix script for nixos 2026-08-03 12:35:10 +02:00
4d26628276 config: fix duplicate config value crash (#15708)
the constructor, and destructor already add and remove from the
registry() so bindInternal's push_back added duplicates, also
invalidating the iterators causing a crash on hyprctl reload full-reset
2026-08-02 17:09:21 +02:00
d056ca6fd1 renderer/wobble: fix artifacts on transformed (#15709) 2026-08-02 16:35:53 +02:00
41b0fffdec internal: reduce some profiled churn (#15705)
* fullscreen: resolve fs handlers once per query

getFullscreenHandlerName() resolved the handlers twice by calling
getFsHandler() for both the layout and default case, and getFsHandler()
itself re-walked the workspace algorithm chain on every call.

Resolve SFsHandlersForWorkspace once and pass it to an overload of
getFullscreenHandlerName(), derive layoutHandled from the resolved
handler name instead of a second layoutManagedFS() pass, and hoist the
repeated algorithm()/tiledAlgo()/floatingAlgo() lookups in
getFsHandlersForWorkspace() into locals.

* damage: compute the surface box once in damageSurface

getSurfaceBoxGlobal() was computed twice per damage event: once for the
frame scheduling hack and again inside computeDamage(). Compute it once
in damageSurface() and pass it into computeDamage(), which now takes the
box as an argument.

* sync: check the timeline before making an eventfd

since most points are signaled when we reach this, we reduce the
churn of making eventfd, ioctl, and poll + close.
2026-08-02 12:02:49 +02:00
88c6386994 chore: replace string concatenation with std::format (#15652)
* chore: replace string concatenation with std::format

* Fix " Preserve the root API prefix when formatting" suggestion

* Fix missing slash; add explicit getenv safety check
2026-08-01 18:02:50 +02:00
2f9169f05f renderer/wobble: fix wobble on transformed outputs (#15694)
* renderer/wobble: fix wobble on transformed outputs

* sc
2026-08-01 18:01:50 +02:00
3906d66afc screenshare: fix toplevel capture missing software cursor (#15638)
* screenshare: fix toplevel capture cursor

* rename arguments to reflect purpose
2026-08-01 13:44:23 +02:00
ac82a9c2e8 bindings/dispatchers: Don't inherit key state modmask during key sym lookup (#15401)
* bindings/dispatchers: Don't inherit key state modmask during key sym lookup

Discussion: https://github.com/hyprwm/Hyprland/discussions/14772

In some cases, such as with bind -> sendshortcut, the key sym lookup
will fail resulting in a 'key not found' error when the cached xkb
state is used for lookup.

This can happen if, for example, the SHIFT key is bound in `hl.bind`.
Consider the following case, where SHIFT+1 is mapped to 2:

```lua
hl.bind("SHIFT + 1", hl.dsp.send_shortcut({mods = "", key = "2"}))
````

`resolveKeycode` will fail to lookup 2 because SHIFT is depressed in
the modmask.

Here, I've modified the lookup to use a fresh key state with no modmask.

After lookup, `ConfigActions::pass` will clear the modmask before
sending keys anyway, so an empty modmask can be used for lookup
in `resolveKeycode` safely.

* hyprtester/plugins: Update xkb state for test keyboard

* hyprtester/plugins: Add keybind_modmask plugin

This is different than keybind/keybind2 in that it takes a list of mods,
and applies the mods to the xkb state as well, which the other two do not.

* hyprtester/tests: Add set_shortbut bind tests involving SHIFT

---------

Co-authored-by: Max Asnaashari <max@masnax.org>
2026-08-01 13:27:09 +02:00
1ea103b5e5 renderer: enable fp16 by default when supported (#15668)
* renderer: enable fp16 by default when supported

this enables fp16 by default when supported on 10bit monitors.
also remove invalidate_fp16 config option and just make a general
debug:invalidate_buffers thats on by default, if "debugging" is
required.

* config: deprecate debug:invalidate_fp16

add deprecation notice for invalidate_fp16

* compositor: add notif warning on startup if no fp16

warn about missing fp16 gpu support on startup.

* core: add fp16 to systeminfo output

add fp16 info if suppported or not in systeminfo.
2026-08-01 13:24:52 +02:00
69f8789d7f layout/scrolling/fullscreen: minor improvements ontop of 15660 (#15685) 2026-08-01 12:37:59 +02:00
2effd2da48 algo/scrolling: bring back old behavior of fs (#15660) 2026-08-01 00:11:11 +02:00
cfecc57436 config/values: fixup shadow limits (#15682) 2026-07-31 22:36:28 +02:00
3ead449076 proto/wayland: dont check cursor buffer scale (#15674)
apparently libwayland is broken by design, contradicting their own
protocols.
2026-07-31 21:20:11 +02:00
ff672deb68 config: add deprecation notices (#15669) 2026-07-31 21:10:39 +02:00
ab6499d292 core/fullscreen: allow layout managed fullscreens to not block seeking window in direction, and other fixes (#15569) 2026-07-31 21:09:50 +02:00
584df4c390 [gha] Nix: update inputs 2026-07-31 17:13:35 +00:00
e8a6164298 renderer: implement window wobble (#14920)
Adds a new window transformer, and wobble framework.
2026-07-31 19:11:53 +02:00
8668a53921 ipc/socket1: don't round/truncate hyprctl monitors scale (#15628)
Scale is a precise number that may be read back by certain tools via
`hyprctl monitors -j` so it's important to not lose any precision to
avoid non-integer pixel counts when scaling certain display sizes.

e.g.

    3840 / 1.33333 = 2880

    1.33333 -> 1.33

    3840 / 1.33 = 2887.22 (!!!)

Fixes: https://github.com/hyprwm/Hyprland/discussions/15151

Signed-off-by: Joe Groocock <me@frebib.net>
2026-07-30 20:07:17 +02:00
6ebaccd11e opengl: invalidate depth too (#15657)
previously we tried using stencil only GL_STENCIL_INDEX8 but some
drivers just simply sucks and gave us incomplete framebuffers. so we are
actually creating GL_DEPTH24_STENCIL8 but disabling the depth with glDisable(GL_DEPTH_TEST);

but this means we need to invalidate the depth too, even if we really
didnt use it.
2026-07-30 19:46:53 +02:00