Ubuntu

Merge lp:~om26er/ubuntu/natty/compiz/compiz-fix-772612 into lp:ubuntu/natty-proposed/compiz

Proposed by Omer Akram on 2011-08-10
Status: Work in progress
Proposed branch: lp:~om26er/ubuntu/natty/compiz/compiz-fix-772612
Merge into: lp:ubuntu/natty-proposed/compiz
Diff against target: 148 lines (+128/-0) 3 files modified
To merge this branch: bzr merge lp:~om26er/ubuntu/natty/compiz/compiz-fix-772612
Reviewer Review Type Date Requested Status
Didier Roche 2011-08-10 Needs Fixing on 2011-08-12
Ubuntu Sponsors Team 2011-08-10 Pending
Review via email: mp+71028@code.launchpad.net

Description of the Change

Backport fix for a showstopper (bug 772612).

these two commits were backported:
http://gitweb.compiz.org/?p=compiz/core;a=commit;h=32affe04818a82b884ef617bf319b0c9f2189cd9
http://gitweb.compiz.org/?p=compiz/core;a=commit;h=20eadb9be94e1624022b5e4a99ca1e5adb3f88a7

People in the bug report confirm that these two commits fix the issue that's described in the bug report. There is still a similar issue in Oneiric which is totally random as I have not been able to find any steps. The original bug is far destructive as it happens 100% of the time so it will be really wise to fix it in Natty.

To post a comment you must log in.
Omer Akram (om26er) wrote :

this branch causes a regression

Didier Roche (didrocks) wrote :

Thanks omer for spotting it :)

Set as "need fixing" then

review: Needs Fixing

Unmerged revisions

232. By Omer Akram on 2011-08-10

forgot to add the patch

231. By Omer Akram on 2011-08-10

