cmake/FindCompiz.cmake                  |   18 +++++++-----
 include/core/core.h                     |    2 -
 include/core/screen.h                   |    1 
 plugins/cube/src/cube.cpp               |    3 +-
 plugins/decor/src/decor.cpp             |    1 
 plugins/opengl/include/opengl/opengl.h  |    2 -
 plugins/opengl/include/opengl/texture.h |    3 ++
 plugins/opengl/src/screen.cpp           |    3 +-
 plugins/opengl/src/texture.cpp          |    3 +-
 plugins/resize/src/resize.cpp           |   47 +++++++++++++++++---------------
 src/event.cpp                           |   17 ++++++++---
 src/screen.cpp                          |    8 ++++-
 12 files changed, 68 insertions(+), 40 deletions(-)

New commits:
commit f059fae9963dcb69f2a85b5b26cb615565b4c3e1
Author: Sam Spilsbury <sam.spilsb...@canonical.com>
Date:   Thu Feb 24 15:54:16 2011 +0800

    Fix broken build

diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp
index 326d2f4..6e975f0 100644
--- a/plugins/decor/src/decor.cpp
+++ b/plugins/decor/src/decor.cpp
@@ -75,7 +75,7 @@ isAncestorTo (CompWindow *window,
  * occlusion detection
  */
 void
-DecorWindow::computeShadowRegion (bool transformedWindows)
+DecorWindow::computeShadowRegion ()
 {
     shadowRegion = CompRegion (window->outputRect ());
 

commit 3f3551f41310da96650024edde76e4d952b8a6ad
Author: Sam Spilsbury <sam.spilsb...@canonical.com>
Date:   Thu Feb 24 15:52:09 2011 +0800

    Specify plugin name when loading images to find the correct
    image loading dir for plugins which don't specify absolute
    paths to their images

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 ());

commit e444196baf546d6e60e45fa83baf9cad06f787ae
Author: Sam Spilsbury <sam.spilsb...@canonical.com>
Date:   Thu Feb 24 13:29:18 2011 +0800

    Fix mismatched brace

diff --git a/src/event.cpp b/src/event.cpp
index b2d0133..a1ccd10 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -1857,8 +1857,8 @@ CompScreen::handleEvent (XEvent *event)
            if (w)
                w->priv->updatePassiveButtonGrabs ();
        }
-
-       break;
+    }
+    break;
     case FocusOut:
        if (event->xfocus.mode == NotifyUngrab)
            priv->grabbed = false;

commit 1c9eb6d5d9110f4640cb87ef1f7fe3f32b3115db
Author: Sam Spilsbury <smspil...@gmail.com>
Date:   Thu Feb 24 10:29:00 2011 +0800

    Remove debugging message

