~linaro-graphics-wg/compiz-core/linaro-gles2

« back to all changes in this revision

Viewing changes to src/window.cpp

  • Committer: Alexandros Frantzis
  • Date: 2012-04-19 10:17:26 UTC
  • mfrom: (2753.36.304 trunk)
  • Revision ID: alexandros.frantzis@linaro.org-20120419101726-1vgfi4f4s95uc42q
Sync with lp:compiz-core.

Show diffs side-by-side

added added

removed removed

Lines of Context:
641
641
     * the screen */
642
642
    bool foundVert = false;
643
643
    bool foundHorz = false;
 
644
    bool foundFull = false;
644
645
 
645
646
    foreach (CompOutput &o, screen->outputDevs ())
646
647
    {
647
 
        if (o.width () > (priv->sizeHints.min_width + priv->border.left + priv->border.right))
 
648
        if (o.width () >= (priv->sizeHints.min_width + priv->border.left + priv->border.right))
648
649
            foundHorz = true;
649
 
        if (o.height () > (priv->sizeHints.min_height + priv->border.top + priv->border.bottom))
 
650
        if (o.height () >= (priv->sizeHints.min_height + priv->border.top + priv->border.bottom))
650
651
            foundVert = true;
 
652
 
 
653
        /* Fullscreen windows don't need to fit borders... */
 
654
        if (o.width () >= priv->sizeHints.min_width &&
 
655
            o.height () >= priv->sizeHints.min_height)
 
656
            foundFull = true;
651
657
    }
652
658
 
653
659
    if (!foundHorz)
654
 
    {
655
 
        actions &= ~(CompWindowActionMaximizeHorzMask |
656
 
                     CompWindowActionFullscreenMask);
657
 
    }
 
660
        actions &= ~CompWindowActionMaximizeHorzMask;
658
661
 
659
662
    if (!foundVert)
660
 
    {
661
 
        actions &= ~(CompWindowActionMaximizeVertMask |
662
 
                     CompWindowActionFullscreenMask);
663
 
    }
 
663
        actions &= ~CompWindowActionMaximizeVertMask;
 
664
 
 
665
    if (!foundFull)
 
666
        actions &= ~CompWindowActionFullscreenMask;
664
667
 
665
668
    if (!(priv->mwmFunc & MwmFuncAll))
666
669
    {
7171
7174
    XDestroyWindow (screen->dpy (), serverFrame);
7172
7175
    XDestroyWindow (screen->dpy (), wrapper);
7173
7176
 
7174
 
    window->windowNotify (CompWindowNotifyUnreparent);
7175
7177
    /* This window is no longer "managed" in the
7176
7178
     * reparenting sense so clear its pending event
7177
7179
     * queue ... though maybe in future it would
7182
7184
    frame = None;
7183
7185
    wrapper = None;
7184
7186
    serverFrame = None;
 
7187
 
 
7188
    // Finally, (i.e. after updating state) notify the change
 
7189
    window->windowNotify (CompWindowNotifyUnreparent);
7185
7190
}