diff options
-rw-r--r-- | include/core/core.h | 2 | ||||
-rw-r--r-- | include/core/screen.h | 1 | ||||
-rw-r--r-- | plugins/cube/src/cube.cpp | 3 | ||||
-rw-r--r-- | plugins/decor/src/decor.cpp | 3 | ||||
-rw-r--r-- | plugins/opengl/include/opengl/opengl.h | 2 | ||||
-rw-r--r-- | plugins/opengl/include/opengl/texture.h | 3 | ||||
-rw-r--r-- | plugins/opengl/src/screen.cpp | 3 | ||||
-rw-r--r-- | plugins/opengl/src/texture.cpp | 3 | ||||
-rw-r--r-- | src/screen.cpp | 8 |
9 files changed, 20 insertions, 8 deletions
diff --git a/include/core/core.h b/include/core/core.h index b0b86b3..7543f58 100644 --- a/include/core/core.h +++ b/include/core/core.h @@ -27,7 +27,7 @@ #define _COMPIZ_CORE_H -#define CORE_ABIVERSION 20110131 +#define CORE_ABIVERSION 20110224 #include <stdio.h> #include <assert.h> diff --git a/include/core/screen.h b/include/core/screen.h index f9652f1..6f4ef01 100644 --- a/include/core/screen.h +++ b/include/core/screen.h @@ -211,6 +211,7 @@ class CompScreen : bool override_redirect = false); bool readImageFromFile (CompString &name, + CompString &pname, CompSize &size, void *&data); diff --git a/plugins/cube/src/cube.cpp b/plugins/cube/src/cube.cpp index 9436fdf..0751388 100644 --- a/plugins/cube/src/cube.cpp +++ b/plugins/cube/src/cube.cpp @@ -388,9 +388,10 @@ PrivateCubeScreen::updateSkydomeTexture () return; CompString imgName = optionGetSkydomeImage (); + CompString pname = "cube"; if (optionGetSkydomeImage ().empty () || - (mSky = GLTexture::readImageToTexture (imgName, mSkySize)).empty ()) + (mSky = GLTexture::readImageToTexture (imgName, pname, mSkySize)).empty ()) { GLfloat aaafTextureData[128][128][3]; GLfloat fRStart = (GLfloat) optionGetSkydomeGradientStartColorRed () / 0xffff; diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp index d2bfadb..326d2f4 100644 --- a/plugins/decor/src/decor.cpp +++ b/plugins/decor/src/decor.cpp @@ -61,7 +61,6 @@ isAncestorTo (CompWindow *window, return false; } - /* Make shadows look nice, don't paint shadows on top of * things they don't make sense on top of, eg, menus * need shadows but they don't need to be painted when @@ -76,7 +75,7 @@ isAncestorTo (CompWindow *window, * occlusion detection */ void -DecorWindow::computeShadowRegion () +DecorWindow::computeShadowRegion (bool transformedWindows) { shadowRegion = CompRegion (window->outputRect ()); diff --git a/plugins/opengl/include/opengl/opengl.h b/plugins/opengl/include/opengl/opengl.h index 5b4045c..a9c74ef 100644 --- a/plugins/opengl/include/opengl/opengl.h +++ b/plugins/opengl/include/opengl/opengl.h @@ -35,7 +35,7 @@ #include <opengl/texture.h> #include <opengl/fragment.h> -#define COMPIZ_OPENGL_ABI 2 +#define COMPIZ_OPENGL_ABI 3 #include <core/pluginclasshandler.h> diff --git a/plugins/opengl/include/opengl/texture.h b/plugins/opengl/include/opengl/texture.h index 3d0ddba..2023402 100644 --- a/plugins/opengl/include/opengl/texture.h +++ b/plugins/opengl/include/opengl/texture.h @@ -200,9 +200,12 @@ class GLTexture : public CompRect { * return a GLTexture::List with its contents * * @param imageFileName The filename of the image + * @param pluginName The name of the plugin, used to find + * the default image path * @param size The size of this new texture */ static List readImageToTexture (CompString &imageFileName, + CompString &pluginName, CompSize &size); friend class PrivateTexture; diff --git a/plugins/opengl/src/screen.cpp b/plugins/opengl/src/screen.cpp index 5fe1cc0..253f03b 100644 --- a/plugins/opengl/src/screen.cpp +++ b/plugins/opengl/src/screen.cpp @@ -815,8 +815,9 @@ PrivateGLScreen::updateScreenBackground () { CompSize size; CompString fileName (backgroundImage); + CompString pname (""); - backgroundTextures = GLTexture::readImageToTexture (fileName, size); + backgroundTextures = GLTexture::readImageToTexture (fileName, pname, size); } if (!backgroundTextures.empty ()) diff --git a/plugins/opengl/src/texture.cpp b/plugins/opengl/src/texture.cpp index 27ccddd..3c4ddcf 100644 --- a/plugins/opengl/src/texture.cpp +++ b/plugins/opengl/src/texture.cpp @@ -368,11 +368,12 @@ GLTexture::imageDataToTexture (const char *image, GLTexture::List GLTexture::readImageToTexture (CompString &imageFileName, + CompString &pluginName, CompSize &size) { void *image = NULL; - if (!screen->readImageFromFile (imageFileName, size, image) || !image) + if (!screen->readImageFromFile (imageFileName, pluginName, size, image) || !image) return GLTexture::List (); GLTexture::List rv = diff --git a/src/screen.cpp b/src/screen.cpp index e56d2e0..2c9c2e2 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -1065,6 +1065,7 @@ PrivateScreen::handleSelectionClear (XEvent *event) bool CompScreen::readImageFromFile (CompString &name, + CompString &pname, CompSize &size, void *&data) { @@ -1082,6 +1083,8 @@ CompScreen::readImageFromFile (CompString &name, path += "/"; path += HOME_IMAGEDIR; path += "/"; + path += pname; + path += "/"; path += name; status = fileToImage (path, size, stride, data); @@ -1092,6 +1095,8 @@ CompScreen::readImageFromFile (CompString &name, path = IMAGEDIR; path += "/"; + path += pname; + path += "/"; path += name; status = fileToImage (path, size, stride, data); } @@ -3857,6 +3862,7 @@ bool CompScreen::updateDefaultIcon () { CompString file = priv->optionGetDefaultIcon (); + CompString pname = ""; void *data; CompSize size; @@ -3866,7 +3872,7 @@ CompScreen::updateDefaultIcon () priv->defaultIcon = NULL; } - if (!readImageFromFile (file, size, data)) + if (!readImageFromFile (file, pname, size, data)) return false; priv->defaultIcon = new CompIcon (screen, size.width (), size.height ()); |