summaryrefslogtreecommitdiff
path: root/src/managers/screenshare/ScreenshareSession.cpp
Commit message (Collapse)AuthorAgeFilesLines
* screenshare: round captureBox after scaling to fix region capture at ↵Tony Miller2026-05-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | fractional scales (#14257) After scaling m_captureBox from logical to pixel coordinates, the box may have non-integer dimensions (e.g. logical 401x301 at scale 1.25 -> pixel 501.25x376.25). m_bufferSize is then computed as captureBox.size() and sent to the client as int32 width/height (truncating the fraction), but m_bufferSize itself stays as a fractional Vector2D. When the client allocates the integer-sized buffer and submits it, CScreenshareFrame::share() rejects it with ERROR_BUFFER_SIZE because Vector2D::operator== is exact double comparison: (501, 376) != (501.25, 376.25). The frame is sent failed, and the client retries forever. The SHARE_WINDOW path already rounds its bufferSize; the SHARE_REGION path didn't. Round the captureBox immediately after scaling so all downstream consumers (m_bufferSize, render translates) see clean integer pixel coordinates. Reproducer at scale 1.25 on a 1920x1080 monitor: wf-recorder -g '500,200 401x301' -f /tmp/x.mp4 # "Failed to copy frame, retrying..." until exit wf-recorder -g '500,200 400x300' -f /tmp/x.mp4 # works (400*1.25=500, 300*1.25=375, both integer)
* screenshare: adjust session cleanup and event emission order (#14229)Eren2026-05-011-1/+1
| | | | | | | | | | | | | | | | * fix(screenshare): adjust session cleanup and event emission order Revised the handling of `stoppedListener` initialization in `getManagedSession` to ensure correct scoping and lifecycle management. Updated the `stop` method in `CScreenshareSession` to adjust the order of `screenshareEvents` and `stopped.emit()` to prevent potential use-after-free scenarios. * fix(screenshare): ensure managedSession removal uses consistent target reference This change updates the lambda in the stopped listener to use a pre-fetched target pointer for comparison when erasing sessions. * fix(screenshare): use early-return and smart ptr comparison in session cleanup
* renderer: refactor part 7: api fixes (#13631)UjinT342026-03-281-1/+1
| | | | | | | Part 7 of ujin's refactors --------- Co-authored-by: Vaxry <vaxry@vaxry.net>
* screencopy: check share session state (#13839)UjinT342026-03-251-0/+4
|
* screencopy: fix crash in screensharing toplevel with invalid handle (#13781)ssareta2026-03-191-0/+9
|
* renderer: refactor resources and flags (#13471)UjinT342026-03-071-2/+2
|
* screenshare: improve destroy logic of objects (#13554)Ikalco2026-03-051-2/+6
|
* screencopy: scale window region for toplevel export (#13442)Vaxry2026-02-281-1/+1
|
* event: refactor HookSystem into a typed event bus (#13333)Vaxry2026-02-221-5/+5
| | | | | Refactors the old HookSystem into a typed event bus with clear separation, discovery and types.
* protocols: implement image-capture-source-v1 and image-copy-capture-v1 (#11709)Ikalco2026-02-221-0/+162
Implements the new screencopy protocols