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

« back to all changes in this revision

Viewing changes to plugins/move/src/move.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:
339
339
                if (!ms->region)
340
340
                    ms->region = moveGetYConstrainRegion (s);
341
341
 
342
 
                /* make sure that the top frame extents or the top row of
 
342
                /* make sure that the top border extents or the top row of
343
343
                   pixels are within what is currently our valid screen
344
344
                   region */
345
345
                if (ms->region)
347
347
                    int x, y, width, height;
348
348
                    int status;
349
349
 
350
 
                    x      = wX + dx - w->input ().left;
351
 
                    y      = wY + dy - w->input ().top;
352
 
                    width  = wWidth + w->input ().left + w->input ().right;
353
 
                    height = w->input ().top ? w->input ().top : 1;
 
350
                    x      = wX + dx - w->border ().left;
 
351
                    y      = wY + dy - w->border ().top;
 
352
                    width  = wWidth + w->border ().left + w->border ().right;
 
353
                    height = w->border ().top ? w->border ().top : 1;
354
354
 
355
355
                    status = XRectInRegion (ms->region, x, y,
356
356
                                            (unsigned int) width,
371
371
                            if (xStatus != RectangleIn)
372
372
                                dx += (dx < 0) ? 1 : -1;
373
373
 
374
 
                            x = wX + dx - w->input ().left;
 
374
                            x = wX + dx - w->border ().left;
375
375
                        }
376
376
 
377
377
                        while (dy && status != RectangleIn)
384
384
                            if (status != RectangleIn)
385
385
                                dy += (dy < 0) ? 1 : -1;
386
386
 
387
 
                            y = wY + dy - w->input ().top;
 
387
                            y = wY + dy - w->border ().top;
388
388
                        }
389
389
                    }
390
390
                    else
410
410
                                width = w->saveWc ().width;
411
411
 
412
412
                            w->saveWc ().x = xRoot - (width >> 1);
413
 
                            w->saveWc ().y = yRoot + (w->input ().top >> 1);
 
413
                            w->saveWc ().y = yRoot + (w->border ().top >> 1);
414
414
 
415
415
                            ms->x = ms->y = 0;
416
416
 
437
437
 
438
438
                            w->maximize (ms->origState);
439
439
 
440
 
                            wy  = workArea.y () + (w->input ().top >> 1);
 
440
                            wy  = workArea.y () + (w->border ().top >> 1);
441
441
                            wy += w->sizeHints ().height_inc >> 1;
442
442
 
443
443
                            s->warpPointer (0, wy - pointerY);
450
450
 
451
451
            if (w->state () & CompWindowStateMaximizedVertMask)
452
452
            {
453
 
                min = workArea.y () + w->input ().top;
454
 
                max = workArea.bottom () - w->input ().bottom - wHeight;
 
453
                min = workArea.y () + w->border ().top;
 
454
                max = workArea.bottom () - w->border ().bottom - wHeight;
455
455
 
456
456
                if (wY + dy < min)
457
457
                    dy = min - wY;
468
468
                if (wX + wWidth < 0)
469
469
                    return;
470
470
 
471
 
                min = workArea.x () + w->input ().left;
472
 
                max = workArea.right () - w->input ().right - wWidth;
 
471
                min = workArea.x () + w->border ().left;
 
472
                max = workArea.right () - w->border ().right - wWidth;
473
473
 
474
474
                if (wX + dx < min)
475
475
                    dx = min - wX;