summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Bos2015-06-15 10:52:30 +0100
committerCharles Bos2015-06-15 10:52:30 +0100
commita6159977c2573efe1ab7bbda5a37d4462b4c22c3 (patch)
tree16ab9570126b0ac3b49d999f4494ce6c66a67219
parenta0427ba34d116c66325a5b45f2f1e16401282773 (diff)
downloadaur-a6159977c2573efe1ab7bbda5a37d4462b4c22c3.tar.gz
add upstream fix for getting correct gtk frame extents
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD11
-rw-r--r--client-frame-api.patch194
3 files changed, 205 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3f44b7a919ec..b4ebdeb84ead 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by makepkg 4.2.1
-# Sat Apr 11 15:05:49 UTC 2015
pkgbase = compiz
pkgdesc = Composite manager for Aiglx and Xgl, with plugins and CCSM (release version)
pkgver = 0.9.12.1
- pkgrel = 4
+ pkgrel = 5
url = https://launchpad.net/compiz
install = compiz.install
arch = i686
@@ -40,10 +38,12 @@ pkgbase = compiz
source = set-gwd-default.patch
source = focus-prevention-disable.patch
source = metacity-3_16.patch
+ source = client-frame-api.patch
sha256sums = 8b9d6a72c581c96b820dff182669864aeb8fd1989e95ff56a73203fc478d854e
sha256sums = 3aa6cb70f357b3d34d51735f4b5bcb0479086d7c7336de4bd8157569d6c52c08
sha256sums = f4897590b0f677ba34767a29822f8f922a750daf66e8adf47be89f7c2550cf4b
sha256sums = 27e7c516c22947a28bb1f34ecc63142fc1a6b8178439a04660f7ae0968bdc57c
+ sha256sums = 4cb451857a2e6deef15dd04e68ca8bd1d898344b6a175fa1a9f2fb0c11b119d7
pkgname = compiz
diff --git a/PKGBUILD b/PKGBUILD
index c14a233b7eea..e416cff0d476 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgname=compiz
pkgver=0.9.12.1
_pkgseries=0.9.12
-pkgrel=4
+pkgrel=5
pkgdesc="Composite manager for Aiglx and Xgl, with plugins and CCSM (release version)"
arch=('i686' 'x86_64')
url="https://launchpad.net/compiz"
@@ -22,11 +22,13 @@ replaces=('compiz-core-devel')
source=("https://launchpad.net/compiz/${_pkgseries}/${pkgver}/+download/compiz-${pkgver}.tar.bz2"
"set-gwd-default.patch"
"focus-prevention-disable.patch"
- "metacity-3_16.patch")
+ "metacity-3_16.patch"
+ "client-frame-api.patch")
sha256sums=('8b9d6a72c581c96b820dff182669864aeb8fd1989e95ff56a73203fc478d854e'
'3aa6cb70f357b3d34d51735f4b5bcb0479086d7c7336de4bd8157569d6c52c08'
'f4897590b0f677ba34767a29822f8f922a750daf66e8adf47be89f7c2550cf4b'
- '27e7c516c22947a28bb1f34ecc63142fc1a6b8178439a04660f7ae0968bdc57c')
+ '27e7c516c22947a28bb1f34ecc63142fc1a6b8178439a04660f7ae0968bdc57c'
+ '4cb451857a2e6deef15dd04e68ca8bd1d898344b6a175fa1a9f2fb0c11b119d7')
install='compiz.install'
prepare() {
@@ -46,6 +48,9 @@ prepare() {
# Metacity 3.16 compatibility
patch -Np1 -i "${srcdir}/metacity-3_16.patch"
+
+ # Fix incorrect extents for GTK+ tooltips, csd etc
+ patch -Np1 -i "${srcdir}/client-frame-api.patch"
}
build() {
diff --git a/client-frame-api.patch b/client-frame-api.patch
new file mode 100644
index 000000000000..6ebf2e20af59
--- /dev/null
+++ b/client-frame-api.patch
@@ -0,0 +1,194 @@
+# Diff from https://code.launchpad.net/~3v1n0/compiz/client-frame-api
+=== modified file 'include/core/abiversion.h'
+--- a/include/core/abiversion.h 2014-01-23 16:44:12 +0000
++++ b/include/core/abiversion.h 2015-02-17 15:00:18 +0000
+@@ -5,6 +5,6 @@
+ # error Conflicting definitions of CORE_ABIVERSION
+ #endif
+
+-#define CORE_ABIVERSION 20140123
++#define CORE_ABIVERSION 20150217
+
+ #endif // COMPIZ_ABIVERSION_H
+
+=== modified file 'include/core/atoms.h'
+--- a/include/core/atoms.h 2012-01-19 17:44:32 +0000
++++ b/include/core/atoms.h 2015-02-17 15:00:18 +0000
+@@ -110,6 +110,7 @@
+ extern Atom clientListStacking;
+
+ extern Atom frameExtents;
++ extern Atom frameGtkExtents;
+ extern Atom frameWindow;
+
+ extern Atom wmState;
+
+=== modified file 'include/core/window.h'
+--- a/include/core/window.h 2014-03-27 15:09:02 +0000
++++ b/include/core/window.h 2015-02-17 15:00:18 +0000
+@@ -217,7 +217,8 @@
+ CompWindowNotifyUnshade,
+ CompWindowNotifyEnterShowDesktopMode,
+ CompWindowNotifyLeaveShowDesktopMode,
+- CompWindowNotifyBeforeMap
++ CompWindowNotifyBeforeMap,
++ CompWindowNotifyActions,
+ };
+
+ /**
+@@ -502,6 +503,7 @@
+ const CompWindowExtents & border () const;
+ const CompWindowExtents & input () const;
+ const CompWindowExtents & output () const;
++ const CompWindowExtents & clientFrame () const;
+
+ // FIXME: This should return a const reference but grid needs fixing...
+ XSizeHints & sizeHints () const;
+
+=== modified file 'src/atoms.cpp'
+--- a/src/atoms.cpp 2012-01-19 17:44:32 +0000
++++ b/src/atoms.cpp 2015-02-17 15:00:18 +0000
+@@ -107,6 +107,7 @@
+ Atom clientListStacking;
+
+ Atom frameExtents;
++ Atom frameGtkExtents;
+ Atom frameWindow;
+
+ Atom wmState;
+@@ -270,8 +271,9 @@
+ clientListStacking =
+ XInternAtom (dpy, "_NET_CLIENT_LIST_STACKING", 0);
+
+- frameExtents = XInternAtom (dpy, "_NET_FRAME_EXTENTS", 0);
+- frameWindow = XInternAtom (dpy, "_NET_FRAME_WINDOW", 0);
++ frameExtents = XInternAtom (dpy, "_NET_FRAME_EXTENTS", 0);
++ frameGtkExtents = XInternAtom (dpy, "_GTK_FRAME_EXTENTS", 0);
++ frameWindow = XInternAtom (dpy, "_NET_FRAME_WINDOW", 0);
+
+ wmState = XInternAtom (dpy, "WM_STATE", 0);
+ wmChangeState = XInternAtom (dpy, "WM_CHANGE_STATE", 0);
+
+=== modified file 'src/event.cpp'
+--- a/src/event.cpp 2014-06-06 09:42:16 +0000
++++ b/src/event.cpp 2015-02-17 15:00:18 +0000
+@@ -1755,6 +1755,12 @@
+ if (w)
+ w->priv->updateIconGeometry ();
+ }
++ else if (event->xproperty.atom == Atoms::frameGtkExtents)
++ {
++ w = findWindow (event->xproperty.window);
++ if (w)
++ w->priv->updateClientFrame ();
++ }
+ else if (event->xproperty.atom == Atoms::wmStrut ||
+ event->xproperty.atom == Atoms::wmStrutPartial)
+ {
+
+=== modified file 'src/privatewindow.h'
+--- a/src/privatewindow.h 2014-03-27 15:09:02 +0000
++++ b/src/privatewindow.h 2015-02-17 15:00:18 +0000
+@@ -276,6 +276,8 @@
+
+ void updateIconGeometry ();
+
++ void updateClientFrame ();
++
+ Window getClientLeader ();
+
+ char * getStartupId ();
+@@ -429,6 +431,7 @@
+ CompWindowExtents lastServerInput;
+ CompWindowExtents border;
+ CompWindowExtents output;
++ CompWindowExtents clientFrame;
+
+ CompStruts *struts;
+
+
+=== modified file 'src/window.cpp'
+--- a/src/window.cpp 2014-09-16 19:37:23 +0000
++++ b/src/window.cpp 2015-02-17 15:00:18 +0000
+@@ -373,6 +373,38 @@
+ }
+ }
+
++void
++PrivateWindow::updateClientFrame ()
++{
++ Atom actual;
++ int format;
++ unsigned long n, left;
++ unsigned char *data;
++
++ int result = XGetWindowProperty (screen->dpy (), priv->id,
++ Atoms::frameGtkExtents,
++ 0L, 65536, False, XA_CARDINAL,
++ &actual, &format, &n, &left, &data);
++
++ if (result == Success && actual == XA_CARDINAL && data)
++ {
++ if (n == 4)
++ {
++ unsigned long *extents = reinterpret_cast<unsigned long *>(data);
++ priv->clientFrame.left = extents[0];
++ priv->clientFrame.right = extents[1];
++ priv->clientFrame.top = extents[2];
++ priv->clientFrame.bottom = extents[3];
++ }
++
++ XFree (data);
++ }
++ else
++ {
++ priv->clientFrame = CompWindowExtents ();
++ }
++}
++
+ Window
+ PrivateWindow::getClientLeaderOfAncestor ()
+ {
+@@ -708,6 +740,7 @@
+ if (actions != priv->actions)
+ {
+ priv->actions = actions;
++ windowNotify (CompWindowNotifyActions);
+ setWindowActions (screen, actions, priv->id);
+ }
+ }
+@@ -5947,6 +5980,12 @@
+ return priv->output;
+ }
+
++const CompWindowExtents &
++CompWindow::clientFrame () const
++{
++ return priv->clientFrame;
++}
++
+ XSizeHints &
+ CompWindow::sizeHints () const
+ {
+@@ -6205,6 +6244,7 @@
+
+ recalcActions ();
+ priv->updateIconGeometry ();
++ priv->updateClientFrame ();
+
+ if (priv->shaded)
+ priv->updateFrameWindow ();
+
+# Diff from https://code.launchpad.net/~albertsmuktupavels/compiz/add-gtk-frame-extents-to-net-supported/+merge/257303
+=== modified file 'src/screen.cpp'
+--- a/src/screen.cpp 2014-12-02 19:37:10 +0000
++++ b/src/screen.cpp 2015-04-23 20:41:24 +0000
+@@ -2362,6 +2362,7 @@
+
+ atoms.push_back (Atoms::wmUserTime);
+ atoms.push_back (Atoms::frameExtents);
++ atoms.push_back (Atoms::frameGtkExtents);
+ atoms.push_back (Atoms::frameWindow);
+
+ atoms.push_back (Atoms::winState);
+