Merge lp:~smspillaz/compiz/compiz-xterm-fix into lp:~compiz/compiz/ubuntu

Proposed by Sam Spilsbury
Status: Superseded
Proposed branch: lp:~smspillaz/compiz/compiz-xterm-fix
Merge into: lp:~compiz/compiz/ubuntu
Diff against target: 237 lines (+208/-1)
4 files modified
debian/patches/101_disable_2d_decorations.patch (+42/-0)
debian/patches/102_fix_xterm.patch (+163/-0)
debian/patches/series (+2/-0)
debian/rules (+1/-1)
To merge this branch: bzr merge lp:~smspillaz/compiz/compiz-xterm-fix
Reviewer Review Type Date Requested Status
compiz packagers Pending
Review via email: mp+54852@code.launchpad.net

This proposal has been superseded by a proposal from 2011-04-04.

Description of the change

Fixes broken xterms

To post a comment you must log in.

Unmerged revisions

578. By Sam Spilsbury

Add xterm fix

577. By Sam Spilsbury

Added 101_disable_2d_decorations.patch

Disables 2D decorations from being launched since it is currently unsupported

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/patches/101_disable_2d_decorations.patch'
2--- debian/patches/101_disable_2d_decorations.patch 1970-01-01 00:00:00 +0000
3+++ debian/patches/101_disable_2d_decorations.patch 2011-03-25 12:17:26 +0000
4@@ -0,0 +1,42 @@
5+Index: compiz-0.9.4git20110322/gtk/window-decorator/gtk-window-decorator.c
6+===================================================================
7+--- compiz-0.9.4git20110322.orig/gtk/window-decorator/gtk-window-decorator.c 2011-03-22 16:46:56.000000000 +0800
8++++ compiz-0.9.4git20110322/gtk/window-decorator/gtk-window-decorator.c 2011-03-25 00:03:23.441180942 +0800
9+@@ -415,8 +415,7 @@
10+ switcher_p = gwd_get_decor_frame ("switcher");
11+
12+ decor_set_dm_check_hint (xdisplay, gdk_screen_get_number (gdkscreen),
13+- WINDOW_DECORATION_TYPE_PIXMAP |
14+- WINDOW_DECORATION_TYPE_WINDOW);
15++ WINDOW_DECORATION_TYPE_PIXMAP);
16+
17+ update_default_decorations (gdkscreen);
18+
19+Index: compiz-0.9.4git20110322/kde/window-decorator-kde4/main.cpp
20+===================================================================
21+--- compiz-0.9.4git20110322.orig/kde/window-decorator-kde4/main.cpp 2011-03-22 16:46:56.000000000 +0800
22++++ compiz-0.9.4git20110322/kde/window-decorator-kde4/main.cpp 2011-03-25 00:03:15.321169033 +0800
23+@@ -107,8 +107,7 @@
24+ }
25+
26+ decor_set_dm_check_hint (QX11Info::display (), QX11Info::appScreen (),
27+- WINDOW_DECORATION_TYPE_PIXMAP |
28+- WINDOW_DECORATION_TYPE_WINDOW);
29++ WINDOW_DECORATION_TYPE_PIXMAP);
30+
31+ if (!app->enableDecorations (timestamp))
32+ {
33+Index: compiz-0.9.4git20110322/unity/unity_window_decorator/src/gtk-window-decorator.c
34+===================================================================
35+--- compiz-0.9.4git20110322.orig/unity/unity_window_decorator/src/gtk-window-decorator.c 2011-03-25 00:03:15.201168862 +0800
36++++ compiz-0.9.4git20110322/unity/unity_window_decorator/src/gtk-window-decorator.c 2011-03-25 00:03:15.321169033 +0800
37+@@ -432,8 +432,7 @@
38+ }
39+
40+ decor_set_dm_check_hint (xdisplay, gdk_screen_get_number (gdkscreen),
41+- WINDOW_DECORATION_TYPE_PIXMAP |
42+- WINDOW_DECORATION_TYPE_WINDOW);
43++ WINDOW_DECORATION_TYPE_PIXMAP);
44+
45+ update_default_decorations (gdkscreen);
46+
47
48=== added file 'debian/patches/102_fix_xterm.patch'
49--- debian/patches/102_fix_xterm.patch 1970-01-01 00:00:00 +0000
50+++ debian/patches/102_fix_xterm.patch 2011-03-25 12:17:26 +0000
51@@ -0,0 +1,163 @@
52+From 9e5ce1695c21d147987d35292aae5dad76825bf8 Mon Sep 17 00:00:00 2001
53+From: Sam Spilsbury <sam.spilsbury@canonical.com>
54+Date: Fri, 25 Mar 2011 03:06:32 +0800
55+Subject: [PATCH] Correctly handle server border width in geometry calculations and
56+ adjustment from frame window dimentions to client dimentions
57+
58+---
59+ src/window.cpp | 14 ++++++------
60+ src/windowgeometry.cpp | 57 +++++++++++++++++++++++++----------------------
61+ 2 files changed, 37 insertions(+), 34 deletions(-)
62+
63+Index: compiz-0.9.4git20110322/src/window.cpp
64+===================================================================
65+--- compiz-0.9.4git20110322.orig/src/window.cpp 2011-03-25 13:59:29.116725630 +0800
66++++ compiz-0.9.4git20110322/src/window.cpp 2011-03-25 13:59:29.146725678 +0800
67+@@ -1632,9 +1632,9 @@
68+ return;
69+
70+ x = ce->x + priv->input.left;
71+- y = ce->y + priv->input.top;
72+- width = ce->width - priv->input.left - priv->input.right;
73+- height = ce->height - priv->input.top - priv->input.bottom;
74++ y = ce->y + priv->input.top - priv->serverGeometry.border ();
75++ width = ce->width - priv->serverGeometry.border () * 2 - priv->input.left - priv->input.right;
76++ height = ce->height - priv->serverGeometry.border () * 2 - priv->input.top - priv->input.bottom;
77+
78+ if (priv->syncWait)
79+ {
80+@@ -2429,10 +2429,10 @@
81+ {
82+ XWindowChanges wc = *xwc;
83+
84+- wc.x -= input.left;
85+- wc.y -= input.top;
86+- wc.width += input.left + input.right;
87+- wc.height += input.top + input.bottom;
88++ wc.x -= input.left - serverGeometry.border ();
89++ wc.y -= input.top - serverGeometry.border ();
90++ wc.width += input.left + input.right + serverGeometry.border ();
91++ wc.height += input.top + input.bottom + serverGeometry.border ();
92+
93+ XConfigureWindow (screen->dpy (), frame, valueMask, &wc);
94+ valueMask &= ~(CWSibling | CWStackMode);
95+Index: compiz-0.9.4git20110322/src/windowgeometry.cpp
96+===================================================================
97+--- compiz-0.9.4git20110322.orig/src/windowgeometry.cpp 2011-03-22 16:46:56.000000000 +0800
98++++ compiz-0.9.4git20110322/src/windowgeometry.cpp 2011-03-25 13:59:29.146725678 +0800
99+@@ -103,19 +103,22 @@
100+ int
101+ CompWindow::width () const
102+ {
103+- return priv->width;
104++ return priv->width +
105++ priv->geometry.border () * 2;
106+ }
107+
108+ int
109+ CompWindow::height () const
110+ {
111+- return priv->height;
112++ return priv->height +
113++ priv->geometry.border () * 2;;
114+ }
115+
116+ CompSize
117+ CompWindow::size () const
118+ {
119+- return CompSize (priv->width, priv->height);
120++ return CompSize (priv->width + priv->geometry.border () * 2,
121++ priv->height + priv->geometry.border () * 2);
122+ }
123+
124+ int
125+@@ -164,65 +167,65 @@
126+ CompRect
127+ CompWindow::borderRect () const
128+ {
129+- return CompRect (priv->geometry.x () - priv->border.left,
130+- priv->geometry.y () - priv->border.top,
131+- priv->geometry.width () +
132++ return CompRect (priv->geometry.x () - priv->geometry.border () - priv->border.left,
133++ priv->geometry.y () - priv->geometry.border () - priv->border.top,
134++ priv->geometry.width () + priv->geometry.border () * 2 +
135+ priv->border.left + priv->border.right,
136+- priv->geometry.height () +
137++ priv->geometry.height () + priv->geometry.border () * 2 +
138+ priv->border.top + priv->border.bottom);
139+ }
140+
141+ CompRect
142+ CompWindow::serverBorderRect () const
143+ {
144+- return CompRect (priv->serverGeometry.x () - priv->border.left,
145+- priv->serverGeometry.y () - priv->border.top,
146+- priv->serverGeometry.width () +
147++ return CompRect (priv->serverGeometry.x () - priv->geometry.border () - priv->border.left,
148++ priv->serverGeometry.y () - priv->geometry.border () - priv->border.top,
149++ priv->serverGeometry.width () + priv->geometry.border () * 2 +
150+ priv->border.left + priv->border.right,
151+- priv->serverGeometry.height () +
152++ priv->serverGeometry.height () + priv->geometry.border () * 2 +
153+ priv->border.top + priv->border.bottom);
154+ }
155+
156+ CompRect
157+ CompWindow::inputRect () const
158+ {
159+- return CompRect (priv->geometry.x () - priv->input.left,
160+- priv->geometry.y () - priv->input.top,
161+- priv->geometry.width () +
162++ return CompRect (priv->geometry.x () - priv->geometry.border () - priv->input.left,
163++ priv->geometry.y () - priv->geometry.border () - priv->input.top,
164++ priv->geometry.width () + priv->geometry.border () * 2 +
165+ priv->input.left + priv->input.right,
166+- priv->geometry.height () +
167++ priv->geometry.height () +priv->geometry.border () * 2 +
168+ priv->input.top + priv->input.bottom);
169+ }
170+
171+ CompRect
172+ CompWindow::serverInputRect () const
173+ {
174+- return CompRect (priv->serverGeometry.x () - priv->input.left,
175+- priv->serverGeometry.y () - priv->input.top,
176+- priv->serverGeometry.width () +
177++ return CompRect (priv->serverGeometry.x () - priv->serverGeometry.border () - priv->input.left,
178++ priv->serverGeometry.y () - priv->serverGeometry.border () - priv->input.top,
179++ priv->serverGeometry.width () + priv->serverGeometry.border () * 2 +
180+ priv->input.left + priv->input.right,
181+- priv->serverGeometry.height () +
182++ priv->serverGeometry.height () + priv->serverGeometry.border () * 2 +
183+ priv->input.top + priv->input.bottom);
184+ }
185+
186+ CompRect
187+ CompWindow::outputRect () const
188+ {
189+- return CompRect (priv->geometry.x () - priv->output.left,
190+- priv->geometry.y () - priv->output.top,
191+- priv->geometry.width () +
192++ return CompRect (priv->geometry.x () - priv->serverGeometry.border ()- priv->output.left,
193++ priv->geometry.y () - priv->serverGeometry.border () - priv->output.top,
194++ priv->geometry.width () + priv->serverGeometry.border () * 2 +
195+ priv->output.left + priv->output.right,
196+- priv->geometry.height () +
197++ priv->geometry.height () + priv->serverGeometry.border () * 2 +
198+ priv->output.top + priv->output.bottom);
199+ }
200+
201+ CompRect
202+ CompWindow::serverOutputRect () const
203+ {
204+- return CompRect (priv->serverGeometry.x () - priv->output.left,
205+- priv->serverGeometry.y () - priv->output.top,
206+- priv->serverGeometry.width () +
207++ return CompRect (priv->serverGeometry.x () - priv->serverGeometry.border () - priv->output.left,
208++ priv->serverGeometry.y () - priv->serverGeometry.border () - priv->output.top,
209++ priv->serverGeometry.width () + priv->serverGeometry.border () * 2 +
210+ priv->output.left + priv->output.right,
211+- priv->serverGeometry.height () +
212++ priv->serverGeometry.height () + priv->serverGeometry.border () * 2 +
213+ priv->output.top + priv->output.bottom);
214+ }
215
216=== modified file 'debian/patches/series'
217--- debian/patches/series 2011-03-24 11:03:37 +0000
218+++ debian/patches/series 2011-03-25 12:17:26 +0000
219@@ -9,3 +9,5 @@
220 086_new_grid_defaults.patch
221 090_git_fix_new_invisible_windows.patch
222 100_bump_core.h.patch
223+101_disable_2d_decorations.patch
224+102_fix_xterm.patch
225
226=== modified file 'debian/rules'
227--- debian/rules 2011-03-01 12:31:42 +0000
228+++ debian/rules 2011-03-25 12:17:26 +0000
229@@ -12,7 +12,7 @@
230
231 override_dh_auto_configure:
232 # currently, segfault if CMAKE_BUILD_TYPE=Release
233- dh_auto_configure -- -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_DEFAULT_PLUGINS=\"$(DEFAULT_PLUGINS)\" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCOMPIZ_PACKAGING_ENABLED=TRUE
234+ dh_auto_configure -- -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_DEFAULT_PLUGINS=\"$(DEFAULT_PLUGINS)\" -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_PACKAGING_ENABLED=TRUE
235
236 override_dh_install:
237 # Language packs

Subscribers

People subscribed via source and target branches

to all changes: