~focus-follows-mouse/ubuntu/precise/compiz/fix-883383

« back to all changes in this revision

Viewing changes to plugins/wobbly/src/wobbly.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-03-22 21:45:34 UTC
  • mfrom: (0.168.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110322214534-l6i6ds54os5uoqt1
Tags: 1:0.9.4git20110322-0ubuntu1
* New upstream bug fix snapshot:
  - Application windows can sometimes fail to display and will
    mask regions of the screen (LP: #709461)
  - Compiz switcher Alt-Tab order is not predictable - should
    maintain LIFO ordering in application switcher (LP: #175874)
  - after compiz crashed, gnome-panel isn't mapped again (LP: #711378)
  - invisible windows border problem (LP: #710271)
  - Compiz thinks you are clicking in an edge window when you
    are not (LP: #734250)
  - Add test case for invisible window regressions (LP: #736876)
  - often can't alt-click-dnd to move the focussed dialog (LP: #711911)
  - When windows open for the first time they should not hide (LP: #723878)
  - Unity Grid is broken for multi-monitor setups (LP: #709221)
  - Pixmaps trashed during animations when window is unmapped (LP: #733331)
  - Windows have blank decorations when rapidly closing and
    reopening (LP: #733328)
  - Unity is not restored on unity/compiz crash: compiz doesn't register
    properly with gnome-session (LP: #716462)
* remove the patch taken from upstream
* refresh u-w-d patch with latest upstream work
* debian/compiz-core.install:
  - image move to the final destination
* debian/patches/100_bump_core.h.patch:
  - bump for ABI breakage
* debian/compiz-decorator:
  - use gtk-window-decorator and not unity-window-decorator as it's really
    crashy for now (will probably redo an upload tomorrow with a fixed
    decorator)

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    v1 = -65535.0f;
48
48
    v2 =  65535.0f;
49
49
 
50
 
    x = object->position.x + window->output ().left - window->input ().left;
 
50
    x = object->position.x + window->output ().left - window->border ().left;
51
51
 
52
52
    output = ::screen->outputDeviceForPoint (x, object->position.y);
53
53
    const CompRect &workArea =
71
71
            }
72
72
            else if (!p->invisible () && (p->type () & SNAP_WINDOW_TYPE))
73
73
            {
74
 
                s = p->geometry ().y () - p->input ().top -
 
74
                s = p->geometry ().y () - p->border ().top -
75
75
                    window->output ().top;
76
 
                e = p->geometry ().y () + p->height () + p->input ().bottom +
 
76
                e = p->geometry ().y () + p->height () + p->border ().bottom +
77
77
                    window->output ().bottom;
78
78
            }
79
79
            else
103
103
                    v = p->struts ()->left.x + p->struts ()->left.width;
104
104
                else
105
105
                    v = p->geometry ().x () + p->width () +
106
 
                        p->input ().right;
 
106
                        p->border ().right;
107
107
 
108
108
                if (v <= x)
109
109
                {
123
123
        v2 = workAreaEdge;
124
124
    }
125
125
 
126
 
    v1 = v1 - window->output ().left + window->input ().left;
127
 
    v2 = v2 - window->output ().left + window->input ().left;
 
126
    v1 = v1 - window->output ().left + window->border ().left;
 
127
    v2 = v2 - window->output ().left + window->border ().left;
128
128
 
129
129
    if (v1 != (int) object->vertEdge.next)
130
130
        object->vertEdge.snapped = false;
155
155
    v1 =  65535.0f;
156
156
    v2 = -65535.0f;
157
157
 
158
 
    x = object->position.x - window->output ().right + window->input ().right;
 
158
    x = object->position.x - window->output ().right + window->border ().right;
159
159
 
160
160
    output = ::screen->outputDeviceForPoint (x, object->position.y);
161
161
    const CompRect &workArea =
179
179
            }
180
180
            else if (!p->invisible () && (p->type () & SNAP_WINDOW_TYPE))
181
181
            {
182
 
                s = p->geometry ().y () - p->input ().top -
 
182
                s = p->geometry ().y () - p->border ().top -
183
183
                    window->output ().top;
184
 
                e = p->geometry ().y () + p->height () + p->input ().bottom +
 
184
                e = p->geometry ().y () + p->height () + p->border ().bottom +
185
185
                    window->output ().bottom;
186
186
            }
187
187
            else
210
210
                if (p->mapNum () && p->struts ())
211
211
                    v = p->struts ()->right.x;
212
212
                else
213
 
                    v = p->geometry ().x () - p->input ().left;
 
213
                    v = p->geometry ().x () - p->border ().left;
214
214
 
215
215
                if (v >= x)
216
216
                {
230
230
        v2 = workAreaEdge;
231
231
    }
232
232
 
233
 
    v1 = v1 + window->output ().right - window->input ().right;
234
 
    v2 = v2 + window->output ().right - window->input ().right;
 
233
    v1 = v1 + window->output ().right - window->border ().right;
 
234
    v2 = v2 + window->output ().right - window->border ().right;
235
235
 
236
236
    if (v1 != (int) object->vertEdge.next)
237
237
        object->vertEdge.snapped = false;
262
262
    v1 = -65535.0f;
263
263
    v2 =  65535.0f;
264
264
 
265
 
    y = object->position.y + window->output ().top - window->input ().top;
 
265
    y = object->position.y + window->output ().top - window->border ().top;
266
266
 
267
267
    output = ::screen->outputDeviceForPoint (object->position.x, y);
268
268
    const CompRect &workArea =
286
286
            }
287
287
            else if (!p->invisible () && (p->type () & SNAP_WINDOW_TYPE))
288
288
            {
289
 
                s = p->geometry ().x () - p->input ().left -
 
289
                s = p->geometry ().x () - p->border ().left -
290
290
                    window->output ().left;
291
 
                e = p->geometry ().x () + p->width () + p->input ().right +
 
291
                e = p->geometry ().x () + p->width () + p->border ().right +
292
292
                    window->output ().right;
293
293
            }
294
294
            else
317
317
                if (p->mapNum () && p->struts ())
318
318
                    v = p->struts ()->top.y + p->struts ()->top.height;
319
319
                else
320
 
                    v = p->geometry ().y () + p->height () + p->input ().bottom;
 
320
                    v = p->geometry ().y () + p->height () + p->border ().bottom;
321
321
 
322
322
                if (v <= y)
323
323
                {
337
337
        v2 = workAreaEdge;
338
338
    }
339
339
 
340
 
    v1 = v1 - window->output ().top + window->input ().top;
341
 
    v2 = v2 - window->output ().top + window->input ().top;
 
340
    v1 = v1 - window->output ().top + window->border ().top;
 
341
    v2 = v2 - window->output ().top + window->border ().top;
342
342
 
343
343
    if (v1 != (int) object->horzEdge.next)
344
344
        object->horzEdge.snapped = false;
369
369
    v1 =  65535.0f;
370
370
    v2 = -65535.0f;
371
371
 
372
 
    y = object->position.y - window->output ().bottom + window->input ().bottom;
 
372
    y = object->position.y - window->output ().bottom + window->border ().bottom;
373
373
 
374
374
    output = ::screen->outputDeviceForPoint (object->position.x, y);
375
375
    const CompRect &workArea =
393
393
            }
394
394
            else if (!p->invisible () && (p->type () & SNAP_WINDOW_TYPE))
395
395
            {
396
 
                s = p->geometry ().x () - p->input ().left -
 
396
                s = p->geometry ().x () - p->border ().left -
397
397
                    window->output ().left;
398
 
                e = p->geometry ().x () + p->width () + p->input ().right +
 
398
                e = p->geometry ().x () + p->width () + p->border ().right +
399
399
                    window->output ().right;
400
400
            }
401
401
            else
424
424
                if (p->mapNum () && p->struts ())
425
425
                    v = p->struts ()->bottom.y;
426
426
                else
427
 
                    v = p->geometry ().y () - p->input ().top;
 
427
                    v = p->geometry ().y () - p->border ().top;
428
428
 
429
429
                if (v >= y)
430
430
                {
444
444
        v2 = workAreaEdge;
445
445
    }
446
446
 
447
 
    v1 = v1 + window->output ().bottom - window->input ().bottom;
448
 
    v2 = v2 + window->output ().bottom - window->input ().bottom;
 
447
    v1 = v1 + window->output ().bottom - window->border ().bottom;
 
448
    v2 = v2 + window->output ().bottom - window->border ().bottom;
449
449
 
450
450
    if (v1 != (int) object->horzEdge.next)
451
451
        object->horzEdge.snapped = false;
1388
1388
                            }
1389
1389
 
1390
1390
                            decorTop = bottommostYPos +
1391
 
                                       w->output ().top - w->input ().top;
 
1391
                                       w->output ().top - w->border ().top;
1392
1392
                            decorTitleBottom = topmostYPos + w->output ().top;
1393
1393
 
1394
1394
                            if (constraintBox->y () > decorTop)