File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ namespace {
2222QS_LOGGING_CATEGORY (logBuffer, " quickshell.wayland.buffer" , QtWarningMsg);
2323}
2424
25+ void WlBufferRequest::reset () { *this = WlBufferRequest (); }
26+
2527WlBuffer* WlBufferSwapchain::createBackbuffer (const WlBufferRequest& request, bool * newBuffer) {
2628 auto & buffer = this ->presentSecondBuffer ? this ->buffer1 : this ->buffer2 ;
2729
@@ -53,7 +55,8 @@ bool WlBufferManager::isReady() const { return this->p->mReady; }
5355 << " (disabled: " << dmabufDisabled << ' )' ;
5456
5557 for (const auto & [format, modifiers]: request.dmabuf .formats ) {
56- qCDebug (logBuffer) << " Format" << dmabuf::FourCCStr (format);
58+ qCDebug (logBuffer).nospace () << " Format " << dmabuf::FourCCStr (format)
59+ << (modifiers.length () == 0 ? " (No modifiers specified)" : " " );
5760
5861 for (const auto & modifier: modifiers) {
5962 qCDebug (logBuffer) << " Explicit Modifier" << dmabuf::FourCCModStr (modifier);
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ struct WlBufferRequest {
6868 dev_t device = 0 ;
6969 StackList<DmaFormat, 1 > formats;
7070 } dmabuf;
71+
72+ void reset ();
7173};
7274
7375class WlBuffer {
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ void HyprlandScreencopyContext::onToplevelDestroyed() {
6464void HyprlandScreencopyContext::captureFrame () {
6565 if (this ->object ()) return ;
6666
67+ this ->request .reset ();
68+
6769 this ->init (this ->manager ->capture_toplevel_with_wlr_toplevel_handle (
6870 this ->paintCursors ? 1 : 0 ,
6971 this ->handle ->object ()
Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ void WlrScreencopyContext::onScreenDestroyed() {
6565void WlrScreencopyContext::captureFrame () {
6666 if (this ->object ()) return ;
6767
68+ this ->request .reset ();
69+
6870 if (this ->region .isEmpty ()) {
6971 this ->init (manager->capture_output (this ->paintCursors ? 1 : 0 , screen->output ()));
7072 } else {
You can’t perform that action at this time.
0 commit comments