compiz: Changes to 'debian-unstable'
Makefile.am | 10
NEWS | 74
autogen.sh | 2
configure.ac | 15
debian/changelog | 14
debian/compiz-core.install | 1
debian/compiz-gnome.install | 2
debian/control | 4
debian/gbp.conf | 8
debian/patches/012_snap-by-default.patch | 2
debian/patches/015_optional-fbo.patch | 22
debian/patches/disable-libx11-xcb-support.patch | 46
debian/patches/series | 2
debian/patches/xscreensaver-damage-fix.patch | 18
debian/rules | 2
gtk/gnome/50-compiz-desktop-key.xml.in | 10
gtk/gnome/Makefile.am | 23
gtk/gnome/compiz-window-manager.c | 86
gtk/gnome/compiz-wm.desktop.in | 17
gtk/gnome/compiz.desktop.in | 8
gtk/window-decorator/Makefile.am | 1
gtk/window-decorator/gtk-window-decorator.c | 369 ++-
include/compiz-core.h | 222 --
include/compiz-scale.h | 6
include/compiz.h | 3
kde/window-decorator-kde4/Makefile.am | 12
kde/window-decorator-kde4/decorator.cpp | 15
kde/window-decorator-kde4/decorator.h | 7
kde/window-decorator-kde4/main.cpp | 16
kde/window-decorator-kde4/switcher.cpp | 70
kde/window-decorator-kde4/switcher.h | 6
kde/window-decorator-kde4/utils.cpp | 6
kde/window-decorator-kde4/utils.h | 8
kde/window-decorator-kde4/window.cpp | 145 -
kde/window-decorator-kde4/window.h | 22
kde/window-decorator/Makefile.am | 6
kde/window-decorator/decorator.cpp | 14
kde/window-decorator/utils.cpp | 6
kde/window-decorator/utils.h | 2
libdecoration/decoration.c | 2
metadata/Makefile.am | 75
metadata/annotate.xml.in | 1
metadata/blur.xml.in | 3
metadata/clone.xml.in | 1
metadata/commands.xml.in | 225 ++
metadata/core.xml.in | 487 ----
metadata/core.xml.in.in | 335 +++
metadata/cube.xml.in | 236 +-
metadata/dbus.xml.in | 1
metadata/decoration.xml.in | 1
metadata/fade.xml.in | 52
metadata/fs.xml.in | 1
metadata/glib.xml.in | 1
metadata/gnomecompat.xml.in | 52
metadata/inotify.xml.in | 1
metadata/minimize.xml.in | 1
metadata/move.xml.in | 1
metadata/obs.xml.in | 169 +
metadata/place.xml.in | 83
metadata/png.xml.in | 1
metadata/regex.xml.in | 1
metadata/resize.xml.in | 64
metadata/rotate.xml.in | 339 +--
metadata/scale.xml.in | 312 +-
metadata/screenshot.xml.in | 1
metadata/svg.xml.in | 1
metadata/switcher.xml.in | 142 -
metadata/video.xml.in | 1
metadata/water.xml.in | 1
metadata/wobbly.xml.in | 2
metadata/zoom.xml.in | 1
plugins/Makefile.am | 13
plugins/annotate.c | 5
plugins/blur.c | 36
plugins/clone.c | 6
plugins/commands.c | 352 +++
plugins/cube.c | 17
plugins/dbus.c | 201 +
plugins/decoration.c | 107
plugins/fade.c | 346 ++-
plugins/gconf.c | 19
plugins/glib.c | 4
plugins/gnomecompat.c | 344 +++
plugins/ini.c | 30
plugins/kconfig.cpp | 8
plugins/minimize.c | 96
plugins/move.c | 23
plugins/obs.c | 746 ++++++
plugins/place.c | 258 +-
plugins/regex.c | 4
plugins/resize.c | 49
plugins/rotate.c | 30
plugins/scale.c | 107
plugins/screenshot.c | 7
plugins/svg.c | 3
plugins/switcher.c | 44
plugins/video.c | 14
plugins/water.c | 19
plugins/wobbly.c | 3
plugins/zoom.c | 3
po/POTFILES.in | 6
po/af.po | 1597 +++++++++-----
po/ar.po | 1530 ++++++++------
po/bg.po | 2338 +++++++++++++--------
po/bn.po | 1734 ++++++++++------
po/bn_IN.po | 1732 ++++++++++------
po/bs.po | 1579 +++++++++-----
po/ca.po | 1755 ++++++++++------
po/cs.po | 1667 +++++++++------
po/cy.po | 1618 +++++++++------
po/da.po | 1747 ++++++++++------
po/de.po | 1755 ++++++++++------
po/el.po | 1768 ++++++++++------
po/en_GB.po | 1661 +++++++++------
po/en_US.po | 1555 +++++++++-----
po/es.po | 1842 ++++++++++-------
po/et.po | 1658 +++++++++------
po/eu.po | 1983 +++++++++++-------
po/fi.po | 1975 +++++++++++-------
po/fr.po | 1792 ++++++++++------
po/gl.po | 2574 ++++++++++++++----------
po/gu.po | 1688 ++++++++++-----
po/he.po | 1721 ++++++++++------
po/hi.po | 1756 ++++++++++------
po/hr.po | 1677 +++++++++------
po/hu.po | 1673 +++++++++------
po/id.po | 1566 +++++++++-----
po/it.po | 1796 ++++++++++------
po/ja.po | 1722 ++++++++++------
po/ka.po | 1530 ++++++++------
po/km.po | 1663 +++++++++------
po/ko.po | 1696 ++++++++++-----
po/lo.po | 1530 ++++++++------
po/lt.po | 1655 +++++++++------
po/mk.po | 1533 ++++++++------
po/mr.po | 1599 +++++++++-----
po/nb.po | 1707 ++++++++++-----
po/nl.po | 1723 ++++++++++------
po/or.po | 1689 ++++++++++-----
po/pa.po | 1739 ++++++++++------
po/pl.po | 1791 ++++++++++------
po/pt.po | 1771 ++++++++++------
po/pt_BR.po | 1731 ++++++++++------
po/ro.po | 1723 ++++++++++------
po/ru.po | 1724 ++++++++++------
po/sk.po | 1664 +++++++++------
po/sl.po | 1796 ++++++++++------
po/sr.po | 1718 ++++++++++------
po/sv.po | 1709 ++++++++++-----
po/ta.po | 1536 ++++++++------
po/tr.po | 1855 +++++++++++------
po/uk.po | 1873 ++++++++++-------
po/vi.po | 1530 ++++++++------
po/xh.po | 1599 +++++++++-----
po/zh_CN.po | 2552 +++++++++++++----------
po/zh_TW.po | 1720 ++++++++++------
po/zu.po | 1599 +++++++++-----
src/action.c | 6
src/core.c | 13
src/display.c | 337 ---
src/event.c | 422 ++-
src/fragment.c | 6
src/main.c | 53
src/match.c | 19
src/metadata.c | 24
src/option.c | 12
src/paint.c | 9
src/plugin.c | 91
src/screen.c | 372 +--
src/session.c | 62
src/texture.c | 8
src/window.c | 854 +++++--
172 files changed, 67841 insertions(+), 38657 deletions(-)
New commits:
commit f18bdbbdc96b894dd6a323622ed0d7af4c166376
Author: Sean Finney <seanius@debian.org>
Date: Wed Apr 1 00:01:41 2009 +0200
changelog with initial 0.8.2-1 updates (not yet ready)
diff --git a/debian/changelog b/debian/changelog
index 797dde1..66ed902 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+compiz (0.8.2-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+ * remove obsolete disable-libx11-xcb-support.patch
+ * remove xscreensaver-damage-fix.patch (incorporated upstream)
+ * massage offsets/context for remaining patches
+ * update location of compiz-gnome desktop file
+ * add new app desktop file for compiz to compiz-core
+ * update build-deps to use kdebase-workspace-dev
+ * disable kde3 decorator and enable kde4 decorator
+ * include a gbp.conf for use with git-buildpackage
+
+ -- Sean Finney <seanius@debian.org> Wed, 01 Apr 2009 00:00:10 +0200
+
compiz (0.7.6-8) unstable; urgency=low
* Don't run glib-gettextize, to fix FTBFS caused by intltoolize changes
commit 4ae1283ec889ef9d4340b7f84d391b4879ae47da
Author: Sean Finney <seanius@debian.org>
Date: Tue Mar 31 23:48:51 2009 +0200
include a gbp.conf for use with git-buildpackage
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..be98ba2
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,8 @@
+[DEFAULT]
+debian-branch = debian-unstable
+debian-tag = compiz-%(version)s
+upstream-branch = upstream-unstable
+upstream-tag = compiz-%(version)s
+
+[git-dch]
+meta = 1
commit 87682e413c0bf2b14460fc1cdd497d5decdb256b
Author: Sean Finney <seanius@debian.org>
Date: Tue Mar 31 23:43:37 2009 +0200
disable kde3 decorator and enable kde4 decorator
diff --git a/debian/rules b/debian/rules
index 894c1c1..8acf5f2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -38,6 +38,8 @@ INSTALL = /usr/bin/install
confflags += --disable-static \
--disable-fuse \
+ --disable-kde \
+ --enable-kde4 \
--enable-librsvg \
--enable-gconf \
--enable-gconf-dump
commit e8df33041c20aa5ddd8fe43cf2a63511fd42ad2a
Author: Sean Finney <seanius@debian.org>
Date: Tue Mar 31 23:24:50 2009 +0200
update build-deps to use kdebase-workspace-dev
diff --git a/debian/control b/debian/control
index bc9af64..fe63311 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,9 @@ Priority: optional
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Uploaders: Thierry Reding <thierry@gilfi.de>, David Nusinow <dnusinow@debian.org>, Sean Finney <seanius@debian.org>
Build-Depends: autoconf, automake1.9, autotools-dev,
- debhelper (>= 5), intltool, kdebase-dev, libcairo-dev, libdbus-qt-1-dev,
+ debhelper (>= 5), intltool,
+ kdebase-workspace-dev,
+ libcairo-dev, libdbus-qt-1-dev,
libdbus-glib-1-dev, libgconf2-dev,
libgl1-mesa-dev (>= 6.5.1) | libgl-dev, libglib2.0-dev, libgnome-desktop-dev,
libgnome-window-settings-dev, libgtk2.0-dev, libice-dev (>= 1:1.0.1),
commit b2b52855dcf1734e07dfb9980e2b6264722eee62
Author: Sean Finney <seanius@debian.org>
Date: Tue Mar 31 23:10:33 2009 +0200
add new app desktop file for compiz to compiz-core
diff --git a/debian/compiz-core.install b/debian/compiz-core.install
index 97bdc2a..092e068 100644
--- a/debian/compiz-core.install
+++ b/debian/compiz-core.install
@@ -1,3 +1,4 @@
usr/bin/compiz*
usr/share/compiz
usr/share/locale
+usr/share/applications/compiz.desktop
commit c54f898965f665aae0a154c99665a65f9d554de6
Author: Sean Finney <seanius@debian.org>
Date: Tue Mar 31 23:03:08 2009 +0200
update location of compiz-gnome desktop file
diff --git a/debian/compiz-gnome.install b/debian/compiz-gnome.install
index 1da10d6..dfd4ec7 100644
--- a/debian/compiz-gnome.install
+++ b/debian/compiz-gnome.install
@@ -1,2 +1,2 @@
usr/lib/window-manager-settings/libcompiz.so usr/lib/libgnome-window-settings1
-usr/share/gnome/wm-properties/compiz.desktop
+usr/share/gnome/wm-properties/compiz-wm.desktop
commit f91d5c5211d345085a2a70e8c1e69646c98159b5
Author: Sean Finney <seanius@debian.org>
Date: Tue Mar 31 22:48:28 2009 +0200
massage offsets/context for remaining patches
diff --git a/debian/patches/012_snap-by-default.patch b/debian/patches/012_snap-by-default.patch
index b4e6d54..fb6b362 100644
--- a/debian/patches/012_snap-by-default.patch
+++ b/debian/patches/012_snap-by-default.patch
@@ -5,7 +5,7 @@ Not submitted to upstream.
--- 0-compiz.orig/metadata/wobbly.xml.in
+++ 0-compiz/metadata/wobbly.xml.in
-@@ -18,7 +18,7 @@
+@@ -20,7 +20,7 @@
<option name="snap_inverted" type="bool">
<_short>Snap Inverted</_short>
<_long>Inverted window snapping</_long>
diff --git a/debian/patches/015_optional-fbo.patch b/debian/patches/015_optional-fbo.patch
index a084eda..213c7b0 100644
--- a/debian/patches/015_optional-fbo.patch
+++ b/debian/patches/015_optional-fbo.patch
@@ -10,23 +10,23 @@
extern char *defaultTextureFilter;
--- 0-compiz.orig/src/main.c
+++ 0-compiz/src/main.c
-@@ -62,6 +62,7 @@ Bool strictBinding = TRUE;
+@@ -63,6 +63,7 @@ Bool strictBinding = TRUE;
Bool noDetection = FALSE;
- Bool useDesktopHints = TRUE;
+ Bool useDesktopHints = FALSE;
Bool onlyCurrentScreen = FALSE;
+Bool noFBO = FALSE;
+ static Bool debugOutput = FALSE;
#ifdef USE_COW
- Bool useCow = TRUE;
-@@ -83,6 +84,7 @@ usage (void)
+@@ -84,6 +85,7 @@ usage (void)
+ "[--keep-desktop-hints] "
+ "[--loose-binding] "
+ "[--replace]\n "
++ "[--no-fbo] "
"[--sm-disable] "
"[--sm-client-id ID] "
- "[--no-detection]\n "
-+ "[--no-fbo] "
- "[--ignore-desktop-hints] "
- "[--only-current-screen]"
-
-@@ -329,6 +331,10 @@ main (int argc, char **argv)
+ "[--only-current-screen]\n "
+@@ -343,6 +345,10 @@ main (int argc, char **argv)
{
onlyCurrentScreen = TRUE;
}
@@ -39,7 +39,7 @@
else if (!strcmp (argv[i], "--use-root-window"))
--- 0-compiz.orig/src/screen.c
+++ 0-compiz/src/screen.c
-@@ -2060,7 +2060,7 @@ addScreen (CompDisplay *display,
+@@ -2063,7 +2063,7 @@ addScreen (CompDisplay *display,
}
s->fbo = 0;
commit 667b454ff893e06118ab438cb3d6c0d433943548
Author: Sean Finney <seanius@debian.org>
Date: Tue Mar 31 22:47:10 2009 +0200
remove xscreensaver-damage-fix.patch (incorporated upstream)
diff --git a/debian/patches/series b/debian/patches/series
index a7fe01d..0feab7e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,5 +3,4 @@
015_optional-fbo.patch
compiz-manager-posixly-correct.patch
compiz-manager-nvidia-settings-optional.patch
-xscreensaver-damage-fix.patch
whitelist-fglrx.patch
diff --git a/debian/patches/xscreensaver-damage-fix.patch b/debian/patches/xscreensaver-damage-fix.patch
deleted file mode 100644
index a46a127..0000000
--- a/debian/patches/xscreensaver-damage-fix.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-imported from upstream commit aed97c441881d9c382c7865d0305fc8f884c10ac
-fixes #483170
---- 0-compiz.orig/src/screen.c
-+++ 0-compiz/src/screen.c
-@@ -2420,6 +2420,13 @@ damageScreenRegion (CompScreen *screen,
- XUnionRegion (screen->damage, region, screen->damage);
-
- screen->damageMask |= COMP_SCREEN_DAMAGE_REGION_MASK;
-+
-+ /* if the number of damage rectangles grows two much between repaints,
-+ we have a lot of overhead just for doing the damage tracking -
-+ in order to make sure we're not having too much overhead, damage
-+ the whole screen if we have a lot of damage rects */
-+ if (screen->damage->numRects > 100)
-+ damageScreen (screen);
- }
-
- void
commit f0e481a05d105446514bf720114b34ad7ec1c825
Author: Sean Finney <seanius@debian.org>
Date: Tue Mar 31 22:46:26 2009 +0200
remove obsolete disable-libx11-xcb-support.patch
diff --git a/debian/patches/disable-libx11-xcb-support.patch b/debian/patches/disable-libx11-xcb-support.patch
deleted file mode 100644
index d56d624..0000000
--- a/debian/patches/disable-libx11-xcb-support.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-disable-libx11-xcb-support.patch
-origin: http://gitweb.opencompositing.org/?p=users/3v1n0/compiz-patches;a=blob_plain;f=disable-libx11-xcb-support.patch;hb=4b8e083acf9b1779a9de43ed295b6a4a86594f10
-locally modified to reflect 0.7.4 updates
---- 0-compiz.orig/configure.ac
-+++ 0-compiz/configure.ac
-@@ -118,8 +118,7 @@ AC_SUBST(imagedir)
- metadatadir=$datadir/compiz
- AC_SUBST(metadatadir)
-
--COMPIZ_REQUIRES="x11-xcb \
-- xcomposite \
-+COMPIZ_REQUIRES="xcomposite \
- xfixes \
- xdamage \
- xrandr \
---- 0-compiz.orig/include/compiz-core.h
-+++ 0-compiz/include/compiz-core.h
-@@ -33,7 +33,7 @@
- #include <stdio.h>
- #include <sys/time.h>
-
--#include <X11/Xlib-xcb.h>
-+#include <X11/Xlib.h>
- #include <X11/Xutil.h>
- #include <X11/extensions/Xdamage.h>
- #include <X11/extensions/Xcomposite.h>
-@@ -897,8 +897,6 @@ struct _CompDisplay {
-
- CompDisplay *next;
-
-- xcb_connection_t *connection;
--
- Display *display;
- CompScreen *screens;
-
---- 0-compiz.orig/src/display.c
-+++ 0-compiz/src/display.c
-@@ -2054,8 +2054,6 @@ addDisplay (const char *name)
- return FALSE;
- }
-
-- d->connection = XGetXCBConnection (dpy);
--
- if (!compInitDisplayOptionsFromMetadata (d,
- &coreMetadata,
- coreDisplayOptionInfo,
diff --git a/debian/patches/series b/debian/patches/series
index 7cad7b6..a7fe01d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,6 +3,5 @@
015_optional-fbo.patch
compiz-manager-posixly-correct.patch
compiz-manager-nvidia-settings-optional.patch
-disable-libx11-xcb-support.patch
xscreensaver-damage-fix.patch
whitelist-fglrx.patch
commit 5255610f8030b8baad799f53cdc3e035a770c0cf
Author: Dennis Kasprzyk <onestone@compiz-fusion.org>
Date: Tue Mar 10 20:59:21 2009 +0100
Support Qt 4.4
diff --git a/kde/window-decorator-kde4/decorator.cpp b/kde/window-decorator-kde4/decorator.cpp
index 93be78d..2bc70b4 100644
--- a/kde/window-decorator-kde4/decorator.cpp
+++ b/kde/window-decorator-kde4/decorator.cpp
@@ -90,9 +90,15 @@ KWD::PluginManager::PluginManager (KSharedConfigPtr config):
"kwin3_oxygen" : "kwin3_plastik";
}
-
+#ifdef QT_45
KWD::Decorator::Decorator () :
KApplication (),
+#else
+KWD::Decorator::Decorator (Display* display,
+ Qt::HANDLE visual,
+ Qt::HANDLE colormap) :
+ KApplication (display, visual, colormap),
+#endif
mConfig (0),
mCompositeWindow (0),
mSwitcher (0)
diff --git a/kde/window-decorator-kde4/decorator.h b/kde/window-decorator-kde4/decorator.h
index e3c6d75..0ab3522 100644
--- a/kde/window-decorator-kde4/decorator.h
+++ b/kde/window-decorator-kde4/decorator.h
@@ -41,6 +41,7 @@
#include "window.h"
#include "switcher.h"
#include "kdecoration_plugins.h"
+#include "utils.h"
#define ROOT_OFF_X 8192
#define ROOT_OFF_Y 8192
@@ -84,7 +85,11 @@ class PluginManager:public KDecorationPlugins {
class Decorator:public KApplication {
Q_OBJECT public:
+#ifdef QT_45
Decorator ();
+#else
+ Decorator (Display* display, Qt::HANDLE visual, Qt::HANDLE colormap);
+#endif
~Decorator (void);
static NETRootInfo *rootInfo (void)
diff --git a/kde/window-decorator-kde4/main.cpp b/kde/window-decorator-kde4/main.cpp
index c171c94..a035a9b 100644
--- a/kde/window-decorator-kde4/main.cpp
+++ b/kde/window-decorator-kde4/main.cpp
@@ -31,6 +31,7 @@
#include <KDE/KLocale>
#include "decorator.h"
+#include "utils.h"
#include <QX11Info>
#include <QtDBus/QtDBus>
@@ -48,6 +49,14 @@ main (int argc, char **argv)
Time timestamp;
QString appname;
+#ifndef QT_45
+ Colormap colormap = 0;
+ Visual *visual = 0;
+ int event_base, error_base;
+ Display *dpy;
+ int screen;
+#endif
+
options.add ("replace", ki18n ("Replace existing window decorator"));
options.add ("sm-disable", ki18n ("Disable connection to session manager"));
options.add ("opacity <value>", ki18n ("Decoration opacity"), "0.75");
@@ -92,7 +101,44 @@ main (int argc, char **argv)
// Disable window less child widgets
QApplication::setAttribute(Qt::AA_NativeWindows, true);
+#ifdef QT_45
app = new KWD::Decorator ();
+#else
+ dpy = XOpenDisplay(0); // open default display
+ screen = DefaultScreen (dpy);
+ if (!dpy) {
+ kError() << "Cannot connect to the X server" << endl;
+ return 0;
+ }
+
+ if (XRenderQueryExtension (dpy, &event_base, &error_base))
+ {
+ int nvi;
+ XVisualInfo templ;
+ templ.screen = screen;
+ templ.depth = 32;
+ templ.c_class = TrueColor;
+ XVisualInfo *xvi = XGetVisualInfo (dpy, VisualScreenMask |
+ VisualDepthMask |
+ VisualClassMask, &templ, &nvi);
+
+ for (int i = 0; i < nvi; i++)
+ {
+ XRenderPictFormat *format =
+ XRenderFindVisualFormat (dpy, xvi[i].visual);
+ if (format->type == PictTypeDirect && format->direct.alphaMask)
+ {
+ visual = xvi[i].visual;
+ colormap = XCreateColormap (dpy, RootWindow (dpy, screen),
+ visual, AllocNone);
+ break;
+ }
+ }
+ }
+
+ app = new KWD::Decorator (dpy, visual ? Qt::HANDLE(visual) : 0,
+ colormap ? Qt::HANDLE(colormap) : 0);
+#endif
if (args->isSet ("sm-disable"))
app->disableSessionManagement ();
diff --git a/kde/window-decorator-kde4/switcher.cpp b/kde/window-decorator-kde4/switcher.cpp
index 20b5fc6..440e071 100644
--- a/kde/window-decorator-kde4/switcher.cpp
+++ b/kde/window-decorator-kde4/switcher.cpp
@@ -115,6 +115,7 @@ KWD::Switcher::updateGeometry ()
if (mX11BackgroundPixmap)
XFreePixmap (QX11Info::display (), mX11BackgroundPixmap);
+#ifdef QT_45
mX11Pixmap = XCreatePixmap (QX11Info::display (),
QX11Info::appRootWindow (),
width + mBorder.left + mBorder.right,
@@ -123,10 +124,15 @@ KWD::Switcher::updateGeometry ()
mX11BackgroundPixmap = XCreatePixmap (QX11Info::display (),
QX11Info::appRootWindow (),
width, height, 32);
-
+
mPixmap = QPixmap::fromX11Pixmap (mX11Pixmap, QPixmap::ExplicitlyShared);
mBackgroundPixmap = QPixmap::fromX11Pixmap (mX11BackgroundPixmap,
QPixmap::ExplicitlyShared);
+#else
+ mPixmap = QPixmap (width + mBorder.left + mBorder.right,
+ height + mBorder.top + mBorder.bottom);
+ mBackgroundPixmap = QPixmap (width, height);
+#endif
redrawPixmap ();
update ();
@@ -160,7 +166,11 @@ KWD::Switcher::redrawPixmap ()
mGeometry.width (), mGeometry.height ());
XSetWindowBackgroundPixmap (QX11Info::display (), mId,
+#ifdef QT_45
mX11BackgroundPixmap);
+#else
+ mBackgroundPixmap.handle ());
+#endif
XClearWindow (QX11Info::display (), mId);
}
@@ -218,12 +228,17 @@ KWD::Switcher::updateWindowProperties ()
nQuad = decor_set_lXrXtXbX_window_quads (quads, &mContext, &mDecorLayout,
lh / 2, rh / 2, w, w / 2);
-
+#ifdef QT_45
decor_quads_to_property (data, mX11Pixmap,
&mBorder, &mBorder,
0, 0,
quads, nQuad);
-
+#else
+ decor_quads_to_property (data, mPixmap.handle (),
+ &mBorder, &mBorder,
+ 0, 0,
+ quads, nQuad);
+#endif
KWD::trapXError ();
XChangeProperty (QX11Info::display(), mId, Atoms::netWindowDecor,
XA_INTEGER, 32, PropModeReplace, (unsigned char *) data,
diff --git a/kde/window-decorator-kde4/utils.h b/kde/window-decorator-kde4/utils.h
index 121f276..1283053 100644
--- a/kde/window-decorator-kde4/utils.h
+++ b/kde/window-decorator-kde4/utils.h
@@ -28,6 +28,12 @@
#include <fixx11h.h>
#include <QWidget>
+#include <qglobal.h>
+
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 5, 0))
+ #define QT_45
+#endif
+
namespace KWD
{
namespace Atoms
commit fb509e611feaf775144d03055f2e0314c58f16ca
Author: Dennis Kasprzyk <onestone@compiz-fusion.org>
Date: Tue Mar 10 02:58:52 2009 +0100
Added support for QT 4.5 raster graphicssystem.
diff --git a/kde/window-decorator-kde4/decorator.cpp b/kde/window-decorator-kde4/decorator.cpp
index 17f71ae..93be78d 100644
--- a/kde/window-decorator-kde4/decorator.cpp
+++ b/kde/window-decorator-kde4/decorator.cpp
@@ -91,10 +91,8 @@ KWD::PluginManager::PluginManager (KSharedConfigPtr config):
}
-KWD::Decorator::Decorator (Display* display,
- Qt::HANDLE visual,
- Qt::HANDLE colormap) :
- KApplication (display, visual, colormap),
+KWD::Decorator::Decorator () :
+ KApplication (),
mConfig (0),
mCompositeWindow (0),
mSwitcher (0)
diff --git a/kde/window-decorator-kde4/decorator.h b/kde/window-decorator-kde4/decorator.h
index 65802c4..e3c6d75 100644
--- a/kde/window-decorator-kde4/decorator.h
+++ b/kde/window-decorator-kde4/decorator.h
@@ -84,7 +84,7 @@ class PluginManager:public KDecorationPlugins {
class Decorator:public KApplication {
Q_OBJECT public:
- Decorator (Display* display, Qt::HANDLE visual, Qt::HANDLE colormap);
+ Decorator ();
~Decorator (void);
static NETRootInfo *rootInfo (void)
diff --git a/kde/window-decorator-kde4/main.cpp b/kde/window-decorator-kde4/main.cpp
index 781edbe..c171c94 100644
--- a/kde/window-decorator-kde4/main.cpp
+++ b/kde/window-decorator-kde4/main.cpp
@@ -46,11 +46,6 @@ main (int argc, char **argv)
int status;
int event, error;
Time timestamp;
- Colormap colormap = 0;
- Visual *visual = 0;
- int event_base, error_base;
- Display *dpy;
- int screen;
QString appname;
options.add ("replace", ki18n ("Replace existing window decorator"));
@@ -94,43 +89,10 @@ main (int argc, char **argv)
blurType = BLUR_TYPE_ALL;
}
- dpy = XOpenDisplay(0); // open default display
- screen = DefaultScreen (dpy);
- if (!dpy) {
- kError() << "Cannot connect to the X server" << endl;
- return 0;
- }
-
- if (XRenderQueryExtension (dpy, &event_base, &error_base))
- {
- int nvi;
- XVisualInfo templ;
- templ.screen = screen;
- templ.depth = 32;
- templ.c_class = TrueColor;
- XVisualInfo *xvi = XGetVisualInfo (dpy, VisualScreenMask |
- VisualDepthMask |
- VisualClassMask, &templ, &nvi);
-
- for (int i = 0; i < nvi; i++)
- {
- XRenderPictFormat *format =
- XRenderFindVisualFormat (dpy, xvi[i].visual);
- if (format->type == PictTypeDirect && format->direct.alphaMask)
- {
- visual = xvi[i].visual;
- colormap = XCreateColormap (dpy, RootWindow (dpy, screen),
- visual, AllocNone);
- break;
- }
- }
- }
-
// Disable window less child widgets
QApplication::setAttribute(Qt::AA_NativeWindows, true);
- app = new KWD::Decorator (dpy, visual ? Qt::HANDLE(visual) : 0,
- colormap ? Qt::HANDLE(colormap) : 0);
+ app = new KWD::Decorator ();
if (args->isSet ("sm-disable"))
app->disableSessionManagement ();
diff --git a/kde/window-decorator-kde4/switcher.cpp b/kde/window-decorator-kde4/switcher.cpp
index 83e5c40..20b5fc6 100644
--- a/kde/window-decorator-kde4/switcher.cpp
+++ b/kde/window-decorator-kde4/switcher.cpp
@@ -39,7 +39,9 @@
#include <QPainter>
KWD::Switcher::Switcher (WId parentId, WId id):
-mId (id)
+ mId (id),
+ mX11Pixmap (0),
+ mX11BackgroundPixmap (0)
{
QPalette palette;
long prop[4];
@@ -86,6 +88,10 @@ mId (id)
KWD::Switcher::~Switcher ()
{
+ if (mX11Pixmap)
+ XFreePixmap (QX11Info::display (), mX11Pixmap);
+ if (mX11BackgroundPixmap)
+ XFreePixmap (QX11Info::display (), mX11BackgroundPixmap);
delete mBackground;
}
@@ -104,8 +110,23 @@ KWD::Switcher::updateGeometry ()
KWD::readWindowProperty (mId, Atoms::switchSelectWindow,
(long *)&mSelected);
- mPixmap = QPixmap (width + mBorder.left + mBorder.right,
- height + mBorder.top + mBorder.bottom);
+ if (mX11Pixmap)
+ XFreePixmap (QX11Info::display (), mX11Pixmap);
+ if (mX11BackgroundPixmap)
+ XFreePixmap (QX11Info::display (), mX11BackgroundPixmap);
+
+ mX11Pixmap = XCreatePixmap (QX11Info::display (),
+ QX11Info::appRootWindow (),
+ width + mBorder.left + mBorder.right,
+ height + mBorder.top + mBorder.bottom, 32);
+
+ mX11BackgroundPixmap = XCreatePixmap (QX11Info::display (),
+ QX11Info::appRootWindow (),
+ width, height, 32);
+
+ mPixmap = QPixmap::fromX11Pixmap (mX11Pixmap, QPixmap::ExplicitlyShared);
+ mBackgroundPixmap = QPixmap::fromX11Pixmap (mX11BackgroundPixmap,
+ QPixmap::ExplicitlyShared);
redrawPixmap ();
update ();
@@ -122,6 +143,7 @@ void
KWD::Switcher::redrawPixmap ()
{
QPainter p (&mPixmap);
+ QPainter bp (&mBackgroundPixmap);
const int contentWidth = mPixmap.width ();
const int contentHeight = mPixmap.height ();
@@ -134,12 +156,12 @@ KWD::Switcher::redrawPixmap ()
mBackground->resizeFrame (QSizeF (contentWidth, contentHeight));
mBackground->paintFrame (&p, QRect (0, 0, contentWidth, contentHeight));
- mBackgroundPixmap = mPixmap.copy (mBorder.left, mBorder.top,
- mGeometry.width (),
- mGeometry.height ());
+ bp.drawPixmap (0, 0, mPixmap, mBorder.left, mBorder.top,
+ mGeometry.width (), mGeometry.height ());
XSetWindowBackgroundPixmap (QX11Info::display (), mId,
- mBackgroundPixmap.handle ());
+ mX11BackgroundPixmap);
+
XClearWindow (QX11Info::display (), mId);
}
@@ -197,7 +219,7 @@ KWD::Switcher::updateWindowProperties ()
nQuad = decor_set_lXrXtXbX_window_quads (quads, &mContext, &mDecorLayout,
lh / 2, rh / 2, w, w / 2);
- decor_quads_to_property (data, mPixmap.handle (),
+ decor_quads_to_property (data, mX11Pixmap,
&mBorder, &mBorder,
0, 0,
quads, nQuad);
diff --git a/kde/window-decorator-kde4/switcher.h b/kde/window-decorator-kde4/switcher.h
index bc969d7..f6305a0 100644
--- a/kde/window-decorator-kde4/switcher.h
+++ b/kde/window-decorator-kde4/switcher.h
@@ -72,7 +72,9 @@ class Switcher
Plasma::FrameSvg *mBackground;
QPixmap mPixmap;
+ Pixmap mX11Pixmap;
QPixmap mBackgroundPixmap;
+ Pixmap mX11BackgroundPixmap;
decor_layout_t mDecorLayout;
decor_context_t mContext;
diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp
index 68c856b..e058979 100644
--- a/kde/window-decorator-kde4/window.cpp
+++ b/kde/window-decorator-kde4/window.cpp
@@ -70,6 +70,8 @@ KWD::Window::Window (WId parentId,
mClientId (clientId),
mSelectedId (0),
mDecor (0),
+ mTexturePixmap (0),
+ mTexturePixmapBuffer (0),
mPixmap (0),
mDamageId (0),
mShadow (0),
@@ -177,6 +179,12 @@ KWD::Window::~Window (void)
if (mDecorationPicture)
XRenderFreePicture (QX11Info::display(), mDecorationPicture);
+ if (mTexturePixmap)
+ XFreePixmap (QX11Info::display(), mTexturePixmap);
+
+ if (mTexturePixmapBuffer)
+ XFreePixmap (QX11Info::display(), mTexturePixmapBuffer);
+
if (mDecor)
delete mDecor;
@@ -1117,19 +1125,30 @@ KWD::Window::updateShadow (void)
if (mTexturePicture)
XRenderFreePicture (QX11Info::display(), mTexturePicture);
- mTexturePixmap = QPixmap (mLayout.width, mLayout.height);
- mTexturePixmapBuffer = QPixmap (mLayout.width, mLayout.height);
+ if (mTexturePixmap)
+ XFreePixmap (QX11Info::display(), mTexturePixmap);
+
+ if (mTexturePixmapBuffer)
+ XFreePixmap (QX11Info::display(), mTexturePixmapBuffer);
+
+ mTexturePixmap = XCreatePixmap (QX11Info::display(),
+ QX11Info::appRootWindow (),
+ mLayout.width, mLayout.height, 32);
+ mTexturePixmapBuffer = XCreatePixmap (QX11Info::display(),
+ QX11Info::appRootWindow (),
+ mLayout.width, mLayout.height, 32);
+ mTexturePixmapSize = QSize (mLayout.width, mLayout.height);
xformat = XRenderFindStandardFormat (QX11Info::display(),
PictStandardARGB32);
mDecorationPicture =
XRenderCreatePicture (QX11Info::display(),
- mTexturePixmap.handle (),
+ mTexturePixmap,
xformat, 0, NULL);
mTexturePicture =
XRenderCreatePicture (QX11Info::display(),
- mTexturePixmapBuffer.handle (),
+ mTexturePixmapBuffer,
xformat, 0, NULL);
decor_fill_picture_extents_with_shadow (QX11Info::display(),
@@ -1560,7 +1579,7 @@ KWD::Window::updateProperty (void)
minWidth = 1;
}
- decor_quads_to_property (data, mTexturePixmap.handle (),
+ decor_quads_to_property (data, mTexturePixmap,
&mBorder, &maxExtents,
minWidth, 0,
quads, nQuad);
@@ -2173,8 +2192,8 @@ KWD::Window::processDamage (void)
0, 0,
0, 0,
0, 0,
- mTexturePixmap.width (),
- mTexturePixmap.height ());
+ mTexturePixmapSize.width (),
+ mTexturePixmapSize.height ());
if (mUpdateProperty)
updateProperty ();
diff --git a/kde/window-decorator-kde4/window.h b/kde/window-decorator-kde4/window.h
index 034e6fe..5636c6a 100644
--- a/kde/window-decorator-kde4/window.h
+++ b/kde/window-decorator-kde4/window.h
@@ -228,8 +228,9 @@ class Window:public QWidget, public KDecorationBridgeUnstable {
decor_extents_t mBorder;
unsigned short mOpacity;
KDecoration *mDecor;
- QPixmap mTexturePixmap;
- QPixmap mTexturePixmapBuffer;
+ Pixmap mTexturePixmap;
+ Pixmap mTexturePixmapBuffer;
+ QSize mTexturePixmapSize;
Pixmap mPixmap;
QRegion mDamage;
WId mDamageId;
commit 6a300bb76ce1d5cce5ed9937e720cae37ba32270
Author: Christopher Williams <crdlb@compiz-fusion.org>
Date: Mon Mar 9 08:29:18 2009 +0100
When a user tries to resize by clicking on the center, don't pass the input down to the window.
diff --git a/plugins/resize.c b/plugins/resize.c
index 8943306..a192c0d 100644
--- a/plugins/resize.c
+++ b/plugins/resize.c
@@ -365,9 +365,9 @@ resizeInitiate (CompDisplay *d,
mask |= ResizeDownMask;
/* if the pointer was in the middle of the window,
- do nothing */
+ just prevent input to the window */
if (!mask)
- return FALSE;
+ return TRUE;
}
if (otherScreenGrabExist (w->screen, "resize", 0))
commit bf0e8c873aff450de9714acd643d18e217f34851
Author: Danny Baumann <dannybaumann@web.de>
Date: Sun Mar 1 13:21:45 2009 +0100
Reply to: