← Back to team overview

compiz team mailing list archive

[Merge] lp:~smspillaz/compiz/compiz-xterm-fix into lp:compiz

 

Sam "SmSpillaz" Spilsbury has proposed merging lp:~smspillaz/compiz/compiz-xterm-fix into lp:compiz.

Requested reviews:
  compiz packagers (compiz)

For more details, see:
https://code.launchpad.net/~smspillaz/compiz/compiz-xterm-fix/+merge/54852

Fixes broken xterms
-- 
https://code.launchpad.net/~smspillaz/compiz/compiz-xterm-fix/+merge/54852
Your team compiz packagers is requested to review the proposed merge of lp:~smspillaz/compiz/compiz-xterm-fix into lp:compiz.
=== added file 'debian/patches/101_disable_2d_decorations.patch'
--- debian/patches/101_disable_2d_decorations.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/101_disable_2d_decorations.patch	2011-03-25 12:17:26 +0000
@@ -0,0 +1,42 @@
+Index: compiz-0.9.4git20110322/gtk/window-decorator/gtk-window-decorator.c
+===================================================================
+--- compiz-0.9.4git20110322.orig/gtk/window-decorator/gtk-window-decorator.c	2011-03-22 16:46:56.000000000 +0800
++++ compiz-0.9.4git20110322/gtk/window-decorator/gtk-window-decorator.c	2011-03-25 00:03:23.441180942 +0800
+@@ -415,8 +415,7 @@
+     switcher_p = gwd_get_decor_frame ("switcher");
+ 
+     decor_set_dm_check_hint (xdisplay, gdk_screen_get_number (gdkscreen),
+-			     WINDOW_DECORATION_TYPE_PIXMAP |
+-			     WINDOW_DECORATION_TYPE_WINDOW);
++			     WINDOW_DECORATION_TYPE_PIXMAP);
+ 
+     update_default_decorations (gdkscreen);
+ 
+Index: compiz-0.9.4git20110322/kde/window-decorator-kde4/main.cpp
+===================================================================
+--- compiz-0.9.4git20110322.orig/kde/window-decorator-kde4/main.cpp	2011-03-22 16:46:56.000000000 +0800
++++ compiz-0.9.4git20110322/kde/window-decorator-kde4/main.cpp	2011-03-25 00:03:15.321169033 +0800
+@@ -107,8 +107,7 @@
+     }
+ 
+     decor_set_dm_check_hint (QX11Info::display (), QX11Info::appScreen (),
+-			     WINDOW_DECORATION_TYPE_PIXMAP |
+-			     WINDOW_DECORATION_TYPE_WINDOW);
++			     WINDOW_DECORATION_TYPE_PIXMAP);
+ 
+     if (!app->enableDecorations (timestamp))
+     {
+Index: compiz-0.9.4git20110322/unity/unity_window_decorator/src/gtk-window-decorator.c
+===================================================================
+--- compiz-0.9.4git20110322.orig/unity/unity_window_decorator/src/gtk-window-decorator.c	2011-03-25 00:03:15.201168862 +0800
++++ compiz-0.9.4git20110322/unity/unity_window_decorator/src/gtk-window-decorator.c	2011-03-25 00:03:15.321169033 +0800
+@@ -432,8 +432,7 @@
+     }
+ 
+     decor_set_dm_check_hint (xdisplay, gdk_screen_get_number (gdkscreen),
+-			     WINDOW_DECORATION_TYPE_PIXMAP |
+-			     WINDOW_DECORATION_TYPE_WINDOW);
++			     WINDOW_DECORATION_TYPE_PIXMAP);
+ 
+     update_default_decorations (gdkscreen);
+ 

=== added file 'debian/patches/102_fix_xterm.patch'
--- debian/patches/102_fix_xterm.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/102_fix_xterm.patch	2011-03-25 12:17:26 +0000
@@ -0,0 +1,163 @@
+From 9e5ce1695c21d147987d35292aae5dad76825bf8 Mon Sep 17 00:00:00 2001
+From: Sam Spilsbury <sam.spilsbury@xxxxxxxxxxxxx>
+Date: Fri, 25 Mar 2011 03:06:32 +0800
+Subject: [PATCH] Correctly handle server border width in geometry calculations and
+ adjustment from frame window dimentions to client dimentions
+
+---
+ src/window.cpp         |   14 ++++++------
+ src/windowgeometry.cpp |   57 +++++++++++++++++++++++++----------------------
+ 2 files changed, 37 insertions(+), 34 deletions(-)
+
+Index: compiz-0.9.4git20110322/src/window.cpp
+===================================================================
+--- compiz-0.9.4git20110322.orig/src/window.cpp	2011-03-25 13:59:29.116725630 +0800
++++ compiz-0.9.4git20110322/src/window.cpp	2011-03-25 13:59:29.146725678 +0800
+@@ -1632,9 +1632,9 @@
+ 	return;
+ 
+     x      = ce->x + priv->input.left;
+-    y      = ce->y + priv->input.top;
+-    width  = ce->width - priv->input.left - priv->input.right;
+-    height = ce->height - priv->input.top - priv->input.bottom;
++    y      = ce->y + priv->input.top - priv->serverGeometry.border ();
++    width  = ce->width - priv->serverGeometry.border () * 2 - priv->input.left - priv->input.right;
++    height = ce->height - priv->serverGeometry.border () * 2 - priv->input.top - priv->input.bottom;
+ 
+     if (priv->syncWait)
+     {
+@@ -2429,10 +2429,10 @@
+     {
+ 	XWindowChanges wc = *xwc;
+ 
+-	wc.x      -= input.left;
+-	wc.y      -= input.top;
+-	wc.width  += input.left + input.right;
+-	wc.height += input.top + input.bottom;
++	wc.x      -= input.left - serverGeometry.border ();
++	wc.y      -= input.top - serverGeometry.border ();
++	wc.width  += input.left + input.right + serverGeometry.border ();
++	wc.height += input.top + input.bottom + serverGeometry.border ();
+ 
+ 	XConfigureWindow (screen->dpy (), frame, valueMask, &wc);
+ 	valueMask &= ~(CWSibling | CWStackMode);
+Index: compiz-0.9.4git20110322/src/windowgeometry.cpp
+===================================================================
+--- compiz-0.9.4git20110322.orig/src/windowgeometry.cpp	2011-03-22 16:46:56.000000000 +0800
++++ compiz-0.9.4git20110322/src/windowgeometry.cpp	2011-03-25 13:59:29.146725678 +0800
+@@ -103,19 +103,22 @@
+ int
+ CompWindow::width () const
+ {
+-    return priv->width;
++    return priv->width +
++	    priv->geometry.border ()  * 2;
+ }
+ 
+ int
+ CompWindow::height () const
+ {
+-    return priv->height;
++    return priv->height +
++	    priv->geometry.border ()  * 2;;
+ }
+ 
+ CompSize
+ CompWindow::size () const
+ {
+-    return CompSize (priv->width, priv->height);
++    return CompSize (priv->width + priv->geometry.border ()  * 2,
++		     priv->height + priv->geometry.border ()  * 2);
+ }
+ 
+ int
+@@ -164,65 +167,65 @@
+ CompRect
+ CompWindow::borderRect () const
+ {
+-    return CompRect (priv->geometry.x () - priv->border.left,
+-		     priv->geometry.y () - priv->border.top,
+-		     priv->geometry.width () +
++    return CompRect (priv->geometry.x () - priv->geometry.border () - priv->border.left,
++		     priv->geometry.y () - priv->geometry.border () - priv->border.top,
++		     priv->geometry.width () + priv->geometry.border () * 2 +
+ 		     priv->border.left + priv->border.right,
+-		     priv->geometry.height () +
++		     priv->geometry.height () + priv->geometry.border () * 2 +
+ 		     priv->border.top + priv->border.bottom);
+ }
+ 
+ CompRect
+ CompWindow::serverBorderRect () const
+ {
+-    return CompRect (priv->serverGeometry.x () - priv->border.left,
+-		     priv->serverGeometry.y () - priv->border.top,
+-		     priv->serverGeometry.width () +
++    return CompRect (priv->serverGeometry.x () - priv->geometry.border () - priv->border.left,
++		     priv->serverGeometry.y () - priv->geometry.border () - priv->border.top,
++		     priv->serverGeometry.width () + priv->geometry.border () * 2 +
+ 		     priv->border.left + priv->border.right,
+-		     priv->serverGeometry.height () +
++		     priv->serverGeometry.height () + priv->geometry.border () * 2 +
+ 		     priv->border.top + priv->border.bottom);
+ }
+ 
+ CompRect
+ CompWindow::inputRect () const
+ {
+-    return CompRect (priv->geometry.x () - priv->input.left,
+-		     priv->geometry.y () - priv->input.top,
+-		     priv->geometry.width () +
++    return CompRect (priv->geometry.x () - priv->geometry.border () - priv->input.left,
++		     priv->geometry.y () - priv->geometry.border () - priv->input.top,
++		     priv->geometry.width () + priv->geometry.border () * 2 +
+ 		     priv->input.left + priv->input.right,
+-		     priv->geometry.height () +
++		     priv->geometry.height () +priv->geometry.border () * 2 +
+ 		     priv->input.top + priv->input.bottom);
+ }
+ 
+ CompRect
+ CompWindow::serverInputRect () const
+ {
+-    return CompRect (priv->serverGeometry.x () - priv->input.left,
+-		     priv->serverGeometry.y () - priv->input.top,
+-		     priv->serverGeometry.width () +
++    return CompRect (priv->serverGeometry.x () - priv->serverGeometry.border () - priv->input.left,
++		     priv->serverGeometry.y () - priv->serverGeometry.border () - priv->input.top,
++		     priv->serverGeometry.width () + priv->serverGeometry.border () * 2 +
+ 		     priv->input.left + priv->input.right,
+-		     priv->serverGeometry.height () +
++		     priv->serverGeometry.height () + priv->serverGeometry.border () * 2 +
+ 		     priv->input.top + priv->input.bottom);
+ }
+ 
+ CompRect
+ CompWindow::outputRect () const
+ {
+-    return CompRect (priv->geometry.x () - priv->output.left,
+-		     priv->geometry.y () - priv->output.top,
+-		     priv->geometry.width () +
++    return CompRect (priv->geometry.x () - priv->serverGeometry.border ()- priv->output.left,
++		     priv->geometry.y () - priv->serverGeometry.border () - priv->output.top,
++		     priv->geometry.width () + priv->serverGeometry.border () * 2 +
+ 		     priv->output.left + priv->output.right,
+-		     priv->geometry.height () +
++		     priv->geometry.height () + priv->serverGeometry.border () * 2 +
+ 		     priv->output.top + priv->output.bottom);
+ }
+ 
+ CompRect
+ CompWindow::serverOutputRect () const
+ {
+-    return CompRect (priv->serverGeometry.x () - priv->output.left,
+-		     priv->serverGeometry.y () - priv->output.top,
+-		     priv->serverGeometry.width () +
++    return CompRect (priv->serverGeometry.x () - priv->serverGeometry.border () -  priv->output.left,
++		     priv->serverGeometry.y () - priv->serverGeometry.border () - priv->output.top,
++		     priv->serverGeometry.width () + priv->serverGeometry.border () * 2 +
+ 		     priv->output.left + priv->output.right,
+-		     priv->serverGeometry.height () +
++		     priv->serverGeometry.height () + priv->serverGeometry.border () * 2 +
+ 		     priv->output.top + priv->output.bottom);
+ }

=== modified file 'debian/patches/series'
--- debian/patches/series	2011-03-24 11:03:37 +0000
+++ debian/patches/series	2011-03-25 12:17:26 +0000
@@ -9,3 +9,5 @@
 086_new_grid_defaults.patch
 090_git_fix_new_invisible_windows.patch
 100_bump_core.h.patch
+101_disable_2d_decorations.patch
+102_fix_xterm.patch

=== modified file 'debian/rules'
--- debian/rules	2011-03-01 12:31:42 +0000
+++ debian/rules	2011-03-25 12:17:26 +0000
@@ -12,7 +12,7 @@
 
 override_dh_auto_configure:
 	# currently, segfault if CMAKE_BUILD_TYPE=Release
-	dh_auto_configure -- -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_DEFAULT_PLUGINS=\"$(DEFAULT_PLUGINS)\" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCOMPIZ_PACKAGING_ENABLED=TRUE
+	dh_auto_configure -- -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_DEFAULT_PLUGINS=\"$(DEFAULT_PLUGINS)\" -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_PACKAGING_ENABLED=TRUE
 
 override_dh_install:
 	# Language packs