5937 Commits

Author SHA1 Message Date
phonetic112
e59680481d
input: Fix clicking through groupbar tabs (#9606) 2025-03-15 01:22:39 +01:00
André Silva
f4315db50f
nix: mesa -> libgbm (#9612)
d209d800b7
2025-03-14 20:24:55 +02:00
Vaxry
3cc8e8c6be renderer: don't crash if cm fails to compile 2025-03-14 15:20:08 +00:00
Vaxry
b37944605f protocols: fix include 2025-03-14 14:35:01 +00:00
Vaxry
f4995c1837 descriptions: remove allow_early_buffer_release 2025-03-14 14:14:10 +00:00
Tom Englund
6ffde36466
syncobj: use eventfd instead of stalling fd checks (#9437)
* syncobj: cleanup and use uniqueptrs

cleanup a bit missing removals if resource not good, erasing from
containers etc. make use of unique ptrs instead. and add default
destructors.

* syncobj: rework syncobj entirerly

remove early buffer release that was breaking explicit sync, the buffer
needs to exist until the surface commit event has been emitted and draw
calls added egl sync points, move to eventfd signaling instead of
stalling sync point checks, and recommit pending commits if waiting on a
signal. add a CDRMSyncPointState helper class. move a few weak pointers
to shared pointers so they dont destruct before we need to use them.

* syncobj: queue pending states for eventfd

eventfd requires us to queue pending stats until ready and then apply to
current, and also when no ready state exist commit the client commit on
the current existing buffer, if there is one.

* syncobj: clear current buffer damage

clear current buffer damage on current buffer commits.

* syncobj: cleanup code and fix hyprlock

remove unused code, and ensure we dont commit a empty texture causing
locksession protocol and gtk4-layer-shell misbehaving.

* syncobj: ensure buffers are cleaned up

ensure the containers having the various buffers actually gets cleaned
up from their containers, incase the CSignal isnt signaled because of
expired smart pointers or just wrong order destruction because mishaps.
also move the acquire/point setting to buffer attaching. instead of on
precommit.

* syncobj: remove unused code, optimize

remove unused code and merge sync fds if fence is valid, remove manual
directscanout buffer dropping that signals release point on pageflip, it
can cause us to signal the release point while still keeping the current
buffer and rendering it yet again causing wrong things.

* syncobj: delay buffer release on non syncobj

delay buffer releases on non syncobj surfaces until next commit, and
check on async buffers if syncobj and drop and signal the release point
on backend buffer release.

* syncobj: ensure we follow protocol

ensure we follow protocol by replacing acquire/release points if they
arrive late and replace already existing ones. also remove unneded
brackets, and dont try to manual lock/release buffers when it comes to
explicit protocol. it doesnt care about buffer releases only about
acquire and release points and signaling them.

* syncobj: lets not complicate things

set points in precommit, before checking protocol errors and we catch
any pending acquire/release points arriving late.

* syncobj: move SSurfaceState to types

remove destructor resource destroying, let resources destroys them on
their events, and move SSurfaceStates to types/SurfaceState.hpp

* syncobj: actually store the merged fd

have to actually store the mergedfd to use it.

* syncobj: cleanup a bit around fences

ensure the current asynchronous buffer is actually released on pageflip
not the previous. cleanup a bit FD handling in
commitPendingAndDoExplicitSync, and reuse the in fence when syncing
surfaces.

* syncobjs: ensure fence FD doesnt leak

calling resetexplicitfence without properly ensuring the FD is closed
before will leak it, store it per monitor and let it close itself with
the CFileDescriptor class.

* syncobj: ensure buffers are actually released

buffers were never being sent released properly.

* types: Defer buffer sync releaser until unlock

* syncobj: store directscanout fence in monitor

ensure the infence fd survives the scope of attemptdirectscanout so it
doesnt close before it should have.

* syncobj: check if if acquire is expired

we might hit a race to finish on exit where the timeline just has
destructed but the buffer waiter is still pending. and such we
removeAllWaiters null dereferences.

* syncobj: code style changes

remove quack comment, change to m_foo and use a std::vector and
weakpointer in the waiter for removal instead of a std::list.

* syncobj: remove unused async buffer drop

remove unused async buffer drop, only related to directscanout and is
handled elsewhere.

---------

Co-authored-by: Lee Bousfield <ljbousfield@gmail.com>
2025-03-14 15:08:20 +01:00
André Silva
c754d7963f
nix: remove wayland-protocols overlay and bump flake (#9613)
* flake.lock: update nixpkgs

* nix: remove wayland-protocols bump

* flake.lock: update

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2025-03-14 09:14:59 +02:00
UjinT34
8c97cb7858
renderer: add simple color management (#9506)
Adds proper color management and transformations for CM surfaces.
2025-03-14 00:15:18 +01:00
phonetic112
e86d3a14e4
groupbar: add an option to adjust gap sizes (#9578) 2025-03-12 15:09:09 +01:00
nyx
4b25fbe5fd
windows: respect noinitialfocus with workspace changes (#9586)
If a window is specifically placed on another workspace then we should
not "focus" that workspace even if the window itself never gets focused
when noinitialfocus is enabled for the window.
2025-03-11 18:32:01 +01:00
Vaxry
81e93acba4 groupbar: pass alpha to title tex render pass
ref #9598
2025-03-11 17:30:12 +00:00
Khalid J.
b21edb1a97 input: fix touch calibration matrix overriding
make the default behavior non-overriding to avoid overriding user-set
values elswehere.
2025-03-11 00:51:42 +00:00
MightyPlaza
e4af4b5e2e
core: update decorations on lockgroups (#9573)
modified:   src/managers/KeybindManager.cpp
2025-03-10 18:40:46 +01:00
Ikalco
d30cc19d25
renderer: skip ds commits if buffer didn't change (#9556)
this fixes direct scanout glitches by ensuring that attemptDirectScanout doesn't try to recommit the same buffer to AQ
which would cause a pageflip event and the backendRelease to release the same buffer too early
2025-03-08 20:24:22 +01:00
nyx
f15b49e0fd
core: prevent crash when monitor list is empty (#9572) 2025-03-08 20:14:03 +01:00
nyx
c544c5115c
windowrules: store floating size on close instead of resize (#9569) 2025-03-08 14:20:27 +01:00
nyx
b80b64cd6c
windowrules: add option to allow size persistence between app launches (#9422) 2025-03-08 02:12:02 +01:00
vaxerski
4082e876d5 [gha] Nix: update inputs 2025-03-07 22:56:23 +00:00
Lee Bousfield
8ce1665fdb
protocols: Fix blocked color management get_information (#9563) 2025-03-07 23:54:56 +01:00
nyx
7753e8ea68
keybinds): prevent crash when executing movewindoworgroup (#9551) 2025-03-06 23:08:57 +01:00
Vaxry
cb4230e1c2 touch: reject swipe on locked sessions
fixes #9542
2025-03-06 22:08:23 +00:00
nyx
7055d0c138
master: add option to keep master window position (#9537) 2025-03-06 23:06:05 +01:00
nyx
4435f5c546
input: fixup mouse check for flipping x / y (#9529) 2025-03-06 17:33:01 +01:00
Lee Bousfield
7a84317f33
protocols: Fix cursor shape protocol valid shape check (#9547) 2025-03-06 16:54:47 +01:00
Abdalrahman Shaban
2433760786
hyprctl: Error handling improvements, minor cleanups (#9536) 2025-03-06 00:50:28 +01:00
Matt White
b51ab182ae
socket2: add activespecialv2 (#9530) 2025-03-05 20:33:33 +01:00
nyx
d7e7a29261
input: add flip_x and flip_y for touchpad (#9481) 2025-03-03 21:56:01 +01:00
Ikalco
f1ef724a87
protocols: Ensure protocol dtors are called in ProtocolManager dtor (#9521) 2025-03-03 01:57:49 +01:00
Vaxry
474bfcbccd core: fix clang-format 2025-03-02 16:24:37 +00:00
Mihai Fufezan
905ca39bc9
nix/module: toHyprconf -> toHyprlang (#9221)
* nix/module: toHyprconf -> toHyprlang

Updated generator that will end up living in Nixpkgs' `lib/generators`.

* nix/module: use xdph package directly

The downstream module already applies hyprland's
finalPackage to the portalPackage.

* new lib

* lib: add flattenAttrs, remove category processing

Flattening attributes means we no longer need to process categories
separately. For all intents and purposes, they do not exist.

Simplify the codebase once again, while introducing an easy to grasp
recursive function.

Add a bit of documentation for toHyprlang, though I doubt it's clear
enough even now. Still needs proper NixDoc.

* lib: add proper NixDoc

* nix/lib: inherit from lib
2025-03-02 15:41:49 +02:00
Vaxry
3a21dd84b3 core: cleanup some smart pointer usage 2025-03-02 02:19:35 +00:00
Vaxry
e6be4af21f core: add default initializers for ccompositor ptrs 2025-03-02 02:16:24 +00:00
Vaxry
2c78867a98 core: cleanup window properties
they don't need to be in CConfigManager, and belong to window instead
2025-03-02 02:13:37 +00:00
phonetic112
2acbb59bf2
core: ignore internal move workspace calls if the workspace doesn't change (#9516) 2025-03-01 19:34:38 +01:00
Vaxry
11943f761e monitor: avoid crash on expired special workspace monitor owner
fixes #9477
2025-03-01 15:56:44 +00:00
Indy Ray
f148b96bea
input: Provide a non-zero time for button release triggered during window unmap. (#9513)
It doesn't seem that this is actually required, but it seems more consistant with other areas, such as in CVirtualKeyboardV1Resource::releasePressed.
2025-03-01 16:53:30 +01:00
Lee Bousfield
445337d03d
protocols: Fix IWaylandProtocol onDisplayDestroy m_pGlobal double-free (#9507) 2025-02-28 02:52:31 +01:00
Lee Bousfield
34f2a4713e
core: Add null activeWorkspace check in moveWorkspaceToMonitor (#9503) 2025-02-28 02:52:23 +01:00
Tuur Vanhoutte
d5920bc5da
internal: fix include paths (#9500)
* Fix include path in Monitor.hpp

* fix more includes
2025-02-27 00:56:11 +01:00
Vaxry
aee9b8ac19 protocols: fix relative include 2025-02-26 22:13:06 +00:00
Vaxry
32a3d84d74 protocols: fix wrong iface for xdg_dialog
fixes #9498
2025-02-26 20:49:31 +00:00
Soliprem
002cd91fbf
nix: wp-protocol version bump (#9494) 2025-02-26 19:36:24 +02:00
littleblack111
01f4074421
hyprctl/layers: print pid for layershell clients (#9468)
Adds a `getPID()` fn to layershell to print it in `hyprctl layers`
2025-02-26 16:03:06 +01:00
UjinT34
6787fe8933
protocols: Support wp color management proto (#9444)
Adds support for the recently merged w-p CM protocol alongside the (now deprecated) old CM WIP protocols
2025-02-26 15:56:37 +01:00
牧羊犬真Q
f0850905f0 cmake: add CXX_STANDARD_REQUIRED flag to ensure c++ version must be c++26 (#9476)
As the [cmake documentation](https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD_REQUIRED.html) said, when we use the CMAKE_CXX_STANDARD without CXX_STANDARD_REQUIRED, then the standard version we set will be an optional value, and may decay back to older c++ version. So I add this configuration into cmakelist to ensure c++ version is c++26.
2025-02-25 14:03:09 +00:00
Vaxry
d1ea18b492 hyprctl/config: fixup config descriptions, fill out missing ones, provide more data
adds current and explicit, better parsing, and fixes missing / invalid ones
2025-02-25 14:03:04 +00:00
Vaxry
73ae9790f9 hyprpm: add --hl-url for custom forks 2025-02-24 13:11:30 +00:00
nyx
3458d7ac93
xwayland: improve dnd and cleanup (#9405)
Minor changes to xwayland dnd / regular dnd to fix various issues

---------

Co-authored-by: Vaxry <vaxry@vaxry.net>
2025-02-24 03:52:10 +01:00
cyanbun96
e59464629f
config: fix a possible crash in the monitor config parser (#9460)
* Less crash-prone monitor config parser

* clang-format
2025-02-23 23:43:24 +01:00
littleblack111
2e81648980
internal: use isNumber from hyprutils (#9467) 2025-02-23 18:35:29 +01:00