~mniess/ubuntu/precise/compiz/fix-screenshot

« back to all changes in this revision

Viewing changes to src/window.cpp

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2011-09-29 09:21:42 UTC
  • mfrom: (0.168.13 upstream)
  • Revision ID: package-import@ubuntu.com-20110929092142-0w0hwsrdb03c52ir
Tags: 1:0.9.6+bzr20110929-0ubuntu1
* New upstream snapshot:
  - Workspace switcher makes windows lose decorations (LP: #853951)
  - compiz crashed with SIGSEGV in PrivateWindow::addWindowStackChanges()
    (LP: #861793)
  - sometimes, restored window placed too high (LP: #716521)
  - can't maximize windows on second monitor and Qt windows displayed in
    wrong place (LP: #861341)
* 091_no_use_gnome_but_desktop_file.patch:
  - partially committed upstream, no more needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
2178
2178
 
2179
2179
            /* FIXME: This is a hack to avoid performance regressions
2180
2180
             * and must be removed in 0.9.6 */
2181
 
            if (tv.tv_usec - priv->lastConfigureRequest.tv_usec > 30000)
 
2181
            if (tv.tv_usec - priv->lastConfigureRequest.tv_usec > 300000)
2182
2182
            {
2183
2183
                compLogMessage ("core", CompLogLevelWarn, "failed to receive ConfigureNotify event from request at %i (now: %i)\n",
2184
2184
                                priv->lastConfigureRequest.tv_usec, tv.tv_usec);
3848
3848
         * if serverPrev was recently restacked */
3849
3849
        if (window->serverPrev)
3850
3850
        {
3851
 
            bool pendingRestacks = false;
3852
 
 
3853
 
            foreach (XWCValueMask &xwcvm, sibling->priv->pendingConfigures)
3854
 
            {
3855
 
                if (xwcvm.second & (CWSibling | CWStackMode))
3856
 
                {
3857
 
                    pendingRestacks = true;
3858
 
                    break;
3859
 
                }
3860
 
            }
3861
 
 
3862
 
            if (!sibling && window->serverPrev)
3863
 
            {
3864
 
                XWindowChanges xwc;
 
3851
            if (!sibling)
 
3852
            {
 
3853
                XWindowChanges lxwc;
3865
3854
                unsigned int   valueMask = CWStackMode;
3866
3855
 
3867
 
                xwc.stack_mode = Below;
 
3856
                lxwc.stack_mode = Below;
3868
3857
 
3869
3858
                /* Below with no sibling puts the window at the bottom
3870
3859
                 * of the stack */
3871
 
                XConfigureWindow (screen->dpy (), ROOTPARENT (window), valueMask, &xwc);
 
3860
                XConfigureWindow (screen->dpy (), ROOTPARENT (window), valueMask, &lxwc);
3872
3861
 
3873
3862
                if (serverFrame)
3874
 
                    priv->addPendingConfigure (xwc, CWStackMode);
 
3863
                    priv->addPendingConfigure (lxwc, CWStackMode);
3875
3864
 
3876
3865
                /* Update the list of windows last sent to the server */
3877
3866
                screen->unhookServerWindow (window);
3878
3867
                screen->insertServerWindow (window, 0);
3879
3868
            }
3880
 
            else if (sibling->priv->id != window->serverPrev->priv->id ||
3881
 
                     pendingRestacks)
 
3869
            else if (sibling)
3882
3870
            {
3883
 
                mask |= CWSibling | CWStackMode;
3884
 
 
3885
 
                xwc->stack_mode = Above;
3886
 
                xwc->sibling    = ROOTPARENT (sibling);
 
3871
                bool pendingRestacks = false;
 
3872
 
 
3873
                foreach (XWCValueMask &xwcvm, sibling->priv->pendingConfigures)
 
3874
                {
 
3875
                    if (xwcvm.second & (CWSibling | CWStackMode))
 
3876
                    {
 
3877
                        pendingRestacks = true;
 
3878
                        break;
 
3879
                    }
 
3880
                }
 
3881
 
 
3882
                if (sibling->priv->id != window->serverPrev->priv->id || pendingRestacks)
 
3883
                {
 
3884
                    mask |= CWSibling | CWStackMode;
 
3885
 
 
3886
                    xwc->stack_mode = Above;
 
3887
                    xwc->sibling    = ROOTPARENT (sibling);
 
3888
                }
3887
3889
            }
3888
3890
        }
3889
3891
        else if (sibling)
6503
6505
    if (priv->serverInput.left   != i->left ||
6504
6506
        priv->serverInput.right  != i->right ||
6505
6507
        priv->serverInput.top    != i->top ||
6506
 
        priv->serverInput.bottom != i->bottom)
 
6508
        priv->serverInput.bottom != i->bottom ||
 
6509
        priv->border.left   != b->left ||
 
6510
        priv->border.right  != b->right ||
 
6511
        priv->border.top    != b->top ||
 
6512
        priv->border.bottom != b->bottom)
6507
6513
    {
6508
6514
        unsigned long data[4];
6509
6515