Skip to content

Commit

Permalink
chore: disable show animation for sw platform
Browse files Browse the repository at this point in the history
  • Loading branch information
justforlxz.com committed Jun 25, 2019
1 parent 4f4d207 commit 207911e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
7 changes: 7 additions & 0 deletions frame/window/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 207911e

Please sign in to comment.