NEWS | 30 configure.ac | 18 debian/changelog | 4 debian/patches/012_snap-by-default.patch | 6 debian/patches/014_fix-no-border-window-shadow.patch | 8 debian/patches/015_optional-fbo.patch | 20 debian/patches/compiz-manager-nvidia-settings-optional.patch | 8 debian/patches/compiz-manager-posixly-correct.patch | 8 debian/patches/disable-libx11-xcb-support.patch | 20 gtk/window-decorator/gtk-window-decorator.c | 237 - include/compiz-core.h | 31 include/compiz-cube.h | 71 include/decoration.h | 63 kde/window-decorator-kde4/decorator.cpp | 17 kde/window-decorator-kde4/main.cpp | 3 kde/window-decorator-kde4/switcher.cpp | 121 kde/window-decorator-kde4/switcher.h | 4 kde/window-decorator-kde4/window.cpp | 82 kde/window-decorator-kde4/window.h | 12 kde/window-decorator/window.cpp | 80 libdecoration/decoration.c | 435 + metadata/Makefile.am | 1 metadata/core.xml.in | 5 metadata/cube.xml.in | 5 metadata/place.xml.in | 32 metadata/plane.xml.in | 83 metadata/switcher.xml.in | 18 plugins/Makefile.am | 17 plugins/blur.c | 329 - plugins/cube.c | 380 - plugins/place.c | 1884 +++----- plugins/plane.c | 766 --- plugins/resize.c | 19 plugins/rotate.c | 10 plugins/scale.c | 5 plugins/switcher.c | 287 - po/POTFILES.in | 1 po/af.po | 597 +- po/ar.po | 570 +- po/bg.po | 767 +-- po/bn.po | 711 +-- po/bn_IN.po | 711 +-- po/bs.po | 600 +- po/ca.po | 853 +-- po/cs.po | 780 +-- po/cy.po | 606 +- po/da.po | 778 +-- po/de.po | 722 +-- po/el.po | 751 +-- po/en_GB.po | 765 +-- po/en_US.po | 610 +- po/es.po | 743 +-- po/et.po | 771 +-- po/eu.po | 708 +-- po/fi.po | 789 +-- po/fr.po | 708 +-- po/gl.po | 708 +-- po/gu.po | 714 +-- po/he.po | 2323 ++++------ po/hi.po | 778 +-- po/hr.po | 765 +-- po/hu.po | 738 +-- po/id.po | 595 +- po/it.po | 736 +-- po/ja.po | 2035 +-------- po/ka.po | 570 +- po/km.po | 767 +-- po/ko.po | 760 +-- po/lo.po | 570 +- po/lt.po | 767 +-- po/mk.po | 570 +- po/mr.po | 595 +- po/nb.po | 722 +-- po/nl.po | 731 +-- po/or.po | 715 +-- po/pa.po | 779 +-- po/pl.po | 1019 ++-- po/pt.po | 769 +-- po/pt_BR.po | 707 +-- po/ro.po | 1846 ++++---- po/ru.po | 1563 +----- po/sk.po | 2472 ++++------- po/sl.po | 767 +-- po/sr.po | 866 +-- po/sv.po | 705 +-- po/ta.po | 570 +- po/tr.po | 767 +-- po/uk.po | 843 +-- po/vi.po | 570 +- po/xh.po | 595 +- po/zh_CN.po | 771 +-- po/zh_TW.po | 806 +-- po/zu.po | 595 +- src/display.c | 17 src/event.c | 65 src/paint.c | 360 - src/screen.c | 49 src/session.c | 25 src/texture.c | 32 src/window.c | 230 - 100 files changed, 23892 insertions(+), 28715 deletions(-)
New commits: commit 41701954ace9ebc1426f2cc47d702b87ede02db9 Author: Sean Finney <[EMAIL PROTECTED]> Date: Tue Jun 3 00:33:20 2008 +0200 new upstream release also merge debian/patches to remove offset adjustments diff --git a/debian/changelog b/debian/changelog index 84d3a04..1161814 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,6 @@ -compiz (0.7.4-2) unstable; urgency=low +compiz (0.7.6-1) unstable; urgency=low + + * New upstream release [ Sean Finney ] * Special-case the gconf and kconfig plugins to go into the -gtk and -kde diff --git a/debian/patches/012_snap-by-default.patch b/debian/patches/012_snap-by-default.patch index 1712d13..b4e6d54 100644 --- a/debian/patches/012_snap-by-default.patch +++ b/debian/patches/012_snap-by-default.patch @@ -3,10 +3,8 @@ Enable snapping of windows by default. This patch originally by Thierry Reding, later modified/updated by Sean Finney Not submitted to upstream. -Index: compiz/metadata/wobbly.xml.in -=================================================================== ---- compiz.orig/metadata/wobbly.xml.in -+++ compiz/metadata/wobbly.xml.in +--- 0-compiz.orig/metadata/wobbly.xml.in ++++ 0-compiz/metadata/wobbly.xml.in @@ -18,7 +18,7 @@ <option name="snap_inverted" type="bool"> <_short>Snap Inverted</_short> diff --git a/debian/patches/014_fix-no-border-window-shadow.patch b/debian/patches/014_fix-no-border-window-shadow.patch index f897e99..7fc4f8c 100644 --- a/debian/patches/014_fix-no-border-window-shadow.patch +++ b/debian/patches/014_fix-no-border-window-shadow.patch @@ -6,11 +6,9 @@ Subject: [PATCH] Fix no border window shadow libdecoration/decoration.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) -Index: compiz/libdecoration/decoration.c -=================================================================== ---- compiz.orig/libdecoration/decoration.c -+++ compiz/libdecoration/decoration.c -@@ -1243,7 +1243,9 @@ +--- 0-compiz.orig/libdecoration/decoration.c ++++ 0-compiz/libdecoration/decoration.c +@@ -1243,7 +1243,9 @@ decor_shadow_create (Display *xdisp } /* create pixmap for temporary decorations */ diff --git a/debian/patches/015_optional-fbo.patch b/debian/patches/015_optional-fbo.patch index d795be0..a084eda 100644 --- a/debian/patches/015_optional-fbo.patch +++ b/debian/patches/015_optional-fbo.patch @@ -1,7 +1,5 @@ -Index: compiz/include/compiz-core.h -=================================================================== ---- compiz.orig/include/compiz-core.h -+++ compiz/include/compiz-core.h +--- 0-compiz.orig/include/compiz-core.h ++++ 0-compiz/include/compiz-core.h @@ -219,6 +219,7 @@ extern Bool useCow; extern Bool noDetection; extern Bool useDesktopHints; @@ -10,10 +8,8 @@ Index: compiz/include/compiz-core.h extern int defaultRefreshRate; extern char *defaultTextureFilter; -Index: compiz/src/main.c -=================================================================== ---- compiz.orig/src/main.c -+++ compiz/src/main.c +--- 0-compiz.orig/src/main.c ++++ 0-compiz/src/main.c @@ -62,6 +62,7 @@ Bool strictBinding = TRUE; Bool noDetection = FALSE; Bool useDesktopHints = TRUE; @@ -41,11 +37,9 @@ Index: compiz/src/main.c #ifdef USE_COW else if (!strcmp (argv[i], "--use-root-window")) -Index: compiz/src/screen.c -=================================================================== ---- compiz.orig/src/screen.c -+++ compiz/src/screen.c -@@ -2037,7 +2037,7 @@ addScreen (CompDisplay *display, +--- 0-compiz.orig/src/screen.c ++++ 0-compiz/src/screen.c +@@ -2060,7 +2060,7 @@ addScreen (CompDisplay *display, } s->fbo = 0; diff --git a/debian/patches/compiz-manager-nvidia-settings-optional.patch b/debian/patches/compiz-manager-nvidia-settings-optional.patch index 4e18cff..7de6fa3 100644 --- a/debian/patches/compiz-manager-nvidia-settings-optional.patch +++ b/debian/patches/compiz-manager-nvidia-settings-optional.patch @@ -1,8 +1,6 @@ -Index: compiz/debian/compiz-manager -=================================================================== ---- compiz.orig/debian/compiz-manager -+++ compiz/debian/compiz-manager -@@ -198,6 +198,10 @@ +--- 0-compiz.orig/debian/compiz-manager ++++ 0-compiz/debian/compiz-manager +@@ -198,6 +198,10 @@ check_xgl() # Check if the nVidia card has enough video ram to make sense check_nvidia_memory() { diff --git a/debian/patches/compiz-manager-posixly-correct.patch b/debian/patches/compiz-manager-posixly-correct.patch index 4b0d4b5..3bb62b3 100644 --- a/debian/patches/compiz-manager-posixly-correct.patch +++ b/debian/patches/compiz-manager-posixly-correct.patch @@ -1,10 +1,8 @@ debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=456628 reported upstream: http://bugs.opencompositing.org/show_bug.cgi?id=708 -Index: compiz/debian/compiz-manager -=================================================================== ---- compiz.orig/debian/compiz-manager -+++ compiz/debian/compiz-manager -@@ -150,7 +150,7 @@ +--- 0-compiz.orig/debian/compiz-manager ++++ 0-compiz/debian/compiz-manager +@@ -150,7 +150,7 @@ check_fbconfig() check_tfp() { verbose "Checking for texture_from_pixmap: " diff --git a/debian/patches/disable-libx11-xcb-support.patch b/debian/patches/disable-libx11-xcb-support.patch index 87c3dab..d56d624 100644 --- a/debian/patches/disable-libx11-xcb-support.patch +++ b/debian/patches/disable-libx11-xcb-support.patch @@ -1,10 +1,8 @@ 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 -Index: compiz/configure.ac -=================================================================== ---- compiz.orig/configure.ac -+++ compiz/configure.ac +--- 0-compiz.orig/configure.ac ++++ 0-compiz/configure.ac @@ -118,8 +118,7 @@ AC_SUBST(imagedir) metadatadir=$datadir/compiz AC_SUBST(metadatadir) @@ -15,10 +13,8 @@ Index: compiz/configure.ac xfixes \ xdamage \ xrandr \ -Index: compiz/include/compiz-core.h -=================================================================== ---- compiz.orig/include/compiz-core.h -+++ compiz/include/compiz-core.h +--- 0-compiz.orig/include/compiz-core.h ++++ 0-compiz/include/compiz-core.h @@ -33,7 +33,7 @@ #include <stdio.h> #include <sys/time.h> @@ -37,11 +33,9 @@ Index: compiz/include/compiz-core.h Display *display; CompScreen *screens; -Index: compiz/src/display.c -=================================================================== ---- compiz.orig/src/display.c -+++ compiz/src/display.c -@@ -2049,8 +2049,6 @@ addDisplay (const char *name) +--- 0-compiz.orig/src/display.c ++++ 0-compiz/src/display.c +@@ -2054,8 +2054,6 @@ addDisplay (const char *name) return FALSE; } commit 9b739fd78cb3f43fa56e14294b171b695340952e Author: Dennis Kasprzyk <[EMAIL PROTECTED]> Date: Thu May 29 14:06:34 2008 +0200 Add NEWS entry and bump version for 0.7.6 release. diff --git a/NEWS b/NEWS index a468c32..9e071a7 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,33 @@ +Release 0.7.6 (2008-05-29 Dennis Kasprzyk <[EMAIL PROTECTED]>) +========================================================================= +Development release. + +Rewrite of place plugin, which significantly improves multi-output +behaviour. + +Configurable multi-output behaviour in place. + +Removed plane plugin. Former plane plugin users are encouraged to use +the wall plugin of Compiz Fusion. + +Removed cube wallpaper painting. Users are encouraged to use the Compiz +Fusion wallpaper plugin instead. + +Place plugin viewport placement viewport numbers are now 1-based. + +Panel and desktop selection mode in switcher plugin. + +Improved painting behaviour when using overlapping outputs. + +Gtk-window-decorator now emits accessibility events when switching. + +Gtk-window-decorator behaviour when using Metacity themes has been +improved to match Metacity better. + +KDE4-window-decorator has been adapted to current KDE4 API. + +Various bugfixes. + Release 0.7.4 (2008-03-04 Dennis Kasprzyk <[EMAIL PROTECTED]>) ========================================================================= Development release. diff --git a/configure.ac b/configure.ac index aea3d27..5ff0cfe 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, 7) -m4_define(compiz_version_micro, 5) +m4_define(compiz_version_micro, 6) AC_INIT([compiz], [compiz_version_major().compiz_version_minor().compiz_version_micro()], commit e1126830348f99762acae92ffa4a16df2438f1de Author: Dennis Kasprzyk <[EMAIL PROTECTED]> Date: Thu May 29 13:51:56 2008 +0200 Applied libdecoration changes to gtk window decorator. diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c index 29d0181..0ebb2d7 100644 --- a/gtk/window-decorator/gtk-window-decorator.c +++ b/gtk/window-decorator/gtk-window-decorator.c @@ -1998,15 +1998,17 @@ meta_draw_window_decoration (decor_t *d) top_region = meta_get_top_border_region (&fgeom, clip.width); - decor_blend_top_border_picture (xdisplay, - d->context, - src, - 0, 0, - d->picture, - &d->border_layout, - top_region, - alpha * 0xffff, - shade_alpha); + decor_blend_border_picture (xdisplay, + d->context, + src, + 0, 0, + d->picture, + &d->border_layout, + BORDER_TOP, + top_region, + alpha * 0xffff, + shade_alpha, + 0); } if (fgeom.bottom_height) @@ -2036,15 +2038,17 @@ meta_draw_window_decoration (decor_t *d) bottom_region = meta_get_bottom_border_region (&fgeom, clip.width); - decor_blend_bottom_border_picture (xdisplay, - d->context, - src, - 0, 0, - d->picture, - &d->border_layout, - bottom_region, - alpha * 0xffff, - shade_alpha); + decor_blend_border_picture (xdisplay, + d->context, + src, + 0, 0, + d->picture, + &d->border_layout, + BORDER_BOTTOM, + bottom_region, + alpha * 0xffff, + shade_alpha, + 0); } cairo_destroy (cr); @@ -2097,15 +2101,17 @@ meta_draw_window_decoration (decor_t *d) left_region = meta_get_left_border_region (&fgeom, clip.height); - decor_blend_left_border_picture (xdisplay, - d->context, - src, - 0, 0, - d->picture, - &d->border_layout, - left_region, - alpha * 0xffff, - shade_alpha); + decor_blend_border_picture (xdisplay, + d->context, + src, + 0, 0, + d->picture, + &d->border_layout, + BORDER_LEFT, + left_region, + alpha * 0xffff, + shade_alpha, + 0); } if (fgeom.right_width) @@ -2135,15 +2141,17 @@ meta_draw_window_decoration (decor_t *d) right_region = meta_get_right_border_region (&fgeom, clip.height); - decor_blend_right_border_picture (xdisplay, - d->context, - src, - 0, 0, - d->picture, - &d->border_layout, - right_region, - alpha * 0xffff, - shade_alpha); + decor_blend_border_picture (xdisplay, + d->context, + src, + 0, 0, + d->picture, + &d->border_layout, + BORDER_RIGHT, + right_region, + alpha * 0xffff, + shade_alpha, + 0); } cairo_destroy (cr); commit 239de9a104f45bc7196fa76b19b4099783671a75 Author: Dennis Kasprzyk <[EMAIL PROTECTED]> Date: Thu May 29 13:51:10 2008 +0200 Applied libdecoration changes to kde4 window decorator. diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp index c73f771..b13dc23 100644 --- a/kde/window-decorator-kde4/window.cpp +++ b/kde/window-decorator-kde4/window.cpp @@ -2027,15 +2027,17 @@ KWD::Window::processDamage (void) { r2.translate (-xOff, -yOff); - decor_blend_top_border_picture (QX11Info::display(), - &mContext, - mPicture, - xOff, xOff, - mTexturePicture, - &mLayout, - r2.handle (), - (unsigned short) (alpha * 0xffff), - shade_alpha); + decor_blend_border_picture (QX11Info::display(), + &mContext, + mPicture, + xOff, xOff, + mTexturePicture, + &mLayout, + BORDER_TOP, + r2.handle (), + (unsigned short) (alpha * 0xffff), + shade_alpha, + TRUE); } xOff = 0; @@ -2048,15 +2050,17 @@ KWD::Window::processDamage (void) { r2.translate (-xOff, -yOff); - decor_blend_bottom_border_picture (QX11Info::display(), - &mContext, - mPicture, - xOff, yOff, - mTexturePicture, - &mLayout, - r2.handle (), - (unsigned short) (alpha * 0xffff), - shade_alpha); + decor_blend_border_picture (QX11Info::display(), + &mContext, + mPicture, + xOff, yOff, + mTexturePicture, + &mLayout, + BORDER_BOTTOM, + r2.handle (), + (unsigned short) (alpha * 0xffff), + shade_alpha, + TRUE); } xOff = 0; @@ -2069,15 +2073,17 @@ KWD::Window::processDamage (void) { r2.translate (-xOff, -yOff); - decor_blend_left_border_picture (QX11Info::display(), - &mContext, - mPicture, - xOff, yOff, - mTexturePicture, - &mLayout, - r2.handle (), - (unsigned short) (alpha * 0xffff), - shade_alpha); + decor_blend_border_picture (QX11Info::display(), + &mContext, + mPicture, + xOff, yOff, + mTexturePicture, + &mLayout, + BORDER_LEFT, + r2.handle (), + (unsigned short) (alpha * 0xffff), + shade_alpha, + TRUE); } xOff = mContext.extents.left + mGeometry.width (); @@ -2090,15 +2096,17 @@ KWD::Window::processDamage (void) { r2.translate (-xOff, -yOff); - decor_blend_right_border_picture (QX11Info::display(), - &mContext, - mPicture, - xOff, yOff, - mTexturePicture, - &mLayout, - r2.handle (), - (unsigned short) (alpha * 0xffff), - shade_alpha); + decor_blend_border_picture (QX11Info::display(), + &mContext, + mPicture, + xOff, yOff, + mTexturePicture, + &mLayout, + BORDER_RIGHT, + r2.handle (), + (unsigned short) (alpha * 0xffff), + shade_alpha, + TRUE); } mDamage = QRegion (); commit e1a0b9f6dabce5f37a3c20b090b1bae4d980f478 Author: Dennis Kasprzyk <[EMAIL PROTECTED]> Date: Thu May 29 13:50:47 2008 +0200 Applied libdecoration changes to kde3 window decorator. diff --git a/kde/window-decorator/window.cpp b/kde/window-decorator/window.cpp index c10ff16..55580e6 100644 --- a/kde/window-decorator/window.cpp +++ b/kde/window-decorator/window.cpp @@ -1911,15 +1911,17 @@ KWD::Window::processDamage (void) { r2.translate (-xOff, -yOff); - decor_blend_top_border_picture (qt_xdisplay (), - &mContext, - mPicture, - xOff, xOff, - mTexturePicture, - &mLayout, - r2.handle (), - (unsigned short) (alpha * 0xffff), - shade_alpha); + decor_blend_border_picture (qt_xdisplay (), + &mContext, + mPicture, + xOff, xOff, + mTexturePicture, + &mLayout, + BORDER_TOP, + r2.handle (), + (unsigned short) (alpha * 0xffff), + shade_alpha, + TRUE); } xOff = 0; @@ -1932,15 +1934,17 @@ KWD::Window::processDamage (void) { r2.translate (-xOff, -yOff); - decor_blend_bottom_border_picture (qt_xdisplay (), - &mContext, - mPicture, - xOff, yOff, - mTexturePicture, - &mLayout, - r2.handle (), - (unsigned short) (alpha * 0xffff), - shade_alpha); + decor_blend_border_picture (qt_xdisplay (), + &mContext, + mPicture, + xOff, yOff, + mTexturePicture, + &mLayout, + BORDER_BOTTOM, + r2.handle (), + (unsigned short) (alpha * 0xffff), + shade_alpha, + TRUE); } xOff = 0; @@ -1953,15 +1957,17 @@ KWD::Window::processDamage (void) { r2.translate (-xOff, -yOff); - decor_blend_left_border_picture (qt_xdisplay (), - &mContext, - mPicture, - xOff, yOff, - mTexturePicture, - &mLayout, - r2.handle (), - (unsigned short) (alpha * 0xffff), - shade_alpha); + decor_blend_border_picture (qt_xdisplay (), + &mContext, + mPicture, + xOff, yOff, + mTexturePicture, + &mLayout, + BORDER_LEFT, + r2.handle (), + (unsigned short) (alpha * 0xffff), + shade_alpha, + TRUE); } xOff = mContext.extents.left + mGeometry.width (); @@ -1974,15 +1980,17 @@ KWD::Window::processDamage (void) { r2.translate (-xOff, -yOff); - decor_blend_right_border_picture (qt_xdisplay (), - &mContext, - mPicture, - xOff, yOff, - mTexturePicture, - &mLayout, - r2.handle (), - (unsigned short) (alpha * 0xffff), - shade_alpha); + decor_blend_border_picture (qt_xdisplay (), + &mContext, + mPicture, + xOff, yOff, + mTexturePicture, + &mLayout, + BORDER_RIGHT, + r2.handle (), + (unsigned short) (alpha * 0xffff), + shade_alpha, + TRUE); } mDamage = QRegion (); commit cdd241241478ddf8ef0d18f2e962c4d77311a62c Author: Dennis Kasprzyk <[EMAIL PROTECTED]> Date: Thu May 29 13:49:50 2008 +0200 Merged decor_blend_(top|bottom|left|right)_border_picture function into one common function. The new ignore_src_alpha parameter tells libdecoration to ignore the alpha channel of the src picture. diff --git a/configure.ac b/configure.ac index c096137..aea3d27 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PROG_INTLTOOL([0.23]) AM_MAINTAINER_MODE dnl decorator interface version -AC_DEFINE(DECOR_INTERFACE_VERSION, 20080131, [Decorator interface version]) +AC_DEFINE(DECOR_INTERFACE_VERSION, 20080529, [Decorator interface version]) AC_ISC_POSIX AC_PROG_CC diff --git a/include/decoration.h b/include/decoration.h index f382a44..5eed043 100644 --- a/include/decoration.h +++ b/include/decoration.h @@ -71,6 +71,11 @@ extern "C" { #define PAD_LEFT (1 << 2) #define PAD_RIGHT (1 << 3) +#define BORDER_TOP 0 +#define BORDER_BOTTOM 1 +#define BORDER_LEFT 2 +#define BORDER_RIGHT 3 + typedef struct _decor_point { int x; int y; @@ -346,52 +351,18 @@ decor_blend_transform_picture (Display *xdisplay, int shade_alpha); void -decor_blend_top_border_picture (Display *xdisplay, - decor_context_t *context, - Picture src, - int xSrc, - int ySrc, - Picture dst, - decor_layout_t *layout, - Region region, - unsigned short alpha, - int shade_alpha); - -void -decor_blend_bottom_border_picture (Display *xdisplay, - decor_context_t *context, - Picture src, - int xSrc, - int ySrc, - Picture dst, - decor_layout_t *layout, - Region region, - unsigned short alpha, - int shade_alpha); - -void -decor_blend_left_border_picture (Display *xdisplay, - decor_context_t *context, - Picture src, - int xSrc, - int ySrc, - Picture dst, - decor_layout_t *layout, - Region region, - unsigned short alpha, - int shade_alpha); - -void -decor_blend_right_border_picture (Display *xdisplay, - decor_context_t *context, - Picture src, - int xSrc, - int ySrc, - Picture dst, - decor_layout_t *layout, - Region region, - unsigned short alpha, - int shade_alpha); +decor_blend_border_picture (Display *xdisplay, + decor_context_t *context, + Picture src, + int xSrc, + int ySrc, + Picture dst, + decor_layout_t *layout, + unsigned int border, + Region region, + unsigned short alpha, + int shade_alpha, + int ignore_src_alpha); #define DECOR_ACQUIRE_STATUS_SUCCESS 0 #define DECOR_ACQUIRE_STATUS_FAILED 1 diff --git a/libdecoration/decoration.c b/libdecoration/decoration.c index 16eee7f..1f3407c 100644 --- a/libdecoration/decoration.c +++ b/libdecoration/decoration.c @@ -2061,13 +2061,15 @@ _decor_blend_horz_border_picture (Display *xdisplay, int x2, int y2, int dy, - int direction) + int direction, + int ignore_src_alpha) { XRenderColor color[3] = { { 0xffff, 0xffff, 0xffff, 0xffff }, - { alpha, alpha, alpha, alpha } + { alpha, alpha, alpha, alpha }, + { 0x0, 0x0, 0x0, 0xffff } }; - int op = PictOpSrc; + int op = PictOpSrc, gop = PictOpSrc; int left, right; left = context->extents.left; @@ -2077,6 +2079,18 @@ _decor_blend_horz_border_picture (Display *xdisplay, XRenderSetPictureClipRegion (xdisplay, dst, region); XOffsetRegion (region, -x1, -y1); + if (ignore_src_alpha) + { + XRenderComposite (xdisplay, PictOpSrc, src, None, dst, + xSrc, ySrc, + 0, 0, + x1, y1, + x2 - x1, y2 - y1); + XRenderFillRectangle (xdisplay, PictOpAdd, dst, &color[2], x1, y1, + x2 - x1, y2 - y1); + gop = PictOpInReverse; + } + if (alpha != 0xffff) { op = PictOpIn; @@ -2122,7 +2136,7 @@ _decor_blend_horz_border_picture (Display *xdisplay, XRenderSetPictureTransform (xdisplay, grad, &transform); XRenderChangePicture (xdisplay, grad, CPRepeat, &attrib); - XRenderComposite (xdisplay, PictOpSrc, grad, None, dst, + XRenderComposite (xdisplay, gop, grad, None, dst, 0, 0, 0, 0, x1, y1, @@ -2153,7 +2167,7 @@ _decor_blend_horz_border_picture (Display *xdisplay, XRenderChangePicture (xdisplay, grad, CPRepeat, &attrib); - XRenderComposite (xdisplay, PictOpSrc, grad, None, dst, + XRenderComposite (xdisplay, gop, grad, None, dst, 0, 0, 0, 0, x1 + left, y1, @@ -2179,7 +2193,7 @@ _decor_blend_horz_border_picture (Display *xdisplay, XRenderSetPictureTransform (xdisplay, grad, &transform); XRenderChangePicture (xdisplay, grad, CPRepeat, &attrib); - XRenderComposite (xdisplay, PictOpSrc, grad, None, dst, + XRenderComposite (xdisplay, gop, grad, None, dst, 0, 0, 0, 0, x2 - right, y1, @@ -2189,108 +2203,21 @@ _decor_blend_horz_border_picture (Display *xdisplay, } else { - XRenderFillRectangle (xdisplay, PictOpSrc, dst, &color[1], + XRenderFillRectangle (xdisplay, gop, dst, &color[1], x1, y1, x2 - x1, y2 - y1); } } - XRenderComposite (xdisplay, op, src, None, dst, - xSrc, ySrc, - 0, 0, - x1, y1, - x2 - x1, y2 - y1); + if (!ignore_src_alpha) + XRenderComposite (xdisplay, op, src, None, dst, + xSrc, ySrc, + 0, 0, + x1, y1, + x2 - x1, y2 - y1); set_no_picture_clip (xdisplay, dst); } -void -decor_blend_top_border_picture (Display *xdisplay, - decor_context_t *context, - Picture src, - int xSrc, - int ySrc, - Picture dst, - decor_layout_t *layout, - Region region, - unsigned short alpha, - int shade_alpha) -{ - int left, right, top; - int x1, y1, x2, y2; - - left = context->extents.left; - right = context->extents.right; - top = context->extents.top; - - x1 = layout->top.x1 + context->left_space - left; - y1 = layout->top.y1 + context->top_space - top; - x2 = layout->top.x2 - context->right_space + right; - y2 = layout->top.y2; - - _decor_blend_horz_border_picture (xdisplay, - context, - src, - xSrc, - ySrc, - dst, - layout, - region, - alpha, - shade_alpha, - x1, - y1, - x2, - y2, - top, - -1); - - _decor_pad_border_picture (xdisplay, dst, &layout->top); -} - -void -decor_blend_bottom_border_picture (Display *xdisplay, - decor_context_t *context, - Picture src, - int xSrc, - int ySrc, - Picture dst, - decor_layout_t *layout, - Region region, - unsigned short alpha, - int shade_alpha) -{ - int left, right, bottom; - int x1, y1, x2, y2; - - left = context->extents.left; - right = context->extents.right; - bottom = context->extents.bottom; - - x1 = layout->bottom.x1 + context->left_space - left; - y1 = layout->bottom.y1; - x2 = layout->bottom.x2 - context->right_space + right; - y2 = layout->bottom.y1 + bottom; - - _decor_blend_horz_border_picture (xdisplay, - context, - src, - xSrc, - ySrc, - dst, - layout, - region, - alpha, - shade_alpha, - x1, - y1, - x2, - y2, - bottom, - 1); - - _decor_pad_border_picture (xdisplay, dst, &layout->bottom); -} - static void _decor_blend_vert_border_picture (Display *xdisplay, decor_context_t *context, @@ -2306,13 +2233,15 @@ _decor_blend_vert_border_picture (Display *xdisplay, int y1, int x2, int y2, - int direction) + int direction, + int ignore_src_alpha) { XRenderColor color[3] = { { 0xffff, 0xffff, 0xffff, 0xffff }, - { alpha, alpha, alpha, alpha } + { alpha, alpha, alpha, alpha }, + { 0x0, 0x0, 0x0, 0xffff } }; - int op = PictOpSrc; + int op = PictOpSrc, gop = PictOpSrc; -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]