Commit graph

73 commits

Author SHA1 Message Date
31e025dbe0 desktop/window: refactor over fullscreen state 2026-04-29 22:05:32 +01:00
55a1611fd8 desktop/window: expand hidden into proper states 2026-04-29 22:05:32 +01:00
a92dae5af7 desktop/window: add alpha container for alpha calculations 2026-04-29 22:05:32 +01:00
ImperishableSecret
e61976233e
workspace: remove deprecated and unused members (#14198)
Clean up CWorkspace by removing deprecated m_defaultFloating, m_defaultPseudo, and unused m_wlrCoordinateArr
2026-04-28 22:56:18 +01:00
Vaxry
94b90a2cb0
config/lua: add ExpressionVec2, allow using a table for vec2 rules (#14197) 2026-04-28 18:10:25 +01:00
xxyangyoulin
b5d0519ccd
desktop/view: fix SIGABRT in CWindow::onUnmap when monitor is expired (#14148)
m_monitor is a WP<CMonitor> (weak_ptr). In onUnmap(), calling
m_monitor->activeWorkspaceID() without .lock() causes SIGABRT when
the monitor has been destroyed before the XWayland unmap event
arrives, e.g. when a window on a special workspace is unmapped.
2026-04-27 13:22:34 +01:00
Vaxry
5ba33f8461
config/lua: init lua config manager, use lua if available (#13817)
Adds a new lua config manager, which will automatically be used if there is a lua config present.
2026-04-26 15:16:36 +01:00
Mihail Costea
e12d2b7cc8
input: implement follow_mouse_shrink (#13707)
* input: implement follow_mouse_shrink

Add a new config option `input:follow_mouse_shrink` (INT, 0-300, default 0)
that shrinks inactive window hitboxes by the specified number of pixels for
focus detection purposes. This creates a dead zone in gaps between windows
where moving the cursor will not trigger a focus change.

The shrink only applies to inactive (non-focused) windows and only during
mouse-move focus checks (follow_mouse = 1). Click and scroll interactions
are unaffected — clicking on a window in the shrunk area still works
normally once the window is focused.

Closes #9973

* tests: add integration test for follow_mouse_shrink
2026-04-20 16:56:30 +01:00
Visal Vijay
24b121c7a3
cleanup: avoid repeated weak_ptr lock() calls in conditions (#14057) 2026-04-12 17:57:06 +01:00
Lucas Zanoni⠀⠀⠀⠀⠀ ⠀╱|、 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ (˚ˎ 。7 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ |、˜〵 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀じしˍ,)ノ
fe369dd9fb
input: fix focus_on_close=2 (MRU) routing to cursor path instead of getNextCandidate (#13969) 2026-04-12 17:30:29 +01:00
0448e707fc desktop/popup: cache tree count 2026-04-07 12:07:36 -04:00
8a97b11b22 desktop/popup: cache popup extents
caches popup extents in the head to avoid potentially expensive traversals
2026-04-07 12:07:36 -04:00
Anubhav
bf97fac9b9
subsurface: use geometry-aware damage and recurse into nested trees (#13933)
* subsurface: use geometry-aware damage and recurse into nested trees

Replace per-surface damageSurface() calls in recheckDamageForSubsurfaces()
with box-based damage that tracks each subsurface's last known global
position and size. When geometry changes, both the old and new areas are
damaged to correctly clear stale pixels and paint the new location.

Additionally, recurse into child subsurfaces so that nested subsurface
trees are properly damage-checked, with a depth limit of 32 to guard
against cycles. Cached geometry is invalidated on map/unmap to avoid
stale comparisons across surface lifecycle transitions.

* clang-format
2026-04-05 16:54:56 +01:00
Andreas Backx
8edb7c5663
xwayland: pipe through monitor in coordinate mapping (#13700)
* xwayland: prefer monitor-aware hover coords

Introduce monitor-aware XWayland coordinate helpers and keep the X11 hover path anchored to the main surface box while preserving detailed debug logging, reducing dependence on nearest-monitor guesses in layout-sensitive input paths.

* xwayland: use window monitor for reported coords

Report X11 window positions through the window's known monitor instead of the generic nearest-monitor heuristic so boundary-aligned outputs keep stable XWayland coordinates.

* xwayland: use window monitor for real position restore

Convert XWayland geometry back into compositor space using the window's current monitor when available so vertically offset layouts do not round-trip through the wrong output.

* xwayland: use window monitor for unmanaged geometry

Restore override-redirect X11 geometry through the window's known monitor so helper windows and popups avoid nearest-monitor misclassification on offset layouts.

* xwayland: remove monitor conversion debug logging

Drop the temporary XWayland hover and coordinate conversion diagnostics now that the monitor-selection bug is confirmed and the window-monitor based conversions fix the issue.

* xwayland: drop unrelated focused-motion change

Remove the exploratory X11-specific pointer focus scaling from InputManager so the monitor mapping fix stays narrowly scoped to the XWayland coordinate conversion changes that actually resolve the bug.

* clang-format XWaylandManager
2026-04-05 16:54:38 +01:00
3c88ac8ead desktop/window: optimize getRealBorderSize() 2026-04-04 19:00:34 -04:00
Vaxry
29cf6264a2
desktop/window: reduce window deco updates (#13980)
AVARDAMAGE_ENTIRE doesn't mean the geometry changed, so no point in an expensive update
2026-04-04 14:06:07 +01:00
f25473b21b
render: fix layer blur_popups ignoring ignore_alpha when blur is off (#13947) 2026-04-02 22:36:58 +01:00
UjinT34
38a7f03cf0
renderer: refactor part 7: api fixes (#13631)
Part 7 of ujin's refactors

---------

Co-authored-by: Vaxry <vaxry@vaxry.net>
2026-03-28 21:41:45 +00:00
Vaxry
83d3babd4e
desktop/reserved: do not crash on invalid box init (#13880)
ref #13879
2026-03-28 21:38:10 +00:00
xxyangyoulin
6226f3b197
desktop/window: guard null monitor in xwaylandSizeToReal (#13876) 2026-03-28 19:07:49 +00:00
Vaxry
2c4852e31f
renderer/deco: add glow decoration (#13862) 2026-03-27 14:08:56 +00:00
Blue
a595d0e3c3
layersurface: simulate mouse movement on layer change (#13747) 2026-03-21 23:39:42 +00:00
Vaxry
8726a7363e
config: cleanup the entire config infrastructure (#13785)
Massively refactors the config infrastructure, sorely
needed and will be req'd for the lua stuff
2026-03-20 17:52:37 +00:00
UjinT34
aef76309d8
layershell: fix popup crash with nullptr mon (#13763) 2026-03-17 14:59:44 -04:00
ItsOhen
9f599e3165
window/rules: add scrolling_width (#13754) 2026-03-17 12:43:53 -04:00
Kon
be96e06a96
view: consolidate group flags and apply window rules (#13694)
* view: consolidate group flags and apply window rules

Replace individual boolean flags with a bitmask for group policies and ensure that window-specific group rules are correctly inherited when windows are initialized or added to a group.

* tests: add cases for locked groups and invade rule

Add tests to verify window grouping behavior, specifically checking that locked groups prevent merging by default and that the 'invade' group rule correctly overrides this lock policy.
2026-03-17 09:10:53 -05:00
ItsOhen
94bd4123c6
desktop/rules: fix static rules and content type. (#13725)
Hopefully for the last time in a while. Also a lot easier to add in new
static types with the recheck done in window map instead of the rule.
2026-03-15 14:32:05 -05:00
UjinT34
966f20d305
renderer: refactor resources and flags (#13471) 2026-03-07 13:13:34 +00:00
justin4046
4c60d9df70
desktop/rules: fix empty workspace handling (#13544) 2026-03-05 15:14:05 +00:00
c11cadd8d6
desktop/window: don't group modals 2026-03-03 21:00:33 +00:00
André Silva
edf7098345
desktop/window: fix floating windows being auto-grouped (#13475)
---------

Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
2026-03-03 20:56:02 +00:00
Vaxry
7299a3b0d5
hyprctl: fix workspace dynamic effect reloading (#13537)
ref https://github.com/hyprwm/Hyprland/discussions/12806
2026-03-03 13:03:47 +00:00
André Silva
fe0a202137
desktop/group: respect direction when moving window out of group (#13490) 2026-03-02 21:12:27 +00:00
André Silva
e333a330c0
desktop/group: fix movegroupwindow not following focus (#13426) 2026-02-28 18:19:29 +00:00
Vaxry
1c64ef06d9
desktop/window: fix idealBB reserved (#13421)
ref https://github.com/hyprwm/Hyprland/discussions/12766\#discussioncomment-15955638
2026-02-28 16:55:34 +00:00
623185170b
desktop/popup: avoid crash on null popup child in rechecking
ref #13352
2026-02-25 23:16:16 +00:00
Skidam
457617b5a3
xwayland: normalize OR geometry to logical coords with force_zero_scaling (#13359)
Fixes X11 popups, tooltips, and menus showing black boxes on scaled monitors with xwayland:force_zero_scaling = 1 #13334
2026-02-25 12:29:12 +00:00
Tom Englund
8ab4d1dc06
popup: check for expired weak ptr (#13352)
onCommit can destroy popups while the vector CPY still holds a weak ptr
to it, check if the weak ptr is still valid
2026-02-24 11:20:29 +00:00
Skidam
ae82a55400
view: send wl_surface.enter to subsurfaces of popups (#13353) 2026-02-24 11:20:04 +00:00
jmanc3
bc09504ea5
desktop/popup: fix use after free in Popup (#13335)
m_alpha was freed by fullyDestroy, but was then being touched because setCallbackOnEnd is activated by tick, which is the same function that updates animating variables

---------

Co-authored-by: Vaxry <vaxry@vaxry.net>
2026-02-23 16:58:06 +00:00
Vaxry
b88813c7ef
event: refactor HookSystem into a typed event bus (#13333)
Refactors the old HookSystem into a typed event bus with clear
separation,
discovery and types.
2026-02-22 23:30:10 +00:00
Ikalco
b4ee4674f9
protocols: implement image-capture-source-v1 and image-copy-capture-v1 (#11709)
Implements the new screencopy protocols
2026-02-22 12:30:11 +00:00
Vaxry
723870337f
layout: rethonk layouts from the ground up (#12890)
Rewrites layouts to be much smaller, and deal with much less annoying
BS. Improves the overall architecture, unifies handling of pseudotiling,
and various other improvements.
2026-02-21 21:30:39 +00:00
9ea6d0e15f
desktop/popup: only remove reserved for window popups 2026-02-19 17:41:17 +00:00
68456a5d9a
desktop/window: add stable id and use it for foreign 2026-02-19 00:49:43 +00:00
bea4dev
6716b8a0e3
xwayland: fix size mismatch for no scaling (#13263) 2026-02-15 17:50:03 +00:00
cfbbfb591a
popup: reposition with reserved taken into account
ref https://github.com/hyprwm/Hyprland/discussions/13194
2026-02-07 11:11:45 +00:00
Szwagi
cbeb6984e7
renderer: fix mouse motion in VRR (#12665) 2026-01-31 13:37:01 +00: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
John Mylchreest
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