From 5bd152c593bc7ec41d1f90667716b5f57dd11690 Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Oct 09 2007 20:29:33 +0000 Subject: Make compiz behave with gnome-terminal (#304051) --- diff --git a/compiz-synthetic-configure-notify-events.patch b/compiz-synthetic-configure-notify-events.patch new file mode 100644 index 0000000..245a38e --- /dev/null +++ b/compiz-synthetic-configure-notify-events.patch @@ -0,0 +1,75 @@ +From: Danny Baumann +Date: Tue, 2 Oct 2007 10:17:42 +0000 (+0200) +Subject: Send synthetic configure notify events where needed according to ICCCM chapter 4 ... +X-Git-Url: http://gitweb.opencompositing.org/?p=compiz;a=commitdiff_plain;h=d301a011471469fea70f3d3d519ed47ead1f8e22;hp=d5f647f57219b8413e3d964a214570a1ca12bac3 + +Send synthetic configure notify events where needed according to ICCCM chapter 4.1.5. +Specifically, we have to send them when +a) moving or restacking a window without resizing it +b) not reacting to ConfigureRequest events. +--- + +diff --git a/src/window.c b/src/window.c +index 253976c..bbcdbeb 100644 +--- a/src/window.c ++++ b/src/window.c +@@ -2805,6 +2805,8 @@ syncWindowPosition (CompWindow *w) + w->serverY = w->attrib.y; + + XMoveWindow (w->screen->display->display, w->id, w->attrib.x, w->attrib.y); ++ /* we moved without resizing, so we have to send a configure notify */ ++ sendConfigureNotify (w); + + if (w->frame) + XMoveWindow (w->screen->display->display, w->frame, +@@ -3347,8 +3349,16 @@ configureXWindow (CompWindow *w, + if (valueMask & CWBorderWidth) + w->serverBorderWidth = xwc->border_width; + +- XConfigureWindow (w->screen->display->display, w->id, +- valueMask, xwc); ++ if (valueMask) ++ { ++ XConfigureWindow (w->screen->display->display, w->id, valueMask, xwc); ++ if (!(valueMask & (CWWidth | CWHeight))) ++ { ++ /* we have to send a configure notify event if we move or restack ++ a window without resizing it according to ICCCM 4.1.5 */ ++ sendConfigureNotify (w); ++ } ++ } + + if (w->frame && (valueMask & (CWSibling | CWStackMode))) + XConfigureWindow (w->screen->display->display, w->frame, +@@ -3795,6 +3805,18 @@ moveResizeWindow (CompWindow *w, + } + } + ++ if (xwcm & CWX) ++ { ++ if (xwc->x == w->serverX) ++ xwcm &= ~CWX; ++ } ++ ++ if (xwcm & CWY) ++ { ++ if (xwc->y == w->serverY) ++ xwcm &= ~CWY; ++ } ++ + if (xwcm & CWBorderWidth) + { + if (xwc->border_width == w->serverBorderWidth) +@@ -3820,6 +3842,12 @@ moveResizeWindow (CompWindow *w, + sendSyncRequest (w); + + configureXWindow (w, xwcm, xwc); ++ if (!xwcm) ++ { ++ /* we have to send a configure notify on ConfigureRequest events if ++ we decide not to do anything according to ICCCM 4.1.5 */ ++ sendConfigureNotify (w); ++ } + + if (placed) + w->placed = TRUE; diff --git a/compiz.spec b/compiz.spec index 2f459d1..5b370b7 100644 --- a/compiz.spec +++ b/compiz.spec @@ -14,7 +14,7 @@ URL: http://www.go-compiz.org License: X11/MIT/GPL Group: User Interface/Desktops Version: 0.5.2 -Release: 13.%{snapshot}%{?dist} +Release: 14.%{snapshot}%{?dist} Summary: OpenGL window and compositing manager BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -47,6 +47,7 @@ BuildRequires: dbus-qt-devel Source0: %{name}-%{snapshot}.tar.gz Source1: desktop-effects-%{dialogversion}.tar.bz2 +Patch0: compiz-synthetic-configure-notify-events.patch # Patches that are not upstream Patch103: composite-cube-logo.patch Patch105: fedora-logo.patch @@ -108,6 +109,7 @@ and other kde integration related stuff %setup -q -T -b1 -n desktop-effects-%{dialogversion} %setup -q -n compiz-%{snapshot} +%patch0 -p1 -b .synthetic-configure-notify-events %patch103 -p1 -b .composite-cube-logo %if 0%{?fedora} %patch105 -p1 -b .fedora-logo @@ -273,6 +275,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 9 2007 Warren Togami - 0.5.2-14 +- Make compiz behave with gnome-terminal (#304051) + * Fri Oct 5 2007 Matthias Clasen - 0.5.2-13 - Also install gwd.schemas (#319621)