* debian/patches/090_send_fake_configure_notify.patch:
  - Maximised window is displaced. (LP: #772612)

Preview Diff

1=== modified file 'debian/changelog'
2--- debian/changelog 2011-06-24 10:52:47 +0000
3+++ debian/changelog 2011-08-10 11:51:08 +0000
4@@ -1,3 +1,10 @@
5+compiz (1:0.9.4+bzr20110606-0ubuntu1~natty2.1) natty-proposed; urgency=low
6+
7+ * debian/patches/090_send_fake_configure_notify.patch:
8+ - Maximised window is displaced. (LP: #772612)
9+
10+ -- Omer Akram <om26er@ubuntu.com> Wed, 10 Aug 2011 16:36:11 +0500
11+
12 compiz (1:0.9.4+bzr20110606-0ubuntu1~natty2) natty-proposed; urgency=low
13
14 * debian/patches/00_bzr_fix_727143.patch:
15
16=== added file 'debian/patches/090_send_fake_configure_notify.patch'
17--- debian/patches/090_send_fake_configure_notify.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/090_send_fake_configure_notify.patch 2011-08-10 11:51:08 +0000
19@@ -0,0 +1,120 @@
20+From: Scott Talbert <swt@techie.net>
21+Author: Sam Spilsbury <sam.spilsbury@canonical.com>
22+Subject: Send a fake configure notify event when the window size doesn't change.
23+Origin: http://gitweb.compiz.org/?p=compiz/core;a=commitdiff;h=32affe04818a82b884ef617bf319b0c9f2189cd9
24+Origin: http://gitweb.compiz.org/?p=compiz/core;a=commitdiff;h=20eadb9be94e1624022b5e4a99ca1e5adb3f88a7
25+Bug-Ubuntu: https://launchpad.net/bugs/772612
26+
27+--- compiz-0.9.4+bzr20110606.orig/src/window.cpp 2011-06-01 11:49:33.000000000 -0400
28++++ compiz-0.9.4+bzr20110606/src/window.cpp 2011-08-09 14:03:25.000000000 -0400
29+@@ -770,7 +770,8 @@
30+
31+ if (input.left || input.right || input.top || input.bottom)
32+ {
33+- int x, y, width, height;
34++ int x, y;
35++ unsigned int width, height;
36+ int bw = serverGeometry.border () * 2;
37+
38+ x = serverGeometry.x () - input.left;
39+@@ -781,7 +782,36 @@
40+ if (shaded)
41+ height = input.top + input.bottom;
42+
43+- XMoveResizeWindow (screen->dpy (), frame, x, y, width, height);
44++ /* Geometry is the same, so we're not going to get a ConfigureNotify
45++ * event when the window is configured, which means that other plugins
46++ * won't know that the client, frame and wrapper windows got shifted
47++ * around (and might result in display corruption, eg in OpenGL */
48++ if (geometry.x () - input.left == x &&
49++ geometry.y () - input.top == y &&
50++ geometry.width () + input.left + input.right + bw == width &&
51++ geometry.height () + input.top + input.bottom + bw == height)
52++ {
53++ XConfigureEvent xev;
54++
55++ xev.type = ConfigureNotify;
56++ xev.event = screen->root ();
57++ xev.window = priv->frame;
58++
59++ xev.x = x;
60++ xev.y = y;
61++ xev.width = width;
62++ xev.height = height;
63++ xev.border_width = window->priv->attrib.border_width;
64++
65++ xev.above = (window->prev) ? ROOTPARENT (window->prev) : None;
66++ xev.override_redirect = window->priv->attrib.override_redirect;
67++
68++ XSendEvent (screen->dpy (), screen->root (), false,
69++ SubstructureNotifyMask, (XEvent *) &xev);
70++ }
71++ else
72++ XMoveResizeWindow (screen->dpy (), frame, x, y, width, height);
73++
74+ if (shaded)
75+ {
76+ XUnmapWindow (screen->dpy (), wrapper);
77+@@ -823,13 +853,13 @@
78+ XMoveResizeWindow (screen->dpy (), wrapper, 0, 0,
79+ serverGeometry.width (), serverGeometry.height ());
80+ }
81++
82+ XMoveResizeWindow (screen->dpy (), id, 0, 0,
83+ serverGeometry.width (), serverGeometry.height ());
84+ window->sendConfigureNotify ();
85+ frameRegion = CompRegion ();
86+ window->windowNotify (CompWindowNotifyFrameUpdate);
87+ }
88+-
89+ window->recalcActions ();
90+ }
91+
92+@@ -1425,8 +1455,8 @@
93+ bool
94+ CompWindow::resize (CompWindow::Geometry gm)
95+ {
96+- if (priv->geometry.x () != gm.width () ||
97+- priv->geometry.y () != gm.height () ||
98++ if (priv->geometry.width () != gm.width () ||
99++ priv->geometry.height () != gm.height () ||
100+ priv->geometry.border () != gm.border ())
101+ {
102+ int pw, ph;
103+@@ -3093,9 +3123,9 @@
104+ {
105+ if (!sibling)
106+ {
107+- XLowerWindow (screen->dpy (), id);
108+ if (frame)
109+ XLowerWindow (screen->dpy (), frame);
110++ XLowerWindow (screen->dpy (), id);
111+
112+ /* Restacking of compiz's window list happens
113+ * immediately and since this path doesn't call
114+@@ -5695,7 +5725,7 @@
115+
116+ if (!i)
117+ i = b;
118+-
119++
120+ if (priv->input.left != i->left ||
121+ priv->input.right != i->right ||
122+ priv->input.top != i->top ||
123+@@ -5722,6 +5752,7 @@
124+ Atoms::frameExtents,
125+ XA_CARDINAL, 32, PropModeReplace,
126+ (unsigned char *) data, 4);
127++
128+ priv->updateSize ();
129+ priv->updateFrameWindow ();
130+ }
131+@@ -5859,7 +5890,7 @@
132+ if (attrib.map_state == IsViewable || shaded)
133+ XMapWindow (dpy, frame);
134+
135+- attr.event_mask = SubstructureRedirectMask | StructureNotifyMask |
136++ attr.event_mask = SubstructureRedirectMask |
137+ SubstructureNotifyMask | EnterWindowMask |
138+ LeaveWindowMask;
139+
140
141=== modified file 'debian/patches/series'
142--- debian/patches/series 2011-06-24 10:52:47 +0000
143+++ debian/patches/series 2011-08-10 11:51:08 +0000
144@@ -6,3 +6,4 @@
145 060_move_checks_to_compiz.patch
146 065_add_bailer_and_detection_plugins.patch
147 086_new_grid_defaults.patch
148+090_send_fake_configure_notify.patch

Subscribers

People subscribed via source and target branches

to all changes: