mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 03:39:51 +00:00
Redraw window immediately on "live resizing"
This commit is contained in:
parent
4ae6d12fe0
commit
d0b39ebade
2
laf
2
laf
@ -1 +1 @@
|
||||
Subproject commit 6ace65197891e0e0c79e0e96d7b39daacc56e364
|
||||
Subproject commit 39ff91256cc64808bcf735c6d755a1746f841b3a
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2020 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2021 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -177,7 +177,9 @@ void Console::printf(const char* format, ...)
|
||||
// static
|
||||
void Console::showException(const std::exception& e)
|
||||
{
|
||||
ui::assert_ui_thread();
|
||||
// TODO called from Session::deleteBackup() which is run in background thread
|
||||
//ui::assert_ui_thread();
|
||||
|
||||
if (!ui::is_ui_thread()) {
|
||||
LOG(ERROR, "A problem has occurred.\n\nDetails:\n%s\n", e.what());
|
||||
return;
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2020 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2021 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -203,6 +203,21 @@ int init_module_gui()
|
||||
if (maximized)
|
||||
main_display->maximize();
|
||||
|
||||
// Handle live resize too redraw the entire manager, dispatch the UI
|
||||
// messages, and flip the display.
|
||||
main_display->handleResize =
|
||||
[](os::Display* display) {
|
||||
manager->invalidate();
|
||||
|
||||
Message* msg = new Message(kResizeDisplayMessage);
|
||||
msg->setRecipient(manager);
|
||||
msg->setPropagateToChildren(true);
|
||||
manager->enqueueMessage(msg);
|
||||
|
||||
manager->dispatchMessages();
|
||||
manager->flipDisplay();
|
||||
};
|
||||
|
||||
// Set graphics options for next time
|
||||
save_gui_config();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user