Makefile.am                                 |    2 
 NEWS                                        |   26 ++
 compiz-cube.pc.in                           |    2 
 compiz-scale.pc.in                          |    2 
 configure.ac                                |    9 
 gtk/gnome/50-compiz-desktop-key.xml.in      |    2 
 gtk/window-decorator/gtk-window-decorator.c |  309 ++++++++++++++++------------
 gtk/window-decorator/gwd.schemas.in         |   11 
 include/compiz.h                            |   30 +-
 include/cube.h                              |    4 
 kde/window-decorator/decorator.cpp          |   28 +-
 kde/window-decorator/decorator.h            |    9 
 kde/window-decorator/main.cpp               |   12 -
 kde/window-decorator/window.cpp             |   49 ++--
 kde/window-decorator/window.h               |    7 
 libdecoration/Makefile.am                   |    5 
 metadata/Makefile.am                        |    3 
 metadata/fade.xml.in                        |    5 
 metadata/resize.xml.in                      |   16 -
 metadata/rotate.xml.in                      |    4 
 metadata/schemas.xslt                       |   21 +
 plugins/cube.c                              |   34 +--
 plugins/decoration.c                        |   60 +++--
 plugins/fade.c                              |   27 +-
 plugins/fuse.c                              |    3 
 plugins/gconf.c                             |   37 ++-
 plugins/ini.c                               |   22 +
 plugins/inotify.c                           |    2 
 plugins/place.c                             |   28 +-
 plugins/plane.c                             |    1 
 plugins/resize.c                            |   43 ++-
 plugins/scale.c                             |    2 
 plugins/switcher.c                          |    6 
 plugins/video.c                             |    6 
 plugins/wobbly.c                            |   17 +
 src/display.c                               |   67 ++----
 src/event.c                                 |  135 ++++++++++--
 src/option.c                                |   15 -
 src/screen.c                                |   93 +++++---
 src/session.c                               |    7 
 src/window.c                                |  210 +++++++++++++------
 41 files changed, 902 insertions(+), 469 deletions(-)

New commits:
commit 8a1e4e0543fee3c2b4efd6840591488d87c84443
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Fri Oct 19 19:58:28 2007 +0200

    Fix typo.

diff --git a/plugins/place.c b/plugins/place.c
index 3fa4d9c..258e450 100644
--- a/plugins/place.c
+++ b/plugins/place.c
@@ -1169,8 +1169,8 @@ placeWin (CompWindow *window,
            /* clip to screen if parent is visible in current viewport */
            if (parent->serverX < parent->screen->width   &&
                parent->serverX + parent->serverWidth > 0 &&
-               parent->serverY < parent->screen->height  &&)
-               parent->serverY + parent->serverHeight > 0
+               parent->serverY < parent->screen->height  &&
+               parent->serverY + parent->serverHeight > 0)
            {
                XRectangle area;
                int        output;

commit 5c4eab6ab6964a4f555b2921f9f01ec2c4b5196e
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Sat Nov 3 11:28:21 2007 +0100

    Fix typo.

diff --git a/src/event.c b/src/event.c
index 6a9340d..9e4c7f7 100644
--- a/src/event.c
+++ b/src/event.c
@@ -1952,6 +1952,7 @@ handleEvent (CompDisplay *d,
                        }
                        else
                            restackWindowBelow (w, p);
+                   }
                }
 
                if (w->minimized)

commit 65792e9bcc5e1486568454f32733a070553a94f8
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Mon Nov 5 09:05:36 2007 +0100

    Clip transient child placement to parent output instead of current output.

