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

« back to all changes in this revision

Viewing changes to plugins/composite/src/window.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:
139
139
 
140
140
        priv->pixmap = XCompositeNameWindowPixmap
141
141
            (screen->dpy (), ROOTPARENT (priv->window));
142
 
 
 
142
        priv->size = CompSize (attr.border_width * 2 + attr.width,
 
143
                               attr.border_width * 2 + attr.height);
143
144
        XUngrabServer (screen->dpy ());
144
145
    }
145
146
    return true;
152
153
    {
153
154
        XFreePixmap (screen->dpy (), priv->pixmap);
154
155
        priv->pixmap = None;
 
156
        priv->size = CompSize ();
155
157
    }
156
158
}
157
159
 
161
163
    return priv->pixmap;
162
164
}
163
165
 
 
166
const CompSize &
 
167
CompositeWindow::size ()
 
168
{
 
169
    return priv->size;
 
170
}
 
171
 
164
172
void
165
173
CompositeWindow::redirect ()
166
174
{
546
554
    window->resizeNotify (dx, dy, dwidth, dheight);
547
555
 
548
556
    Pixmap pixmap = None;
 
557
    CompSize size = CompSize ();
549
558
 
550
559
 
551
560
    if (window->shaded () || (window->isViewable () && damaged))
572
581
        Status       result;
573
582
        int          i;
574
583
 
575
 
        pixmap = XCompositeNameWindowPixmap (screen->dpy (), window->id ());
 
584
        pixmap = XCompositeNameWindowPixmap (screen->dpy (), ROOTPARENT (window));
576
585
        result = XGetGeometry (screen->dpy (), pixmap, &root, &i, &i,
577
586
                               &actualWidth, &actualHeight, &ui, &ui);
578
 
 
 
587
        size = CompSize (actualWidth, actualHeight);
579
588
        if (!result || actualWidth != (unsigned int) window->size ().width () ||
580
589
            actualHeight != (unsigned int) window->size ().height ())
581
590
        {
584
593
        }
585
594
    }
586
595
 
587
 
    if (!window->mapNum () && window->hasUnmapReference () &&
588
 
        window->isViewable ())
 
596
    if (((!window->mapNum () && window->isViewable ()) ||
 
597
           window->state () & CompWindowStateHiddenMask) && window->hasUnmapReference ())
589
598
    {
590
599
       /* keep old pixmap for windows that are unmapped on the client side,
591
600
        * but not yet on our side as it's pretty likely that plugins are
596
605
    {
597
606
        cWindow->release ();
598
607
        this->pixmap = pixmap;
 
608
        this->size = size;
599
609
    }
600
610
 
601
611
    cWindow->addDamage ();