~sil2100/compiz-core/fix-1019337.2-0.9.7

« back to all changes in this revision

Viewing changes to src/window.cpp

  • Committer: Daniel van Vugt
  • Date: 2012-04-19 03:41:32 UTC
  • mfrom: (3094.1.1 tmp.fullscreen)
  • Revision ID: daniel.van.vugt@canonical.com-20120419034132-93t8dnkavd6sz4js
Don't refuse to fullscreen windows that have the same dimensions as the
screen itself (LP: #946388)

It seems that fitting a semi-maximized window is quite different to fitting
a fullscreen window, because a fullscreen window does not have borders.

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
    {