chore: disable show animation for sw platform

This commit is contained in:
justforlxz.com 2019-06-25 15:13:44 +08:00
parent 4f4d20744c
commit 207911ecbe
No known key found for this signature in database
GPG Key ID: 593AFD577C1B1A60
2 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,7 @@ if (${EXIT_CODE} EQUAL 0)
if (${ARCHITECTURE} STREQUAL "sw_64")
# add compiler flags -mieee for mathmatic
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mieee")
add_definitions(-DDISABLE_SHOW_ANIMATION)
endif()
endif()

View File

@ -304,7 +304,14 @@ void MainWindow::initComponents()
void MainWindow::compositeChanged()
{
const bool composite = m_wmHelper->hasComposite();
// NOTE(justforlxz): On the sw platform, there is an unstable
// display position error, disable animation solution
#ifndef DISABLE_SHOW_ANIMATION
const int duration = composite ? 300 : 0;
#else
const int duration = 0;
#endif
m_sizeChangeAni->setDuration(duration);
m_posChangeAni->setDuration(duration);