diff --git a/laf b/laf index 02ed21d12..1597f3550 160000 --- a/laf +++ b/laf @@ -1 +1 @@ -Subproject commit 02ed21d1214ff913150fe3caf1470f2ee0dc6f14 +Subproject commit 1597f3550ad8cff3424a22b0deb1c49720dcb483 diff --git a/src/app/util/clipboard_native.cpp b/src/app/util/clipboard_native.cpp index 9dc1062da..5fac0059e 100644 --- a/src/app/util/clipboard_native.cpp +++ b/src/app/util/clipboard_native.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2020-2021 Igara Studio S.A. +// Copyright (C) 2020-2022 Igara Studio S.A. // Copyright (C) 2016-2018 David Capello // // This program is distributed under the terms of @@ -36,12 +36,28 @@ using namespace base::serialization::little_endian; namespace { clip::format custom_image_format = 0; + bool show_clip_errors = true; + + class InhibitClipErrors { + bool m_saved; + public: + InhibitClipErrors() { + m_saved = show_clip_errors; + show_clip_errors = false; + } + ~InhibitClipErrors() { + show_clip_errors = m_saved; + } + }; void* native_window_handle() { return os::instance()->defaultWindow()->nativeHandle(); } void custom_error_handler(clip::ErrorCode code) { + if (!show_clip_errors) + return; + switch (code) { case clip::ErrorCode::CannotLock: ui::Alert::show(Strings::alerts_clipboard_access_locked()); @@ -301,6 +317,10 @@ bool Clipboard::getNativeBitmap(doc::Image** image, bool Clipboard::getNativeBitmapSize(gfx::Size* size) { + // Don't show errors when we are trying to get the size of the image + // only. (E.g. don't show "invalid image format error") + InhibitClipErrors inhibitErrors; + clip::image_spec spec; if (clip::get_image_spec(spec)) { size->w = spec.width; diff --git a/src/clip b/src/clip index c46c49141..2ada8b17b 160000 --- a/src/clip +++ b/src/clip @@ -1 +1 @@ -Subproject commit c46c49141f72dd753b260eea4e6d7b37413f0ff6 +Subproject commit 2ada8b17b39bf41a669248a2be5c6e4be4c27f14 diff --git a/src/tga b/src/tga index 16b8bb25e..d537510d9 160000 --- a/src/tga +++ b/src/tga @@ -1 +1 @@ -Subproject commit 16b8bb25e34bfb0193609012257502be62539d35 +Subproject commit d537510d98bc9706675746d132fa460639254a78 diff --git a/src/ui/graphics.h b/src/ui/graphics.h index 03a980be3..437ba0925 100644 --- a/src/ui/graphics.h +++ b/src/ui/graphics.h @@ -30,7 +30,7 @@ namespace gfx { namespace os { class DrawTextDelegate; - class Sampling; + struct Sampling; } namespace ui {