Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- === modified file 'plugins/cube/src/cube.cpp'
- --- plugins/cube/src/cube.cpp 2012-01-16 09:50:28 +0000
- +++ plugins/cube/src/cube.cpp 2012-02-27 21:13:38 +0000
- @@ -32,6 +32,9 @@
- #include <privates.h>
- +static int cMoved = 0;
- +static int lastmXRotations = 0;
- +
- class CubePluginVTable :
- public CompPlugin::VTableForScreenAndWindow<CubeScreen, PrivateCubeWindow>
- {
- @@ -224,6 +227,17 @@
- memset (priv->mCapsPainted, 0, sizeof (Bool) * screen->outputDevs ().size ());
- }
- +void
- +PrivateCubeScreen::handleCompizEvent (const char *plugin,
- + const char *event,
- + CompOption::Vector &options)
- +{
- + if ((strcmp (plugin, "rotate") == 0) &&
- + (strcmp (event, "end_viewport_switch") == 0))
- + cMoved = 1;
- + screen->handleCompizEvent (plugin, event, options);
- +}
- +
- bool
- PrivateCubeScreen::updateGeometry (int sides, int invert)
- {
- @@ -1395,6 +1409,11 @@
- sa.xRotate = sa.xRotate / size * hsize;
- + if (cMoved)
- + mXRotations = lastmXRotations;
- + else
- + lastmXRotations = mXRotations;
- +
- if (mGrabIndex && optionGetMipmap ())
- gScreen->setTextureFilter (GL_LINEAR_MIPMAP_LINEAR);
- @@ -1503,6 +1522,9 @@
- glCullFace (cullNorm);
- gScreen->setTextureFilter (filter);
- +
- + if (cMoved)
- + cMoved -= 1;
- }
- bool
- === modified file 'plugins/cube/src/privates.h'
- --- plugins/cube/src/privates.h 2010-10-01 13:42:31 +0000
- +++ plugins/cube/src/privates.h 2012-02-04 08:50:47 +0000
- @@ -106,6 +106,9 @@
- CompAction::State state,
- CompOption::Vector &options);
- + void handleCompizEvent (const char *plugin, const char *event,
- + CompOption::Vector &options);
- +
- public:
- int mInvert;
- === modified file 'src/CMakeLists.txt'
- --- src/CMakeLists.txt 2012-01-29 08:44:08 +0000
- +++ src/CMakeLists.txt 2012-01-30 18:23:23 +0000
- @@ -141,7 +141,7 @@
- m
- pthread
- - dl
- + ${CMAKE_DL_LIBS}
- -Wl,-whole-archive
- compiz_string
- === modified file 'src/plugin/tests/CMakeLists.txt'
- --- src/plugin/tests/CMakeLists.txt 2012-01-24 16:36:23 +0000
- +++ src/plugin/tests/CMakeLists.txt 2012-01-30 18:27:53 +0000
- @@ -28,6 +28,7 @@
- ${GTEST_BOTH_LIBRARIES}
- ${GMOCK_LIBRARY}
- ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
- + ${CMAKE_DL_LIBS}
- )
- gtest_add_tests( compiz_plugin_test "" ${CMAKE_CURRENT_SOURCE_DIR}/test-plugin.cpp )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement