summaryrefslogtreecommitdiff
path: root/src/helpers/Monitor.hpp
Commit message (Collapse)AuthorAgeFilesLines
* renderer: allow tearing with DS with invisible cursors (#13155)UjinT342026-02-071-4/+4
|
* monitor: fix DS deactivation (#13188)UjinT342026-02-041-0/+1
|
* protocols/cm: Fix image description info events (#12781)UjinT342026-01-131-3/+8
| | | | | | | | | | | | | | | | | | | | | | | * 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
* fix: handle fullscreen windows on special workspaces (#12851)John Mylchreest2026-01-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* cm: allow force disabling WCG and HDR per monitor (#12733)UjinT342025-12-281-6/+6
|
* render/cm: various updates, remove old protocols (#12693)UjinT342025-12-271-2/+2
| | | | | | | | | | | | | * fix named primaries * default to gamma22 * mark mastering primaries as supported * remove xx-cm and frog support * immutable primaries and image descriptions * clang-format
* Desktop/history: Move history to desktop (#12676)Vaxry2025-12-201-4/+0
|
* renderer: add zoom with detached camera (#12548)jmanc32025-12-141-0/+3
|
* desktop: cleanup, unify desktop elements as views (#12563)Vaxry2025-12-081-1/+3
|
* renderer/cm: make needsHDRupdate per-monitor state (#12564)byddha2025-12-071-0/+1
| | | Co-authored-by: drzbida <55928036+drzbida@users.noreply.github.com>
* desktop: rewrite reserved area handling + improve tests (#12383)Vaxry2025-12-051-23/+24
|
* layout: include reserved area in float fit (#12289)Vaxry2025-11-131-0/+1
| | | Ref https://github.com/basecamp/omarchy/issues/3327
* protocols: add Fifo-v1 and commit-timing-v1 (#12052)Tom Englund2025-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* renderer/cm: allow gamma 2.2 instead of sRGB EOTF (#12094)Dominick DiMaggio2025-10-291-1/+3
|
* monitor/dpms: fix possible invalid stateVaxry2025-10-271-0/+3
| | | | | | If dpms gets immediately re-enabled, a commit could fail, not schedule any frames anymore, and the monitor would be stuck off. Fix this by adding a timer to retry if commit fails. ref #12045
* hyprctl: include color management presets and sdr information (#12019)Filip Mikina2025-10-241-15/+4
| | | | | | * move string parsing for eCMType to its own namespace, similar to how `src/protocols/types/ContentType.cpp` is done * expose cm type and sdr settings in `hyprctl monitors`, format floats to .2f
* renderer/cm: add more monitor cm options (#11861)UjinT342025-09-291-0/+3
| | | Adds more cm options for monitors: DCIP3, Apple P3, Adobe
* renderer: asynchronously load background tex (#11749)Vaxry2025-09-181-0/+3
| | | | | | | Bumps required hyprgraphics to 0.1.6 --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* solitary: fix check for config error (#11733)Vaxry2025-09-171-3/+4
| | | Adds a blocker for solitary optimizations if there is a hyprerror present
* renderer: Fix CM for DS and SDR passthrough (#11503)UjinT342025-08-291-46/+57
|
* internal: Solitary clients with single subsurface & verbose ↵UjinT342025-08-221-0/+65
| | | | | solitary/tearing/DS checks (#11228) Adds more verbose checks for various conditional rendering mechanisms
* hdr: scRGB, HLG and SDR -> HDR fixes (#11499)UjinT342025-08-221-0/+5
|
* hdr: fix overrides and missing edid hdr metadata (#11476)UjinT342025-08-191-3/+3
|
* renderer: improve modeset timings (#11461)Vaxry2025-08-171-1/+4
| | | | | some CRTCs will just happily eat frames and we can't do much. Some will eat one. Adds a 5-frame buffer to DPMS and Added animations. Better than nothing.
* renderer: add dpms animations (#11452)Vaxry2025-08-171-0/+6
|
* renderer: improve zoom in anims (#11453)Vaxry2025-08-161-0/+3
| | | Removes `animations:first_launch_animation` as it's useless now
* monintor: remove rathandlerTom Englund2025-07-111-1/+0
| | | | is this even used? lets just remove it.
* core: use new typed signals from hu (#10853)outfoxxed2025-07-081-5/+5
|
* Renderer: Implement new render scheduling (#10936)Vaxry2025-07-081-1/+4
| | | | | | | | | Implements a new render scheduling method, where we triple buffer when necessary. Enabled by default, improves FPS on underpowered devices. --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* renderer: add mouse zoom animations (#10882)aphelei2025-07-011-0/+2
| | | Adds animations for the mouse zoom effect.
* renderer/cm: Add automatic hdr (#9785)UjinT342025-06-231-0/+1
|
* config/monitor: Add monitor v2 HDR rules (#10623)UjinT342025-06-151-2/+27
|
* renderer: fixup some missing fadeout cases with specialVaxry2025-06-111-0/+4
| | | | | | | | | | fixes some fadeout missing cases: - closing last window - closing above fs - closing in general fixes #10283
* monitor: ensure autoDir is applied when changed (#10672)Kamikadze2025-06-071-0/+1
|
* core: add auto-center arrangements (#10527)Nikolaos Karaolidis2025-05-271-1/+5
| | | Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
* helpers: refactor class member vars (#10218)davc0n2025-04-301-78/+76
|
* render: properly release rendered buffers (#9807)Ikalco2025-04-301-4/+1
| | | | | | | | | * cleanup eglSync * properly release buffers in renderer * add renderingDoneCallback and use it in screencopy * use static constructor for CEGLSync
* time: move to stl's clocks and move timerVaxry2025-04-161-1/+1
|
* screencopy, render: Use explicit sync for screencopy (#9697)Lee Bousfield2025-03-221-2/+1
| | | | | | | * screencopy, render: Use explicit sync for screencopy * screencopy: Check if explicit sync is enabled * screencopy: Don't require explicit KMS enabled
* syncobj: restore SHM buffer reset (#9675)Tom Englund2025-03-201-0/+2
| | | | | reset shm buffers early to mitigate stuttering animations, also reuse the monitors eglSync and store the eglsync per monitor. this however reintroduces flickering in dbeaver nonsyncobj application.
* renderer: only commit hw cursor stuff if needed (#9654)Ikalco2025-03-171-0/+1
|
* syncobj: use eventfd instead of stalling fd checks (#9437)Tom Englund2025-03-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* renderer: add simple color management (#9506)UjinT342025-03-141-11/+26
| | | Adds proper color management and transformations for CM surfaces.
* internal: fix include paths (#9500)Tuur Vanhoutte2025-02-271-1/+1
| | | | | * Fix include path in Monitor.hpp * fix more includes
* protocols: Support wp color management proto (#9444)UjinT342025-02-261-32/+34
| | | Adds support for the recently merged w-p CM protocol alongside the (now deprecated) old CM WIP protocols
* monitor: report a scheduled frame when tearing on cursor moveVaxry2025-02-151-0/+1
|
* core: begin using CFileDescriptor from hyprutils (#9122)Tom Englund2025-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * config: make fd use CFileDescriptor make use of the new hyprutils CFileDescriptor instead of manual FD handling. * hyprctl: make fd use CFileDescriptor make use of the new hyprutils CFileDescriptor instead of manual FD handling. * ikeyboard: make fd use CFileDescriptor make use of the new CFileDescriptor instead of manual FD handling, also in sendKeymap remove dead code, it already early returns if keyboard isnt valid, and dont try to close the FD that ikeyboard owns. * core: make SHMFile functions use CFileDescriptor make SHMFile misc functions use CFileDescriptor and its associated usage in dmabuf and keyboard. * core: make explicit sync use CFileDescriptor begin using CFileDescriptor in explicit sync and its timelines and eglsync usage in opengl, there is still a bit left with manual handling that requires future aquamarine change aswell. * eventmgr: make fd and sockets use CFileDescriptor make use of the hyprutils CFileDescriptor instead of manual FD and socket handling and closing. * eventloopmgr: make timerfd use CFileDescriptor make the timerfd use CFileDescriptor instead of manual fd handling * opengl: make gbm fd use CFileDescriptor make the gbm rendernode fd use CFileDescriptor instead of manual fd handling * core: make selection source/offer use CFileDescriptor make data selection source and offers use CFileDescriptor and its associated use in xwm and protocols * protocols: convert protocols fd to CFileDescriptor make most fd handling use CFileDescriptor in protocols * shm: make SHMPool use CfileDescriptor make SHMPool use CFileDescriptor instead of manual fd handling. * opengl: duplicate fd with CFileDescriptor duplicate fenceFD with CFileDescriptor duplicate instead. * xwayland: make sockets and fds use CFileDescriptor instead of manual opening/closing make sockets and fds use CFileDescriptor * keybindmgr: make sockets and fds use CFileDescriptor make sockets and fds use CFileDescriptor instead of manual handling.
* core,hyprctl: clang, clang-tidy, typo fixes and dtors changes (#9233)Honkazel2025-01-301-2/+1
| | | | | | | * declare dtor once + DMABBUF typo fix * dup include + clang moment * linux-dmabuf: last minute nit change
* monitor: round refresh rates in sorting modesVaxry2025-01-291-2/+2
| | | | fixes #9209
* renderer/internal: stop using box pointersVaxry2025-01-261-2/+2
| | | | in favor of const refs