Advertisement
Guest User

Untitled

a guest
May 8th, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. === modified file 'plugins/cube/src/cube.cpp'
  2. --- plugins/cube/src/cube.cpp 2012-01-16 09:50:28 +0000
  3. +++ plugins/cube/src/cube.cpp 2012-02-27 21:13:38 +0000
  4. @@ -32,6 +32,9 @@
  5.  
  6. #include <privates.h>
  7.  
  8. +static int cMoved = 0;
  9. +static int lastmXRotations = 0;
  10. +
  11. class CubePluginVTable :
  12. public CompPlugin::VTableForScreenAndWindow<CubeScreen, PrivateCubeWindow>
  13. {
  14. @@ -224,6 +227,17 @@
  15. memset (priv->mCapsPainted, 0, sizeof (Bool) * screen->outputDevs ().size ());
  16. }
  17.  
  18. +void
  19. +PrivateCubeScreen::handleCompizEvent (const char *plugin,
  20. + const char *event,
  21. + CompOption::Vector &options)
  22. +{
  23. + if ((strcmp (plugin, "rotate") == 0) &&
  24. + (strcmp (event, "end_viewport_switch") == 0))
  25. + cMoved = 1;
  26. + screen->handleCompizEvent (plugin, event, options);
  27. +}
  28. +
  29. bool
  30. PrivateCubeScreen::updateGeometry (int sides, int invert)
  31. {
  32. @@ -1395,6 +1409,11 @@
  33.  
  34. sa.xRotate = sa.xRotate / size * hsize;
  35.  
  36. + if (cMoved)
  37. + mXRotations = lastmXRotations;
  38. + else
  39. + lastmXRotations = mXRotations;
  40. +
  41. if (mGrabIndex && optionGetMipmap ())
  42. gScreen->setTextureFilter (GL_LINEAR_MIPMAP_LINEAR);
  43.  
  44. @@ -1503,6 +1522,9 @@
  45. glCullFace (cullNorm);
  46.  
  47. gScreen->setTextureFilter (filter);
  48. +
  49. + if (cMoved)
  50. + cMoved -= 1;
  51. }
  52.  
  53. bool
  54.  
  55. === modified file 'plugins/cube/src/privates.h'
  56. --- plugins/cube/src/privates.h 2010-10-01 13:42:31 +0000
  57. +++ plugins/cube/src/privates.h 2012-02-04 08:50:47 +0000
  58. @@ -106,6 +106,9 @@
  59. CompAction::State state,
  60. CompOption::Vector &options);
  61.  
  62. + void handleCompizEvent (const char *plugin, const char *event,
  63. + CompOption::Vector &options);
  64. +
  65. public:
  66.  
  67. int mInvert;
  68.  
  69. === modified file 'src/CMakeLists.txt'
  70. --- src/CMakeLists.txt 2012-01-29 08:44:08 +0000
  71. +++ src/CMakeLists.txt 2012-01-30 18:23:23 +0000
  72. @@ -141,7 +141,7 @@
  73.  
  74. m
  75. pthread
  76. - dl
  77. + ${CMAKE_DL_LIBS}
  78.  
  79. -Wl,-whole-archive
  80. compiz_string
  81.  
  82. === modified file 'src/plugin/tests/CMakeLists.txt'
  83. --- src/plugin/tests/CMakeLists.txt 2012-01-24 16:36:23 +0000
  84. +++ src/plugin/tests/CMakeLists.txt 2012-01-30 18:27:53 +0000
  85. @@ -28,6 +28,7 @@
  86. ${GTEST_BOTH_LIBRARIES}
  87. ${GMOCK_LIBRARY}
  88. ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
  89. + ${CMAKE_DL_LIBS}
  90. )
  91.  
  92. gtest_add_tests( compiz_plugin_test "" ${CMAKE_CURRENT_SOURCE_DIR}/test-plugin.cpp )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement