~hypodermia/ubuntu/oneiric/compiz/fix-for-bug-301174

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-02-24 17:31:29 UTC
  • mfrom: (0.167.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110224173129-hsczyk7yw7s21flf
Tags: 1:0.9.4-0ubuntu1
* New upstream release:
  - Fix no windows receiving the focus if someone got the focus then was
    destroyed
  - Fix crash when resizing using keybindings
  - Fix unresponsive inactive decorations (LP: #703755) 
  - Fix the long awaited gconf crash (LP: #691561)
  - gtk-window-decorator doesn't respect special decoration styles
    (LP: #290835)
* debian/compiz-core.links,
  debian/source_compiz.py,
  debian/compiz-core.install:
  - install again a richer apport hook to redirect nux/libunity/unityshell
    crash. It also asks the user to redirect unity issues against unity (still
    incuding xorg info when needed)
* Removed a bunch of patches either cherry-picked or pushed upstream. With the
  other fixes, the gconf workaround is hopefully not needed anymore.
* refresh existing patches to still apply
* debian/control:
  - rename dep on compiz-fusion* to compiz*
* debian/patches/085_add_grid_plugin.patch:
  - refresh the grid plugin from new release
* debian/patches/086_new_grid_defaults.patch
  - separate tweaking the default settings to only have the effect that were
    specified:
    top -> maximize, left (top or bottom left) -> window half left of the
    screen, right (top or bottom right) -> window half right of the screen,
    bottom -> do nothing

Show diffs side-by-side

added added

removed removed

Lines of Context:
834
834
                pointerDx += xRoot - lastPointerX;
835
835
                pointerDy += yRoot - lastPointerY;
836
836
            }
 
837
            
 
838
            /* If we hit the edge of the screen while resizing
 
839
             * the window and the adjacent window edge has not hit
 
840
             * the edge of the screen, then accumulate pointer motion
 
841
             * in the opposite direction. (So the apparant x / y
 
842
             * mixup here is intentional)
 
843
             */
 
844
 
 
845
            if (isConstrained)
 
846
            {
 
847
                if (mask == ResizeLeftMask)
 
848
                {
 
849
                    if (xRoot == 0 &&
 
850
                        geometry.x - w->input ().left > grabWindowWorkArea->left ())
 
851
                        pointerDx += abs (yRoot - lastPointerY) * -1;
 
852
                }
 
853
                else if (mask == ResizeRightMask)
 
854
                {
 
855
                    if (xRoot == screen->width () -1 &&
 
856
                        geometry.x + geometry.width + w->input ().right < grabWindowWorkArea->right ())
 
857
                        pointerDx += abs (yRoot - lastPointerY);
 
858
                }
 
859
                if (mask == ResizeUpMask)
 
860
                {
 
861
                    if (yRoot == 0 &&
 
862
                        geometry.y - w->input ().top > grabWindowWorkArea->top ())
 
863
                        pointerDy += abs (xRoot - lastPointerX) * -1;
 
864
                }
 
865
                else if (mask == ResizeDownMask)
 
866
                {
 
867
                    if (yRoot == screen->height () -1 &&
 
868
                        geometry.y + geometry.height + w->input ().bottom < grabWindowWorkArea->bottom ())
 
869
                        pointerDx += abs (yRoot - lastPointerY);
 
870
                }
 
871
            }
837
872
        }
838
873
 
839
874
        if (mask & ResizeLeftMask)