diff --git a/plugins/place.c b/plugins/place.c
index 4408c46..3fa4d9c 100644
--- a/plugins/place.c
+++ b/plugins/place.c
@@ -1173,8 +1173,10 @@ placeWin (CompWindow *window,
                parent->serverY + parent->serverHeight > 0
            {
                XRectangle area;
+               int        output;
 
-               get_workarea_of_current_output_device (window->screen, &area);
+               output = outputDeviceForWindow (parent);
+               getWorkareaForOutput (window->screen, output, &area);
 
                if (x + window_width > area.x + area.width)
                    x = area.x + area.width - window_width;

commit d29a8bdf1f90dfa11847daf78205966cf982782c
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Sat Nov 3 11:27:04 2007 +0100

    Prevent transient children being stacked below their parent if their focus 
was denied.

diff --git a/src/event.c b/src/event.c
index 6e072c3..6a9340d 100644
--- a/src/event.c
+++ b/src/event.c
@@ -1940,7 +1940,18 @@ handleEvent (CompDisplay *d,
 
                    /* window is above active window so we should lower it */
                    if (p)
-                       restackWindowBelow (w, p);
+                   {
+                       /* restack window right above its transient parent
+                          if it has one; restack right under active window
+                          otherwise */
+                       if (w->transientFor)
+                       {
+                           p = findWindowAtDisplay (d, w->transientFor);
+                           if (p)
+                               restackWindowAbove (w, p);
+                       }
+                       else
+                           restackWindowBelow (w, p);
                }
 
                if (w->minimized)

commit d46228314410c9d320e1c65f15632d19b025d733
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Thu Nov 1 18:45:42 2007 +0100

    Compare to wmType, not type variable.
    Docks that have below state flag shouldn't be hidden in showdesktop mode, 
so we have to have a look at the real window type.

diff --git a/src/screen.c b/src/screen.c
index 2130ca3..f1326e2 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1317,7 +1317,7 @@ enterShowDesktopMode (CompScreen *s)
 
     for (w = s->windows; w; w = w->next)
     {
-       if ((s->showingDesktopMask & w->type) &&
+       if ((s->showingDesktopMask & w->wmType) &&
            (!(w->state & CompWindowStateSkipTaskbarMask) || st->value.b))
        {
            if (!w->inShowDesktopMode && (*s->focusWindow) (w))

commit b92e6ff07c393ad61cf8c65a2cd3b5fd679a726c
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Fri Oct 19 19:57:01 2007 +0200

    Also check if parent's Y coordinate is inside the current viewport.

diff --git a/plugins/place.c b/plugins/place.c
index 0ea4477..4408c46 100644
--- a/plugins/place.c
+++ b/plugins/place.c
@@ -1167,8 +1167,10 @@ placeWin (CompWindow *window,
            y += window->input.top;
 
            /* clip to screen if parent is visible in current viewport */
-           if (parent->serverX < parent->screen->width &&
-               parent->serverX + parent->serverWidth > 0)
+           if (parent->serverX < parent->screen->width   &&
+               parent->serverX + parent->serverWidth > 0 &&
+               parent->serverY < parent->screen->height  &&)
+               parent->serverY + parent->serverHeight > 0
            {
                XRectangle area;
 

commit 612ce08ae4c93c5ba3cb6e6a82f3105c1c222d30
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Fri Oct 19 19:48:21 2007 +0200

    We don't need to constrain y movement after placing transients.

diff --git a/plugins/place.c b/plugins/place.c
index 2f57608..0ea4477 100644
--- a/plugins/place.c
+++ b/plugins/place.c
@@ -1184,7 +1184,7 @@ placeWin (CompWindow *window,
 
            avoid_being_obscured_as_second_modal_dialog (window, &x, &y);
 
-           goto done_no_x_constraints;
+           goto done_no_constraints;
        }
     }
 
@@ -1344,7 +1344,6 @@ done:
     if (x - window->input.left < work_area.x)
        x = work_area.x + window->input.left;
 
-done_no_x_constraints:
     if (y + window_height + window->input.bottom >
        work_area.y + work_area.height)
        y = work_area.y + work_area.height

commit 7e6173d9800a5305668bbb537dc001e0b64aaf08
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Tue Oct 23 18:16:14 2007 +0200

    Don't switch to selected window if switcher was cancelled.

diff --git a/plugins/switcher.c b/plugins/switcher.c
index b79fe6f..435b76f 100644
--- a/plugins/switcher.c
+++ b/plugins/switcher.c
@@ -736,6 +736,12 @@ switchTerminate (CompDisplay     *d,
 
            ss->switching = FALSE;
 
+           if (state & CompActionStateCancel)
+           {
+               ss->selectedWindow = None;
+               ss->zoomedWindow   = None;
+           }
+
            if (state && ss->selectedWindow)
            {
                w = findWindowAtScreen (s, ss->selectedWindow);

commit c9009efd1a2dbc975541b11b170143dc2e5cf912
Author: David Reveman <[EMAIL PROTECTED]>
Date:   Tue Oct 30 14:14:33 2007 -0400

    Add --sm-disable option to kwd.

diff --git a/kde/window-decorator/main.cpp b/kde/window-decorator/main.cpp
index e979973..d4058d8 100644
--- a/kde/window-decorator/main.cpp
+++ b/kde/window-decorator/main.cpp
@@ -32,6 +32,7 @@
 
 static const KCmdLineOptions options[] = {
     { "replace", "Replace existing window decorator", 0 },
+    { "sm-disable", "Disable connection to session manager", 0 },
     { "opacity <value>", "Decoration opacity", "0.75" },
     { "no-opacity-shade", "No decoration opacity shading", 0 },
     { "active-opacity <value>", "Active decoration opacity", "1.0" },
@@ -83,6 +84,9 @@ main (int argc, char **argv)
 
     app = new KWD::Decorator ();
 
+    if (args->isSet ("sm-disable"))
+       app->disableSessionManagement ();
+
     if (!XDamageQueryExtension (qt_xdisplay (), &event, &error))
     {
        fprintf (stderr,

commit e05dc4556e87b83c37d1f3cbf5b68598f51757cd
Author: David Reveman <[EMAIL PROTECTED]>
Date:   Tue Oct 30 14:06:36 2007 -0400

    Reparent window just before mapping it and avoid hiding it
    when reloading decorations.

diff --git a/kde/window-decorator/window.cpp b/kde/window-decorator/window.cpp
index 56cba0b..5165995 100644
--- a/kde/window-decorator/window.cpp
+++ b/kde/window-decorator/window.cpp
@@ -63,6 +63,7 @@ KWD::Window::Window (WId  parentId,
                     int  w,
                     int  h): QWidget (0, 0),
     mType (type),
+    mParentId (parentId),
     mFrame (0),
     mClientId (clientId),
     mSelectedId (0),
@@ -122,8 +123,6 @@ KWD::Window::Window (WId  parentId,
        mGeometry = QRect (50, 50, 30, 1);
     }
 
-    XReparentWindow (qt_xdisplay (), winId (), parentId, 0, 0);
-
     setGeometry (QRect (mGeometry.x () + ROOT_OFF_X,
                        mGeometry.y () + ROOT_OFF_Y,
                        mGeometry.width (), mGeometry.height ()));
@@ -1157,6 +1156,8 @@ KWD::Window::resizeDecoration (bool force)
     {
        mPendingMap = 1;
 
+       XReparentWindow (qt_xdisplay (), winId (), mParentId, 0, 0);
+
        show ();
 
        mMapped = true;
@@ -1497,8 +1498,6 @@ KWD::Window::reloadDecoration (void)
     delete mDecor;
     mDecor = 0;
 
-    hide ();
-
     mMapped   = false;
     mShapeSet = false;
 
diff --git a/kde/window-decorator/window.h b/kde/window-decorator/window.h
index e9d6496..eb4a8d3 100644
--- a/kde/window-decorator/window.h
+++ b/kde/window-decorator/window.h
@@ -199,6 +199,7 @@ class Window:public QWidget, public KDecorationBridge {
 
     private:
        Type mType;
+       WId mParentId;
        WId mFrame;
        WId mClientId;
        WId mSelectedId;

commit 0ba8a8cf8fbc531a81d3ed6c9f00cdadc7943cb1
Author: David Reveman <[EMAIL PROTECTED]>
Date:   Tue Oct 30 13:52:45 2007 -0400

    Don't remove WType_TopLevel bit when reloading decorations.

diff --git a/kde/window-decorator/window.cpp b/kde/window-decorator/window.cpp
index ff86b7e..56cba0b 100644
--- a/kde/window-decorator/window.cpp
+++ b/kde/window-decorator/window.cpp
@@ -1497,7 +1497,6 @@ KWD::Window::reloadDecoration (void)
     delete mDecor;
     mDecor = 0;
 
-    setWFlags (getWFlags () & ~WType_TopLevel);
     hide ();
 
     mMapped   = false;

commit c9aafe60701d93dbb2666a4fa10412e49386eed2
Author: David Reveman <[EMAIL PROTECTED]>
Date:   Tue Oct 30 13:51:40 2007 -0400

    Make mCompositeWindow an X window instead of a QWidget.

diff --git a/kde/window-decorator/decorator.cpp 
b/kde/window-decorator/decorator.cpp
index 9342084..893820b 100644
--- a/kde/window-decorator/decorator.cpp
+++ b/kde/window-decorator/decorator.cpp
@@ -195,8 +195,9 @@ KWD::Decorator::Decorator (void) : DCOPObject 
("KWinInterface"),
     mDBusQtConnection (this),
     mCompositeWindow (0)
 {
-    DCOPClient *client;
-    int               i, j;
+    XSetWindowAttributes attr;
+    DCOPClient          *client;
+    int                         i, j;
 
     mRootInfo = new NETRootInfo (qt_xdisplay (), 0);
 
@@ -232,15 +233,19 @@ KWD::Decorator::Decorator (void) : DCOPObject 
("KWinInterface"),
     mShadowOptions.shadow_color[1] = SHADOW_COLOR_GREEN;
     mShadowOptions.shadow_color[2] = SHADOW_COLOR_BLUE;
 
-    mCompositeWindow = new QWidget (0, "KWDCompositeWidget",
-                                   Qt::WType_TopLevel | Qt::WStyle_NoBorder |
-                                   Qt::WX11BypassWM);
+    attr.override_redirect = True;
 
-    mCompositeWindow->setGeometry (QRect (-ROOT_OFF_X, -ROOT_OFF_Y, 1, 1));
-    mCompositeWindow->show ();
+    mCompositeWindow = XCreateWindow (qt_xdisplay (), qt_xrootwin (),
+                                     -ROOT_OFF_X, -ROOT_OFF_Y, 1, 1, 0,
+                                     CopyFromParent,
+                                     CopyFromParent,
+                                     CopyFromParent,
+                                     CWOverrideRedirect, &attr);
 
-    XCompositeRedirectSubwindows (qt_xdisplay (), mCompositeWindow->winId (),
+    XCompositeRedirectSubwindows (qt_xdisplay (), mCompositeWindow,
                                  CompositeRedirectManual);
+
+    XMapWindow (qt_xdisplay (), mCompositeWindow);
 }
 
 KWD::Decorator::~Decorator (void)
@@ -256,8 +261,7 @@ KWD::Decorator::~Decorator (void)
     if (mDecorActive)
        delete mDecorActive;
 
-    /* XXX: mCompositeWindow is not deleted, some plugins seem to rely on
-       it not being deleted... not sure what to do about this. */
+    XDestroyWindow (qt_xdisplay (), mCompositeWindow);
 
     delete mOptions;
     delete mPlugins;
@@ -299,9 +303,9 @@ KWD::Decorator::enableDecorations (Time timestamp,
 
     updateShadow ();
 
-    mDecorNormal = new KWD::Window (mCompositeWindow->winId (), qt_xrootwin (),
+    mDecorNormal = new KWD::Window (mCompositeWindow, qt_xrootwin (),
                                    0, Window::Default);
-    mDecorActive = new KWD::Window (mCompositeWindow->winId (), qt_xrootwin (),
+    mDecorActive = new KWD::Window (mCompositeWindow, qt_xrootwin (),
                                    0, Window::DefaultActive);
 
     connect (mKWinModule, SIGNAL (windowAdded (WId)),
@@ -918,8 +922,7 @@ KWD::Decorator::handleWindowAdded (WId id)
     {
        if (!mClients.contains (id))
        {
-           client = new KWD::Window (mCompositeWindow->winId (),
-                                     id, frame, type,
+           client = new KWD::Window (mCompositeWindow, id, frame, type,
                                      x, y,
                                      width + border * 2,
                                      height + border * 2);
@@ -941,7 +944,7 @@ KWD::Decorator::handleWindowAdded (WId id)
     {
        if (!mClients.contains (id))
        {
-           client = new KWD::Window (mCompositeWindow->winId (), id, 0, type,
+           client = new KWD::Window (mCompositeWindow, id, 0, type,
                                      x, y,
                                      width + border * 2,
                                      height + border * 2);
diff --git a/kde/window-decorator/decorator.h b/kde/window-decorator/decorator.h
index 1453844..077eebf 100644
--- a/kde/window-decorator/decorator.h
+++ b/kde/window-decorator/decorator.h
@@ -176,7 +176,7 @@ class Decorator:public KApplication, public KWinInterface {
        KWinModule *mKWinModule;
        DBusConnection *mDBusConnection;
        DBusQt::Connection mDBusQtConnection;
-       QWidget *mCompositeWindow;
+       WId mCompositeWindow;
     };
 }
 

commit 6a3329d59d8ab28bf61a1006b8f5a134cf069b33
Author: David Reveman <[EMAIL PROTECTED]>
Date:   Tue Oct 30 11:58:35 2007 -0400

    Remove whitespaces.

diff --git a/kde/window-decorator/window.cpp b/kde/window-decorator/window.cpp
index 568dbe6..ff86b7e 100644
--- a/kde/window-decorator/window.cpp
+++ b/kde/window-decorator/window.cpp
@@ -90,7 +90,7 @@ KWD::Window::Window (WId  parentId,
     if (mType == Normal || mType == Switcher)
     {
        KWin::WindowInfo wInfo = KWin::windowInfo (mClientId, NET::WMState |
-                                                  NET::WMVisibleName, 0);
+                                                  NET::WMVisibleName, 0);
 
        mState = wInfo.state ();
 

commit a9185e9d482b629f7d0697af00eb26ca65a2630f
Author: David Reveman <[EMAIL PROTECTED]>
Date:   Tue Oct 30 11:57:44 2007 -0400

    Reparent window instead of flipping the WType_TopLevel bit.

diff --git a/kde/window-decorator/decorator.cpp 
b/kde/window-decorator/decorator.cpp
index 19e10d6..9342084 100644
--- a/kde/window-decorator/decorator.cpp
+++ b/kde/window-decorator/decorator.cpp
@@ -299,9 +299,9 @@ KWD::Decorator::enableDecorations (Time timestamp,
 
     updateShadow ();
 
-    mDecorNormal = new KWD::Window (mCompositeWindow, qt_xrootwin (),
+    mDecorNormal = new KWD::Window (mCompositeWindow->winId (), qt_xrootwin (),
                                    0, Window::Default);
-    mDecorActive = new KWD::Window (mCompositeWindow, qt_xrootwin (),
+    mDecorActive = new KWD::Window (mCompositeWindow->winId (), qt_xrootwin (),
                                    0, Window::DefaultActive);
 
     connect (mKWinModule, SIGNAL (windowAdded (WId)),
@@ -918,7 +918,8 @@ KWD::Decorator::handleWindowAdded (WId id)
     {
        if (!mClients.contains (id))
        {
-           client = new KWD::Window (mCompositeWindow, id, frame, type,
+           client = new KWD::Window (mCompositeWindow->winId (),
+                                     id, frame, type,
                                      x, y,
                                      width + border * 2,
                                      height + border * 2);
@@ -940,7 +941,7 @@ KWD::Decorator::handleWindowAdded (WId id)
     {
        if (!mClients.contains (id))
        {
-           client = new KWD::Window (mCompositeWindow, id, 0, type,
+           client = new KWD::Window (mCompositeWindow->winId (), id, 0, type,
                                      x, y,
                                      width + border * 2,
                                      height + border * 2);
diff --git a/kde/window-decorator/window.cpp b/kde/window-decorator/window.cpp
index e64dbe9..568dbe6 100644
--- a/kde/window-decorator/window.cpp
+++ b/kde/window-decorator/window.cpp
@@ -54,14 +54,14 @@
 #include <qcursor.h>
 #include <qpopupmenu.h>
 
-KWD::Window::Window (QWidget *parent,
-                    WId     clientId,
-                    WId     frame,
-                    Type    type,
-                    int     x,
-                    int     y,
-                    int     w,
-                    int     h): QWidget (parent, 0),
+KWD::Window::Window (WId  parentId,
+                    WId  clientId,
+                    WId  frame,
+                    Type type,
+                    int  x,
+                    int  y,
+                    int  w,
+                    int  h): QWidget (0, 0),
     mType (type),
     mFrame (0),
     mClientId (clientId),
@@ -122,6 +122,8 @@ KWD::Window::Window (QWidget *parent,
        mGeometry = QRect (50, 50, 30, 1);
     }
 
+    XReparentWindow (qt_xdisplay (), winId (), parentId, 0, 0);
+
     setGeometry (QRect (mGeometry.x () + ROOT_OFF_X,
                        mGeometry.y () + ROOT_OFF_Y,
                        mGeometry.width (), mGeometry.height ()));
@@ -1159,11 +1161,6 @@ KWD::Window::resizeDecoration (bool force)
 
        mMapped = true;
 
-       /* XXX: is there a more appropriate way to achieve this?
-          add WType_TopLevel flag so that visualRect isn't clipped
-          to parent. */
-       setWFlags (getWFlags () | WType_TopLevel);
-
        if (mDamageId != winId ())
        {
            mDamageId = winId ();
diff --git a/kde/window-decorator/window.h b/kde/window-decorator/window.h
index 8472677..e9d6496 100644
--- a/kde/window-decorator/window.h
+++ b/kde/window-decorator/window.h
@@ -54,7 +54,7 @@ class Window:public QWidget, public KDecorationBridge {
        };
 
     public:
-       Window (QWidget *parent, WId clientId, WId frame, Type type,
+       Window (WId parentId, WId clientId, WId frame, Type type,
                int x = 0, int y = 0, int w = 1, int h = 1);
        ~Window (void);
 

commit 4795df0e1831a5d9bb323c7a03e896dbd4e1517a
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Thu Oct 18 18:16:44 2007 +0200

    Post-release version increment.

diff --git a/configure.ac b/configure.ac
index 79b315e..554d1b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl An odd micro number indicates in-progress development.
 dnl An even micro number indicates a released version.
 m4_define(compiz_version_major, 0)
 m4_define(compiz_version_minor, 6)
-m4_define(compiz_version_micro, 2)
+m4_define(compiz_version_micro, 3)
 
 AC_INIT([compiz],
        [compiz_version_major().compiz_version_minor().compiz_version_micro()],

commit 111d5994a8b5a0a3b4b8bf12b566dcd2a7c51d30
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Thu Oct 18 15:18:57 2007 +0200

    Bump version.

diff --git a/configure.ac b/configure.ac
index 0b38ab8..79b315e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl An odd micro number indicates in-progress development.
 dnl An even micro number indicates a released version.
 m4_define(compiz_version_major, 0)
 m4_define(compiz_version_minor, 6)
-m4_define(compiz_version_micro, 1)
+m4_define(compiz_version_micro, 2)
 
 AC_INIT([compiz],
        [compiz_version_major().compiz_version_minor().compiz_version_micro()],

commit 37337ac8ab3a79d609ea205092bdf1d31ac3b849
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Thu Oct 18 15:18:46 2007 +0200

    Add NEWS entry for 0.6.2 release.

diff --git a/NEWS b/NEWS
index 2cd0639..ab115cf 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,15 @@
+Release 0.6.2 (2007-10-18 Danny Baumann <[EMAIL PROTECTED]>)
+==============================================================
+Stable release.
+
+Support for automatically starting one decorator per screen.
+
+Various stacking problem fixes.
+
+Fixes for various focus issues.
+
+Minor other bug fixes.
+
 Release 0.6.0 (2007-10-01 Danny Baumann <[EMAIL PROTECTED]>)
 ==============================================================
 Third stable release of Compiz.

commit e022d349c43d8b6f2b6579e0d2a318dd89ef8d41
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Tue Oct 16 18:28:10 2007 +0200

    putenv doesn't work properly with dynamically allocated strings that are 
free'd right after the putenv call.

diff --git a/src/screen.c b/src/screen.c
index 31b1293..2130ca3 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3125,15 +3125,13 @@ runCommand (CompScreen *s,
     if (fork () == 0)
     {
        /* build a display string that uses the right screen number */
-       int  stringLen;
-       char *pos, *delimiter, *screenString, *colon;
+       /* 5 extra chars should be enough for pretty much every situation */
+       int  stringLen = strlen (s->display->displayString) + 5;
+       char screenString[stringLen];
+       char *pos, *delimiter, *colon;
        
        setsid ();
 
-       /* 5 extra chars should be enough for pretty much every situation */
-       stringLen    = strlen (s->display->displayString) + 5;
-       screenString = malloc (sizeof (char) * (stringLen + 1));
-
        if (screenString)
        {
            strcpy (screenString, s->display->displayString);
@@ -3156,7 +3154,6 @@ runCommand (CompScreen *s,
                      "%s.%d", colon, s->screenNum);
 
            putenv (screenString);
-           free (screenString);
        }
        else
        {

commit 23485c5e7f1b16e169a166d4b89a96e68df88f61
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Tue Oct 16 18:15:47 2007 +0200

    Run external commands with a DISPLAY string adjusted for the screen number 
that was passed to runCommand.

diff --git a/src/screen.c b/src/screen.c
index 142616d..31b1293 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3124,8 +3124,45 @@ runCommand (CompScreen *s,
 
     if (fork () == 0)
     {
+       /* build a display string that uses the right screen number */
+       int  stringLen;
+       char *pos, *delimiter, *screenString, *colon;
+       
        setsid ();
-       putenv (s->display->displayString);
+
+       /* 5 extra chars should be enough for pretty much every situation */
+       stringLen    = strlen (s->display->displayString) + 5;
+       screenString = malloc (sizeof (char) * (stringLen + 1));
+
+       if (screenString)
+       {
+           strcpy (screenString, s->display->displayString);
+           delimiter = strrchr (screenString, ':');
+           if (delimiter)
+           {
+               colon = "";
+               delimiter = strchr (delimiter, '.');
+               if (delimiter)
+                   *delimiter = '\0';
+           }
+           else
+           {
+               /* insert :0 to keep the syntax correct */
+               colon = ":0";
+           }
+           pos = screenString + strlen (screenString);
+
+           snprintf (pos, stringLen - (pos - screenString),
+                     "%s.%d", colon, s->screenNum);
+
+           putenv (screenString);
+           free (screenString);
+       }
+       else
+       {
+           putenv (s->display->displayString);
+       }
+
        execl ("/bin/sh", "/bin/sh", "-c", command, NULL);
        exit (0);
     }

commit c79b6fdd9c7a6fd4527211e7b7783cbeaac20448
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Tue Oct 16 18:00:07 2007 +0200

    Get private pointer for the current screen.

diff --git a/plugins/decoration.c b/plugins/decoration.c
index d40ff3a..ca49e21 100644
--- a/plugins/decoration.c
+++ b/plugins/decoration.c
@@ -1137,7 +1137,7 @@ decorSetDisplayOption (CompPlugin      *plugin,
 
            for (s = display->screens; s; s = s->next)
            {
-               DECOR_SCREEN (display->screens);
+               DECOR_SCREEN (s);
 
                if (!ds->dmWin)
                    runCommand (s, o->value.s);

commit b27df3fd8180443d66d79bc1495676b567b0b2be
Author: Tomas Carnecky <[EMAIL PROTECTED]>
Date:   Fri Oct 12 14:02:17 2007 +0200

    Start window decorator on all screens.

diff --git a/plugins/decoration.c b/plugins/decoration.c
index 79f69ad..d40ff3a 100644
--- a/plugins/decoration.c
+++ b/plugins/decoration.c
@@ -1133,21 +1133,14 @@ decorSetDisplayOption (CompPlugin      *plugin,
     case DECOR_DISPLAY_OPTION_COMMAND:
        if (compSetStringOption (o, value))
        {
-           if (display->screens && *o->value.s != '\0')
+           CompScreen *s;
+
+           for (s = display->screens; s; s = s->next)
            {
                DECOR_SCREEN (display->screens);
 
-               /* run decorator command if no decorator is present on
-                  first screen */
                if (!ds->dmWin)
-               {
-                   if (fork () == 0)
-                   {
-                       putenv (display->displayString);
-                       execl ("/bin/sh", "/bin/sh", "-c", o->value.s, NULL);
-                       exit (0);
-                   }
-               }
+                   runCommand (s, o->value.s);
            }
 
            return TRUE;

commit e9d33c05242f076f15b33322bfc9d33be631aecd
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Tue Oct 16 17:19:09 2007 +0200

    Use real screen number rather than 0.

diff --git a/kde/window-decorator/main.cpp b/kde/window-decorator/main.cpp
index 6adb2fd..e979973 100644
--- a/kde/window-decorator/main.cpp
+++ b/kde/window-decorator/main.cpp
@@ -92,7 +92,7 @@ main (int argc, char **argv)
        return 1;
     }
 
-    status = decor_acquire_dm_session (qt_xdisplay (), 0, "kwd",
+    status = decor_acquire_dm_session (qt_xdisplay (), qt_xscreen (), "kwd",
                                       args->isSet ("replace"),
                                       &timestamp);
     if (status != DECOR_ACQUIRE_STATUS_SUCCESS)
@@ -102,7 +102,7 @@ main (int argc, char **argv)
            fprintf (stderr,
                     "%s: Could not acquire decoration manager "
                     "selection on screen %d display \"%s\"\n",
-                    argv[0], 0, DisplayString (qt_xdisplay ()));
+                    argv[0], qt_xscreen (), DisplayString (qt_xdisplay ()));
        }
        else if (status == DECOR_ACQUIRE_STATUS_OTHER_DM_RUNNING)
        {
@@ -111,13 +111,13 @@ main (int argc, char **argv)
                     "has a decoration manager; try using the "
                     "--replace option to replace the current "
                     "decoration manager.\n",
-                    argv[0], 0, DisplayString (qt_xdisplay ()));
+                    argv[0], qt_xscreen (), DisplayString (qt_xdisplay ()));
        }
 
        return 1;
     }
 
-    decor_set_dm_check_hint (qt_xdisplay (), 0);
+    decor_set_dm_check_hint (qt_xdisplay (), qt_xscreen ());
 
     if (!app->enableDecorations (timestamp, event))
     {

commit 8633239338fb3fa8466b460439d23b43d4bd9261
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Tue Oct 16 17:16:46 2007 +0200

    Use real screen number rather than 0.

diff --git a/gtk/window-decorator/gtk-window-decorator.c 
b/gtk/window-decorator/gtk-window-decorator.c
index c81adad..fb6762a 100644
--- a/gtk/window-decorator/gtk-window-decorator.c
+++ b/gtk/window-decorator/gtk-window-decorator.c
@@ -6823,8 +6823,9 @@ main (int argc, char *argv[])
     panel_action_run_dialog_atom =
        XInternAtom (xdisplay, "_GNOME_PANEL_ACTION_RUN_DIALOG", FALSE);
 
-    status = decor_acquire_dm_session (xdisplay, 0, "gwd", replace,
-                                      &dm_sn_timestamp);
+    status = decor_acquire_dm_session (xdisplay,
+                                      gdk_screen_get_number (gdkscreen),
+                                      "gwd", replace, &dm_sn_timestamp);
     if (status != DECOR_ACQUIRE_STATUS_SUCCESS)
     {
        if (status == DECOR_ACQUIRE_STATUS_FAILED)
@@ -6832,7 +6833,8 @@ main (int argc, char *argv[])
            fprintf (stderr,
                     "%s: Could not acquire decoration manager "
                     "selection on screen %d display \"%s\"\n",
-                    program_name, 0, DisplayString (xdisplay));
+                    program_name, gdk_screen_get_number (gdkscreen),
+                    DisplayString (xdisplay));
        }
        else if (status == DECOR_ACQUIRE_STATUS_OTHER_DM_RUNNING)
        {
@@ -6841,7 +6843,8 @@ main (int argc, char *argv[])
                     "has a decoration manager; try using the "
                     "--replace option to replace the current "
                     "decoration manager.\n",
-                    program_name, 0, DisplayString (xdisplay));
+                    program_name, gdk_screen_get_number (gdkscreen),
+                    DisplayString (xdisplay));
        }
 
        return 1;
@@ -6888,7 +6891,7 @@ main (int argc, char *argv[])
        return 1;
     }
 
-    decor_set_dm_check_hint (xdisplay, 0);
+    decor_set_dm_check_hint (xdisplay, gdk_screen_get_number (gdkscreen));
 
     update_default_decorations (gdkscreen);
 

commit 095e2dce32c08b9873a8d5491cc39a63399e576c
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Wed Oct 17 14:59:38 2007 +0200

    Fix in-viewport calculation.

diff --git a/plugins/place.c b/plugins/place.c
index 018c4ef..2f57608 100644
--- a/plugins/place.c
+++ b/plugins/place.c
@@ -1168,7 +1168,7 @@ placeWin (CompWindow *window,
 
            /* clip to screen if parent is visible in current viewport */
            if (parent->serverX < parent->screen->width &&
-               parent->serverX + parent->screen->width > 0)
+               parent->serverX + parent->serverWidth > 0)
            {
                XRectangle area;
 

commit c5a70817911ba392f17deb45835c043f330b0f5f
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Wed Oct 17 12:24:20 2007 +0200

    Prevent wobbling when shading maximized windows.

diff --git a/plugins/wobbly.c b/plugins/wobbly.c
index 1f47fd5..163d114 100644
--- a/plugins/wobbly.c
+++ b/plugins/wobbly.c
@@ -2323,6 +2323,10 @@ wobblyWindowResizeNotify (CompWindow *w,
 
     if (ws->opt[WOBBLY_SCREEN_OPTION_MAXIMIZE_EFFECT].value.b &&
        isWobblyWin (w)                                       &&
+       /* prevent wobbling when shading maximized windows - assuming that
+          the height difference shaded - non-shaded will hardly be -1 and
+          a lack of wobbly animation in that corner case is tolerable */
+       (dheight != -1)                                       &&
        ((w->state | ww->state) & MAXIMIZE_STATE))
     {
        ww->state &= ~MAXIMIZE_STATE;

commit 19876dff6e613d510f8b6e79649d1ce8b64027d9
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Wed Oct 17 08:40:49 2007 +0200

    Always allow focus for active window.

diff --git a/src/window.c b/src/window.c
index b72d6b3..b3c0edd 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4569,6 +4569,9 @@ allowWindowFocus (CompWindow   *w,
     CompMatch   *match;
     int         vx, vy;
 
+    if (w->id == d->activeWindow)
+       return TRUE;
+
     /* do not focus windows of these types */
     if (w->type & noFocusMask)
        return FALSE;

commit 1c9237b8f824ba9902b9ffb50d279553f9d73220
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Mon Oct 15 10:44:56 2007 +0200

    We have to send the WM_TAKE_FOCUS message even if we directly set the input 
focus.

diff --git a/src/window.c b/src/window.c
index ea22cd1..b72d6b3 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2896,12 +2896,16 @@ moveInputFocusToWindow (CompWindow *w)
     }
     else
     {
+       Bool setFocus = FALSE;
+
        if (w->inputHint)
        {
            XSetInputFocus (d->display, w->id, RevertToPointerRoot,
                            CurrentTime);
+           setFocus = TRUE;
        }
-       else if (w->protocols & CompWindowProtocolTakeFocusMask)
+
+       if (w->protocols & CompWindowProtocolTakeFocusMask)
        {
            XEvent ev;
 
@@ -2917,8 +2921,11 @@ moveInputFocusToWindow (CompWindow *w)
            ev.xclient.data.l[4]    = 0;
 
            XSendEvent (d->display, w->id, FALSE, NoEventMask, &ev);
+
+           setFocus = TRUE;
        }
-       else if (!modalTransient)
+
+       if (!setFocus && !modalTransient)
        {
            CompWindow *ancestor;
 

commit a02f570d9286305a2bf92257ed9e9479904c60fa
Author: Danny Baumann <[EMAIL PROTECTED]>
Date:   Sat Oct 13 17:34:32 2007 +0200

    Clear all coordinates that match the server coordinates from the configure 
request mask to make sure a synthetic configure notify event is sent whenever 
needed.

diff --git a/src/window.c b/src/window.c
index 4eefa88..ea22cd1 100644


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to