diff --git a/cmake/FindCompiz.cmake b/cmake/FindCompiz.cmake
index efe6046..f9db100 100644
--- a/cmake/FindCompiz.cmake
+++ b/cmake/FindCompiz.cmake
@@ -59,7 +59,6 @@ if (NOT _COMPIZ_INTERNAL)
        set (PKGCONFIG_REGEX 
".*${PKGCONFIG_REGEX}/lib/pkgconfig:${PKGCONFIG_REGEX}/share/pkgconfig.*")
 
        if (NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-               message ("cmake install prefix initialized to default")
 
            if (NOT "$ENV{PKG_CONFIG_PATH}" MATCHES "${PKGCONFIG_REGEX}")
                if ("" STREQUAL "$ENV{PKG_CONFIG_PATH}")

commit 81bcc730206d3b4be38e86c0388d2412610f258f
Author: Sam Spilsbury <smspil...@gmail.com>
Date:   Thu Feb 24 10:24:08 2011 +0800

    Don't override the user's PKG_CONFIG_PATH with the CMAKE_INSTALL_PATH
    unless the user explicitly changed the CMAKE_INSTALL_PATH.
    
    Rationale: If the user has their PKG_CONFIG_PATH set to /foo/bar
    they would expect that when doing things like, eg installing plugins
    locally (which ignores CMAKE_INSTALL_PREFIX), that the buildsystem
    would pick up pkg-config files from their PKG_CONFIG_PATH which they
    have specified themselves and not the default CMAKE_INSTALL_PREFIX,
    however when the user changes the CMAKE_INSTALL_PREFIX they need
    to have that be used for pkg-config purposes.

diff --git a/cmake/FindCompiz.cmake b/cmake/FindCompiz.cmake
index 152083b..efe6046 100644
--- a/cmake/FindCompiz.cmake
+++ b/cmake/FindCompiz.cmake
@@ -58,14 +58,19 @@ if (NOT _COMPIZ_INTERNAL)
         string (REGEX REPLACE "([\\+\\(\\)\\^\\\$\\.\\-\\*\\?\\|])" "\\\\\\1" 
PKGCONFIG_REGEX ${CMAKE_INSTALL_PREFIX})
        set (PKGCONFIG_REGEX 
".*${PKGCONFIG_REGEX}/lib/pkgconfig:${PKGCONFIG_REGEX}/share/pkgconfig.*")
 
-       if (NOT "$ENV{PKG_CONFIG_PATH}" MATCHES "${PKGCONFIG_REGEX}")
-           if ("" STREQUAL "$ENV{PKG_CONFIG_PATH}")
-               set (ENV{PKG_CONFIG_PATH} 
"${CMAKE_INSTALL_PREFIX}/lib/pkgconfig:${CMAKE_INSTALL_PREFIX}/share/pkgconfig")
-           else ()
-               set (ENV{PKG_CONFIG_PATH}
-                   
"${CMAKE_INSTALL_PREFIX}/lib/pkgconfig:${CMAKE_INSTALL_PREFIX}/share/pkgconfig:$ENV{PKG_CONFIG_PATH}")
+       if (NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+               message ("cmake install prefix initialized to default")
+
+           if (NOT "$ENV{PKG_CONFIG_PATH}" MATCHES "${PKGCONFIG_REGEX}")
+               if ("" STREQUAL "$ENV{PKG_CONFIG_PATH}")
+                   set (ENV{PKG_CONFIG_PATH} 
"${CMAKE_INSTALL_PREFIX}/lib/pkgconfig:${CMAKE_INSTALL_PREFIX}/share/pkgconfig")
+               else ()
+                   set (ENV{PKG_CONFIG_PATH}
+                        
"${CMAKE_INSTALL_PREFIX}/lib/pkgconfig:${CMAKE_INSTALL_PREFIX}/share/pkgconfig:$ENV{PKG_CONFIG_PATH}")
+               endif ()
            endif ()
-       endif ()
+
+       endif (NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
 
        # look for compiz
        pkg_check_modules (COMPIZ ${_req} "compiz${_comp_ver}")

commit a230d28eda989eb8ef77574d9320200dcba25a3c
Author: Sam Spilsbury <smspil...@gmail.com>
Date:   Thu Feb 24 08:23:33 2011 +0800

    Track focus changes for destroyed windows too since we'll change the focus 
later anyways

diff --git a/src/event.cpp b/src/event.cpp
index fd71fe6..b2d0133 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -1794,9 +1794,18 @@ CompScreen::handleEvent (XEvent *event)
     case CirculateRequest:
        break;
     case FocusIn:
-       XGetWindowAttributes (priv->dpy, event->xfocus.window, &wa);
+    {
+        bool success = XGetWindowAttributes (priv->dpy, event->xfocus.window, 
&wa);
+
+        /* If the call to XGetWindowAttributes failed it means
+         * the window was destroyed, so track the focus change
+         * anyways since we need to increment activeNum
+         * and the passive button grabs and then we will
+         * get the DestroyNotify later and change the focus
+         * there
+         */
 
-       if (wa.root == priv->root)
+        if (!success || wa.root == priv->root)
        {
            if (event->xfocus.mode != NotifyGrab)
            {

commit a30a8eeaf91b5023da64eaacb4b014e48d7f3582
Author: Sam Spilsbury <sam.spilsb...@canonical.com>
Date:   Wed Feb 23 01:42:08 2011 +0800

    Check if we're resizing from a grab handle first (eg isConstrained)
    before using constraint area. Fixes crash when using alt + button2
    to resize and hitting an edge

diff --git a/plugins/resize/src/resize.cpp b/plugins/resize/src/resize.cpp
index 12fc866..265ae45 100644
--- a/plugins/resize/src/resize.cpp
+++ b/plugins/resize/src/resize.cpp
@@ -842,29 +842,32 @@ ResizeScreen::handleMotionEvent (int xRoot, int yRoot)
             * mixup here is intentional)
             */
 
-           if (mask == ResizeLeftMask)
+           if (isConstrained)
            {
-               if (xRoot == 0 &&
-                   geometry.x - w->input ().left > grabWindowWorkArea->left ())
-                   pointerDx += abs (yRoot - lastPointerY) * -1;
-           }
-           else if (mask == ResizeRightMask)
-           {
-               if (xRoot == screen->width () -1 &&
-                   geometry.x + geometry.width + w->input ().right < 
grabWindowWorkArea->right ())
-                   pointerDx += abs (yRoot - lastPointerY);
-           }
-           if (mask == ResizeUpMask)
-           {
-               if (yRoot == 0 &&
-                   geometry.y - w->input ().top > grabWindowWorkArea->top ())
-                   pointerDy += abs (xRoot - lastPointerX) * -1;
-           }
-           else if (mask == ResizeDownMask)
-           {
-               if (yRoot == screen->height () -1 &&
-                   geometry.y + geometry.height + w->input ().bottom < 
grabWindowWorkArea->bottom ())
-                   pointerDx += abs (yRoot - lastPointerY);
+               if (mask == ResizeLeftMask)
+               {
+                   if (xRoot == 0 &&
+                       geometry.x - w->input ().left > 
grabWindowWorkArea->left ())
+                       pointerDx += abs (yRoot - lastPointerY) * -1;
+               }
+               else if (mask == ResizeRightMask)
+               {
+                   if (xRoot == screen->width () -1 &&
+                       geometry.x + geometry.width + w->input ().right < 
grabWindowWorkArea->right ())
+                       pointerDx += abs (yRoot - lastPointerY);
+               }
+               if (mask == ResizeUpMask)
+               {
+                   if (yRoot == 0 &&
+                       geometry.y - w->input ().top > grabWindowWorkArea->top 
())
+                       pointerDy += abs (xRoot - lastPointerX) * -1;
+               }
+               else if (mask == ResizeDownMask)
+               {
+                   if (yRoot == screen->height () -1 &&
+                       geometry.y + geometry.height + w->input ().bottom < 
grabWindowWorkArea->bottom ())
+                       pointerDx += abs (yRoot - lastPointerY);
+               }
            }
        }
 


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1ptkea-0001ep...@alioth.debian.org

Reply via email to