From cf9a7f13f4e928a8814e9b3efdbd0382472c73a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Mon, 16 Sep 2024 23:38:37 -0300 Subject: [PATCH] Minor bug fix. --- src/docs/HISTORY.md | 2 +- src/lib/mrvFl/mrvSaveImage.cpp | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/docs/HISTORY.md b/src/docs/HISTORY.md index 359037ed9..4444f88b2 100644 --- a/src/docs/HISTORY.md +++ b/src/docs/HISTORY.md @@ -130,7 +130,7 @@ v1.2.5 - SECOND RE-RELEASE: Added toggle between showing OCIO or COLOR information in topbar in OCIO menu. - Input Color Space and Look setting are now stored with each clip. However, - you cannot compare two clips (say in a wipe) with different display settings. + you cannot compare two clips (say in a wipe) with different OCIO settings. - Made Image/Previous and Image/Next not appear when a single image or movie was loaded. - Fixed typo when saving session files which would prevent them from being diff --git a/src/lib/mrvFl/mrvSaveImage.cpp b/src/lib/mrvFl/mrvSaveImage.cpp index ae5f81491..260509208 100644 --- a/src/lib/mrvFl/mrvSaveImage.cpp +++ b/src/lib/mrvFl/mrvSaveImage.cpp @@ -30,13 +30,12 @@ namespace fs = std::filesystem; #include "mrvFl/mrvSaveOptions.h" #include "mrvFl/mrvIO.h" +#include "mrvUI/mrvDesktop.h" + #include "mrvApp/mrvSettingsObject.h" #include "mrViewer.h" -#include -#undef None - namespace { const char* kModule = "save"; @@ -342,17 +341,18 @@ namespace mrv GLenum imageBuffer = GL_FRONT; -#ifdef FLTK_USE_WAYLAND // @note: Wayland does not work like Windows, macOS or // X11. The compositor does not immediately // swap buffers when calling view->flush(). - if (fl_wl_display()) + if (desktop::Wayland()) { imageBuffer = GL_BACK; } -#else - view->make_current(); -#endif + else + { + view->make_current(); + } + glReadBuffer(imageBuffer); CHECK_GL; @@ -422,7 +422,6 @@ namespace mrv { fs::rename(fs::path(filename), fs::path(file)); } - tcp->unlock(); } catch (const std::exception& e) { @@ -433,6 +432,7 @@ namespace mrv view->setFrameView(ui->uiPrefs->uiPrefsAutoFitImage->value()); view->setHudActive(hud); view->setPresentationMode(presentation); + tcp->unlock(); auto settings = ui->app->settings(); if (file::isReadable(file))