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

Proposed by Omer Akram
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
debian/changelog (+7/-0)
debian/patches/090_send_fake_configure_notify.patch (+120/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~om26er/ubuntu/natty/compiz/compiz-fix-772612
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Needs Fixing
Ubuntu Sponsors 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.
Revision history for this message
Omer Akram (om26er) wrote :

this branch causes a regression

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Thanks omer for spotting it :)

Set as "need fixing" then

review: Needs Fixing

Unmerged revisions

232. By Omer Akram

forgot to add the patch

231. By Omer Akram

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

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: