Merge lp:~smspillaz/compiz-core/decor.input_extents_update into lp:compiz-core

Proposed by Sam Spilsbury
Status: Rejected
Rejected by: Sam Spilsbury
Proposed branch: lp:~smspillaz/compiz-core/decor.input_extents_update
Merge into: lp:compiz-core
Diff against target: 69 lines (+14/-10)
1 file modified
plugins/decor/src/decor.cpp (+14/-10)
To merge this branch: bzr merge lp:~smspillaz/compiz-core/decor.input_extents_update
Reviewer Review Type Date Requested Status
Sam Spilsbury Disapprove
Daniel van Vugt Needs Fixing
Alan Griffiths Needs Fixing
Review via email: mp+102062@code.launchpad.net

Description of the change

Don't update the frame window until input extents are updated

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

CompWindowExtents (a.k.a. compiz::window::extents::Extents) has a default constructor, if that works, then "memset (&emptyExtents, 0, sizeof (CompWindowExtents));" shouldn't be necessary, if it doesn't then the ctor should be fixed.

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also, bug 981703 is still present. Not fixed.

review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Doesn't work, rejecting

review: Disapprove

Unmerged revisions

3093. By Sam Spilsbury

Check against input extents and don't update the frame window until all
input extents are updated

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/decor/src/decor.cpp'
2--- plugins/decor/src/decor.cpp 2012-04-08 10:09:51 +0000
3+++ plugins/decor/src/decor.cpp 2012-04-16 08:17:21 +0000
4@@ -1436,8 +1436,7 @@
5
6 /* Do not allow windows which are later undecorated
7 * to have a set _NET_FRAME_EXTENTS */
8- if (decorate)
9- frameExtentsRequested = false;
10+ frameExtentsRequested = false;
11 }
12 else
13 {
14@@ -1531,16 +1530,16 @@
15 CompWindowExtents emptyExtents;
16 wd = NULL;
17
18+ memset (&emptyExtents, 0, sizeof (CompWindowExtents));
19+
20+ window->setWindowFrameExtents (&emptyExtents, &emptyExtents);
21+
22 /* Undecorated windows need to have the
23 * input and output frame removed and the
24 * frame window geometry reset */
25 if (decorate)
26 updateFrame ();
27
28- memset (&emptyExtents, 0, sizeof (CompWindowExtents));
29-
30- window->setWindowFrameExtents (&emptyExtents, &emptyExtents);
31-
32 movement -= oldShift;
33 }
34
35@@ -1609,8 +1608,8 @@
36 {
37 /* Destroy the input and output frames in case the window can't
38 * actually be decorated */
39- if (!wd || !(window->border ().left || window->border ().right ||
40- window->border ().top || window->border ().bottom) ||
41+ if (!wd || !(window->input ().left || window->input ().right ||
42+ window->input ().top || window->input ().bottom) ||
43 (wd->decor->type == WINDOW_DECORATION_TYPE_PIXMAP && outputFrame) ||
44 (wd->decor->type == WINDOW_DECORATION_TYPE_WINDOW && inputFrame))
45 {
46@@ -1650,8 +1649,8 @@
47 }
48 }
49 /* If the window can be decorated, update the frames */
50- if (wd && (window->border ().left || window->border ().right ||
51- window->border ().top || window->border ().bottom))
52+ if (wd && (window->input ().left || window->input ().right ||
53+ window->input ().top || window->input ().bottom))
54 {
55 if (wd->decor->type == WINDOW_DECORATION_TYPE_PIXMAP)
56 updateInputFrame ();
57@@ -2291,7 +2290,12 @@
58 {
59 w = screen->findWindow (event->xclient.window);
60 if (w)
61+ {
62+ DECOR_WINDOW (w);
63+
64+ dw->frameExtentsRequested = true;
65 DecorWindow::get (w)->update (true);
66+ }
67 }
68 default:
69 /* Check for damage events. If the output or input window

Subscribers

People subscribed via source and target branches