So I had a bit more of a look into this - I think the more general problem was that windows which plugins explicitly did not want to paint (eg, they set PAINT_WINDOW_NO_CORE_INSTANCE_MASK) were being factored into the undredirection algorithm when they shouldn't have been. Can you try out the following diff to see if it fixes the minimization problem? It should fix all of the other problems more generally too. Also has some automated test coverage.
Hey Chris,
So I had a bit more of a look into this - I think the more general problem was that windows which plugins explicitly did not want to paint (eg, they set PAINT_WINDOW_ NO_CORE_ INSTANCE_ MASK) were being factored into the undredirection algorithm when they shouldn't have been. Can you try out the following diff to see if it fixes the minimization problem? It should fix all of the other problems more generally too. Also has some automated test coverage.
=== modified file 'plugins/ opengl/ src/fsregion/ fsregion. cpp' opengl/ src/fsregion/ fsregion. cpp 2012-11-29 10:51:38 +0000 opengl/ src/fsregion/ fsregion. cpp 2013-05-08 01:42:37 +0000
--- plugins/
+++ plugins/
@@ -48,7 +48,7 @@
{
bool fullscreen = false;
- if (!(flags & (Desktop | Alpha)) && ction)) &&
+ if (!(flags & (Desktop | Alpha | NoOcclusionDete
region == untouched &&
region == orig)
{
=== modified file 'plugins/ opengl/ src/fsregion/ fsregion. h' opengl/ src/fsregion/ fsregion. h 2012-11-29 10:51:38 +0000 opengl/ src/fsregion/ fsregion. h 2013-05-08 01:42:34 +0000 ction = 3
--- plugins/
+++ plugins/
@@ -37,7 +37,8 @@
typedef enum
{
Desktop = 1,
- Alpha = 2
+ Alpha = 2,
+ NoOcclusionDete
} WinFlag;
typedef unsigned int WinFlags;
=== modified file 'plugins/ opengl/ src/fsregion/ tests/test- fsregion. cpp' opengl/ src/fsregion/ tests/test- fsregion. cpp 2012-11-29 10:51:38 +0000 opengl/ src/fsregion/ tests/test- fsregion. cpp 2013-05-08 02:33:58 +0000
--- plugins/
+++ plugins/
@@ -26,7 +26,7 @@
#include "gtest/gtest.h"
#include "fsregion.h"
-using namespace compiz::opengl;
+using namespace compiz::opengl;
TEST (OpenGLFullscre enRegion, NoWindows)
Fullscreen Region: :Desktop) );
{
@@ -68,6 +68,25 @@
}
+TEST (OpenGLFullscre enRegion, NoOcclusionFull screen) isCoveredBy (CompRegion (0, 0, 1024, 768), n::NoOcclusionD etection) ); isCoveredBy (CompRegion (0, 0, 1024, 768), n::Desktop) ); enRegion, NoOcclusionOver Fullscreen) isCoveredBy (CompRegion (50, 60, 70, 80), n::NoOcclusionD etection) ); isCoveredBy (CompRegion (0, 0, 1024, 768))); isCoveredBy (CompRegion (0, 0, 1024, 768), n::Desktop) ); enRegion, NormalWindows) Region monitor (CompRect (0, 0, 1024, 768));
+{
+ FullscreenRegion monitor (CompRect (0, 0, 1024, 768));
+ EXPECT_FALSE (monitor.
+ FullscreenRegio
+ EXPECT_FALSE (monitor.
+ FullscreenRegio
+}
+
+TEST (OpenGLFullscre
+{
+ FullscreenRegion monitor (CompRect (0, 0, 1024, 768));
+ EXPECT_FALSE (monitor.
+ FullscreenRegio
+ EXPECT_FALSE (monitor.
+ EXPECT_FALSE (monitor.
+ FullscreenRegio
+}
+
TEST (OpenGLFullscre
{
Fullscreen
=== modified file 'plugins/ opengl/ src/paint. cpp' opengl/ src/paint. cpp 2013-04-25 17:01:46 +0000 opengl/ src/paint. cpp 2013-05-08 02:31:48 +0000 n::Desktop; n::Alpha; n::NoOcclusionD etection;
--- plugins/
+++ plugins/
@@ -353,6 +353,11 @@
flags |= FullscreenRegio
if (w->alpha ())
flags |= FullscreenRegio
+
+ /* Anything which was not occlusion detected is not a suitable
+ * candidate for unredirection either */
+ if (!status)
+ flags |= FullscreenRegio
Composite Window *cw = CompositeWindow ::get (w);