~jamespharaoh/ubuntu/precise/compiz/focus-follows-mouse

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-07-19 08:00:29 UTC
  • mfrom: (0.168.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20110719080029-zn4l32f34modz570
Tags: 1:0.9.5.0-0ubuntu1
* New upstream release:
  - unity window decorator needs to support different metacity frame types
    (LP: #795048)
  - firefox window mapped fullscreen gets mapped under gnome-panel
    (LP: #800592)
* Switch to dpkg-source 3.0 (quilt) format
* remove all debian/patches/*:
  - upstream now directly deliver with our patches
* debian/control:
  - replace kdebase-workspace-dev build-dep by kde-workspace-dev
  - build on libdecoration0-dev to build the unity window decorator
  - make compiz-dev dep on gtk-3
* debian/compiz-plugins-default.install:
  - grid is now in -main
* debian/libdecoration0.symbols:
  - add new symbols
* debian/patches/01_don_t_init_a11y.patch:
  - don't initialize the GAIL and AT bridges when comipz initialize
    (LP: #810045)

Show diffs side-by-side

added added

removed removed

Lines of Context:
401
401
}
402
402
 
403
403
Decoration *
404
 
Decoration::create (Window id,
405
 
                    Atom   decorAtom)
 
404
Decoration::create (Window        id,
 
405
                    long          *prop,
 
406
                    unsigned int  size,
 
407
                    unsigned int  type,
 
408
                    unsigned int  nOffset)
406
409
{
407
410
    Decoration      *decoration;
408
 
    Atom            actual;
409
 
    int             result, format;
410
 
    unsigned long   n, nleft;
411
 
    unsigned char   *data;
412
 
    long            *prop;
 
411
    unsigned int    frameType, frameState, frameActions;
413
412
    Pixmap          pixmap = None;
414
413
    decor_extents_t border;
415
414
    decor_extents_t input;
421
420
    int             minHeight;
422
421
    int             left, right, top, bottom;
423
422
    int             x1, y1, x2, y2;
424
 
    int             type;
425
 
 
426
 
    result = XGetWindowProperty (screen->dpy (), id,
427
 
                                 decorAtom, 0L, 1024L, false,
428
 
                                 XA_INTEGER, &actual, &format,
429
 
                                 &n, &nleft, &data);
430
 
 
431
 
    if (result != Success || !n || !data)
432
 
        return NULL;
433
 
 
434
 
    prop = (long *) data;
435
 
 
436
 
    if (decor_property_get_version (prop) != decor_version ())
437
 
    {
438
 
        compLogMessage ("decoration", CompLogLevelWarn,
439
 
                        "Property ignored because "
440
 
                        "version is %d and decoration plugin version is %d\n",
441
 
                        decor_property_get_version (prop), decor_version ());
442
 
 
443
 
        XFree (data);
444
 
        return NULL;
445
 
    }
446
 
 
447
 
    type = decor_property_get_type (prop);
448
423
 
449
424
    if (type ==  WINDOW_DECORATION_TYPE_PIXMAP &&
450
425
        !DecorScreen::get (screen)->cmActive)
 
426
    {
 
427
        compLogMessage ("decor", CompLogLevelWarn, "requested a pixmap type decoration when compositing isn't available");
451
428
        return NULL;
 
429
    }
452
430
 
453
431
    if (type == WINDOW_DECORATION_TYPE_PIXMAP)
454
432
    {
455
 
        nQuad = (n - BASE_PROP_SIZE) / QUAD_PROP_SIZE;
 
433
        nQuad = N_QUADS_MAX;
456
434
 
457
435
        quad = new decor_quad_t [nQuad];
458
436
        if (!quad)
459
437
        {
460
 
            XFree (data);
 
438
            compLogMessage ("decor", CompLogLevelWarn, "failed to allocate %i quads\n", nQuad);
461
439
            return NULL;
462
440
        }
463
441
 
464
 
        nQuad = decor_pixmap_property_to_quads (prop, n, &pixmap, &input,
 
442
        nQuad = decor_pixmap_property_to_quads (prop, nOffset, size, &pixmap, &input,
465
443
                                                &border, &maxInput,
466
 
                                                &maxBorder, &minWidth, &minHeight, quad);
467
 
 
468
 
        XFree (data);
 
444
                                                &maxBorder, &minWidth, &minHeight,
 
445
                                                &frameType, &frameState, &frameActions, quad);
469
446
 
470
447
        if (!nQuad)
471
448
        {
475
452
    }
476
453
    else if (type == WINDOW_DECORATION_TYPE_WINDOW)
477
454
    {
478
 
        if (!decor_window_property (prop, n, &input, &maxInput,
479
 
                                    &minWidth, &minHeight))
 
455
        if (!decor_window_property (prop, nOffset, size, &input, &maxInput,
 
456
                                    &minWidth, &minHeight, &frameType, &frameState, &frameActions))
480
457
        {
481
 
            XFree (data);
 
458
            compLogMessage ("decor", CompLogLevelWarn, "malformed decoration - not a window");
482
459
            return NULL;
483
460
        }
484
461
 
485
462
        border = input;
486
463
        maxBorder = maxInput;
487
 
        
488
 
        XFree (data);
489
464
    }
490
465
    else
 
466
    {
 
467
        compLogMessage ("decor", CompLogLevelWarn, "malformed decoration - undetermined type");
491
468
        return NULL;
 
469
    }
492
470
 
493
471
    decoration = new Decoration ();
494
472
    if (!decoration)
504
482
 
505
483
    if (!decoration->texture && type == WINDOW_DECORATION_TYPE_PIXMAP)
506
484
    {
 
485
        compLogMessage ("decor", CompLogLevelWarn, "failed to bind pixmap to texture");
507
486
        delete decoration;
508
487
        delete [] quad;
509
488
        return NULL;
579
558
    decoration->maxBorder.top    = maxBorder.top;
580
559
    decoration->maxBorder.bottom = maxBorder.bottom;
581
560
 
 
561
    /* Decoration info */
 
562
 
 
563
    decoration->frameType = frameType;
 
564
    decoration->frameState = frameState;
 
565
    decoration->frameActions = frameActions;
 
566
 
582
567
    decoration->refCount = 1;
583
568
    decoration->type = type;
584
569
 
599
584
    delete decoration;
600
585
}
601
586
 
 
587
DecorationList::DecorationList () :
 
588
    mList (0)
 
589
{
 
590
}
 
591
 
 
592
bool
 
593
DecorationList::updateDecoration (Window   id,
 
594
                                  Atom     decorAtom)
 
595
{
 
596
    unsigned long   n, nleft;
 
597
    unsigned char   *data;
 
598
    long            *prop;
 
599
    Atom            actual;
 
600
    int             result, format;
 
601
    unsigned int    type;
 
602
 
 
603
    /* FIXME: Should really check the property to see
 
604
     * if the decoration changed, and /then/ release
 
605
     * and re-update it, but for now just releasing all */
 
606
    mList.clear ();
 
607
 
 
608
    result = XGetWindowProperty (screen->dpy (), id,
 
609
                                 decorAtom, 0L,
 
610
                                 PROP_HEADER_SIZE + 6 * (BASE_PROP_SIZE +
 
611
                                                         QUAD_PROP_SIZE * N_QUADS_MAX),
 
612
                                 false, XA_INTEGER, &actual, &format,
 
613
                                 &n, &nleft, &data);
 
614
 
 
615
    if (result != Success || !n || !data)
 
616
        return false;
 
617
 
 
618
    /* Attempted to read the reasonable amount of
 
619
     * around 6 pixmap decorations, if there are more, we need
 
620
     * an additional roundtrip to read everything else
 
621
     */
 
622
    if (nleft)
 
623
    {
 
624
        XFree (data);
 
625
 
 
626
        result = XGetWindowProperty (screen->dpy (), id, decorAtom, 0L,
 
627
                                     n + nleft, false, XA_INTEGER, &actual, &format,
 
628
                                     &n, &nleft, &data);
 
629
 
 
630
        if (result != Success || !n || !data)
 
631
            return false;
 
632
    }
 
633
 
 
634
    prop = (long *) data;
 
635
 
 
636
    if (decor_property_get_version (prop) != decor_version ())
 
637
    {
 
638
        compLogMessage ("decoration", CompLogLevelWarn,
 
639
                        "Property ignored because "
 
640
                        "version is %d and decoration plugin version is %d\n",
 
641
                        decor_property_get_version (prop), decor_version ());
 
642
 
 
643
        XFree (data);
 
644
        return false;
 
645
    }
 
646
 
 
647
    type = decor_property_get_type (prop);
 
648
 
 
649
    for (int i = 0; i < decor_property_get_num (prop); i++)
 
650
    {
 
651
        Decoration *d = Decoration::create (id, prop, n, type, i);
 
652
 
 
653
        if (!d)
 
654
        {
 
655
 
 
656
            XFree (data);
 
657
            mList.clear ();
 
658
            return false;
 
659
        }
 
660
        else
 
661
            mList.push_back (d);
 
662
    }
 
663
 
 
664
    XFree (data);
 
665
 
 
666
    return true;
 
667
}
 
668
 
602
669
void
603
670
DecorWindow::updateDecoration ()
604
671
{
605
 
    Decoration *decoration;
606
 
 
607
672
    bindFailed = false;
608
 
    decoration = Decoration::create (window->id (), dScreen->winDecorAtom);
609
 
 
610
 
    if (decor)
611
 
        Decoration::release (decor);
612
 
 
 
673
 
 
674
    decor.updateDecoration (window->id (), dScreen->winDecorAtom);
613
675
    if (bindFailed)
614
676
        pixmapFailed = true;
615
677
    else
616
678
        pixmapFailed = false;
617
 
 
618
 
    decor = decoration;
619
679
}
620
680
 
621
681
WindowDecoration *
750
810
}
751
811
 
752
812
bool
753
 
DecorWindow::checkSize (Decoration *decor)
 
813
DecorWindow::checkSize (Decoration *decoration)
754
814
{
755
 
    return (decor->minWidth <= (int) window->size ().width () &&
756
 
            decor->minHeight <= (int) window->size ().height ());
 
815
    return (decoration->minWidth <= (int) window->size ().width () &&
 
816
            decoration->minHeight <= (int) window->size ().height ());
757
817
}
758
818
 
759
819
int
804
864
}
805
865
 
806
866
bool
 
867
DecorWindow::matchType (CompWindow *w,
 
868
                        unsigned int decorType)
 
869
{
 
870
    const unsigned int nTypeStates = 5;
 
871
    unsigned int i;
 
872
    struct typestate {
 
873
        unsigned int compFlag;
 
874
        unsigned int decorFlag;
 
875
    } typeStates[] =
 
876
    {
 
877
        { CompWindowTypeNormalMask, DECOR_WINDOW_TYPE_NORMAL },
 
878
        { CompWindowTypeDialogMask, DECOR_WINDOW_TYPE_DIALOG },
 
879
        { CompWindowTypeModalDialogMask, DECOR_WINDOW_TYPE_MODAL_DIALOG },
 
880
        { CompWindowTypeMenuMask, DECOR_WINDOW_TYPE_MENU },
 
881
        { CompWindowTypeUtilMask, DECOR_WINDOW_TYPE_UTILITY}
 
882
    };
 
883
 
 
884
    for (i = 0; i < nTypeStates; i++)
 
885
    {
 
886
        if ((decorType & typeStates[i].decorFlag) && (w->type () & typeStates[i].compFlag))
 
887
            return true;
 
888
    }
 
889
 
 
890
    return false;
 
891
}
 
892
 
 
893
bool
 
894
DecorWindow::matchState (CompWindow   *w,
 
895
                         unsigned int decorState)
 
896
{
 
897
    const unsigned int nStateStates = 3;
 
898
    unsigned int i;
 
899
    struct statestate {
 
900
        unsigned int compFlag;
 
901
        unsigned int decorFlag;
 
902
    } stateStates[] =
 
903
    {
 
904
        { CompWindowStateMaximizedVertMask, DECOR_WINDOW_STATE_MAXIMIZED_VERT },
 
905
        { CompWindowStateMaximizedHorzMask, DECOR_WINDOW_STATE_MAXIMIZED_HORZ },
 
906
        { CompWindowStateShadedMask, DECOR_WINDOW_STATE_SHADED }
 
907
    };
 
908
 
 
909
    /* Active is a separate check */
 
910
 
 
911
    if (screen->activeWindow () == w->id ())
 
912
        decorState &= ~(DECOR_WINDOW_STATE_FOCUS);
 
913
 
 
914
    for (i = 0; i < nStateStates; i++)
 
915
    {
 
916
        if ((decorState & stateStates[i].decorFlag) && (w->state () & stateStates[i].compFlag))
 
917
            decorState &= ~(stateStates[i].decorFlag);
 
918
    }
 
919
 
 
920
    return (decorState == 0);
 
921
}
 
922
 
 
923
bool
 
924
DecorWindow::matchActions (CompWindow   *w,
 
925
                           unsigned int decorActions)
 
926
{
 
927
    const unsigned int nActionStates =16;
 
928
    unsigned int i;
 
929
    struct actionstate {
 
930
        unsigned int compFlag;
 
931
        unsigned int decorFlag;
 
932
    } actionStates[] =
 
933
    {
 
934
        { DECOR_WINDOW_ACTION_RESIZE_HORZ, CompWindowActionResizeMask },
 
935
        { DECOR_WINDOW_ACTION_RESIZE_VERT, CompWindowActionResizeMask },
 
936
        { DECOR_WINDOW_ACTION_CLOSE, CompWindowActionCloseMask },
 
937
        { DECOR_WINDOW_ACTION_MINIMIZE, CompWindowActionMinimizeMask },
 
938
        { DECOR_WINDOW_ACTION_UNMINIMIZE,CompWindowActionMinimizeMask },
 
939
        { DECOR_WINDOW_ACTION_MAXIMIZE_HORZ, CompWindowActionMaximizeHorzMask },
 
940
        { DECOR_WINDOW_ACTION_MAXIMIZE_VERT, CompWindowActionMaximizeVertMask },
 
941
        { DECOR_WINDOW_ACTION_UNMAXIMIZE_HORZ, CompWindowActionMaximizeHorzMask },
 
942
        { DECOR_WINDOW_ACTION_UNMAXIMIZE_VERT, CompWindowActionMaximizeVertMask },
 
943
        { DECOR_WINDOW_ACTION_SHADE, CompWindowActionShadeMask },
 
944
        { DECOR_WINDOW_ACTION_UNSHADE, CompWindowActionShadeMask },
 
945
        { DECOR_WINDOW_ACTION_STICK, CompWindowActionStickMask },
 
946
        { DECOR_WINDOW_ACTION_UNSTICK, CompWindowActionStickMask },
 
947
        { DECOR_WINDOW_ACTION_FULLSCREEN, CompWindowActionFullscreenMask },
 
948
        { DECOR_WINDOW_ACTION_ABOVE, CompWindowActionAboveMask },
 
949
        { DECOR_WINDOW_ACTION_BELOW, CompWindowActionBelowMask },
 
950
    };
 
951
 
 
952
    /* Active is a separate check */
 
953
    for (i = 0; i < nActionStates; i++)
 
954
    {
 
955
        if ((decorActions & actionStates[i].decorFlag) && (w->type () & actionStates[i].compFlag))
 
956
            decorActions &= ~(actionStates[i].decorFlag);
 
957
    }
 
958
 
 
959
    return (decorActions == 0);
 
960
}
 
961
 
 
962
Decoration *
 
963
DecorationList::findMatchingDecoration (CompWindow *w,
 
964
                                        bool       sizeCheck)
 
965
{
 
966
    Decoration *decoration = NULL;
 
967
    DECOR_WINDOW (w);
 
968
 
 
969
    if (mList.size ())
 
970
    {
 
971
        const unsigned int typeMatch = (1 << 0);
 
972
        const unsigned int stateMatch = (1 << 1);
 
973
        const unsigned int actionsMatch = (1 << 2);
 
974
 
 
975
        unsigned int currentDecorState = 0;
 
976
 
 
977
        decoration = (sizeCheck ? dw->checkSize (mList.front ()) : true) ? mList.front () : NULL;
 
978
 
 
979
        foreach (Decoration *d, mList)
 
980
        {
 
981
            if (DecorWindow::matchType (w, d->frameType))
 
982
            {
 
983
                if (!(typeMatch & currentDecorState) && (!sizeCheck || dw->checkSize (d)))
 
984
                {
 
985
                    decoration = d;
 
986
                    currentDecorState |= typeMatch;
 
987
                }
 
988
 
 
989
                if (DecorWindow::matchState (w, d->frameState) && (!sizeCheck || dw->checkSize (d)))
 
990
                {
 
991
                    if (!(stateMatch & currentDecorState))
 
992
                    {
 
993
                        decoration = d;
 
994
                        currentDecorState |= stateMatch;
 
995
                    }
 
996
 
 
997
                    if (DecorWindow::matchActions (w, d->frameActions) && (!sizeCheck || dw->checkSize (d)))
 
998
                    {
 
999
                        if (!(actionsMatch & currentDecorState))
 
1000
                        {
 
1001
                            decoration = d;
 
1002
                            currentDecorState |= actionsMatch;
 
1003
 
 
1004
                            /* Perfect match, no need to continue searching */
 
1005
                            break;
 
1006
                        }
 
1007
                    }
 
1008
                }
 
1009
            }
 
1010
        }
 
1011
    }
 
1012
 
 
1013
    return decoration;
 
1014
}
 
1015
 
 
1016
bool
807
1017
DecorWindow::update (bool allowDecoration)
808
1018
{
809
1019
    Decoration       *old, *decoration = NULL;
855
1065
 
856
1066
    if (decorate)
857
1067
    {
858
 
        if (decor && checkSize (decor))
859
 
            decoration = decor;
860
 
        else
 
1068
        /* Attempt to find a matching */
 
1069
        decoration = decor.findMatchingDecoration (window, true);
 
1070
 
 
1071
        if (!decoration)
861
1072
        {
862
 
 
 
1073
            /* Find an appropriate default decoration to use */
863
1074
            if (dScreen->dmSupports & WINDOW_DECORATION_TYPE_PIXMAP &&
864
1075
                dScreen->cmActive &&
865
1076
                !(dScreen->dmSupports & WINDOW_DECORATION_TYPE_WINDOW &&
866
1077
                  pixmapFailed))
867
1078
            {
868
 
                if (window->id () == screen->activeWindow ())
869
 
                    decoration = dScreen->decor[DECOR_ACTIVE];
870
 
                else
871
 
                    decoration = dScreen->decor[DECOR_NORMAL];
 
1079
                decoration = dScreen->decor[DECOR_ACTIVE].findMatchingDecoration (window, false);
 
1080
 
 
1081
                if (!decoration)
 
1082
                    compLogMessage ("decor", CompLogLevelWarn, "No default decoration found, placement will not be correct");
872
1083
            }
873
1084
            else if (dScreen->dmSupports & WINDOW_DECORATION_TYPE_WINDOW)
874
1085
                decoration = &dScreen->windowDefault;
878
1089
    {
879
1090
        if (dScreen->optionGetShadowMatch ().evaluate (window))
880
1091
        {
881
 
            if (window->region ().numRects () == 1 && !window->alpha ())
882
 
                decoration = dScreen->decor[DECOR_BARE];
 
1092
            if (window->region ().numRects () == 1 && !window->alpha () && dScreen->decor[DECOR_BARE].mList.size ())
 
1093
                decoration = dScreen->decor[DECOR_BARE].mList.front ();
883
1094
 
884
1095
            if (decoration)
885
1096
            {
1182
1393
    }
1183
1394
 
1184
1395
    XUngrabServer (screen->dpy ());
1185
 
    XSync (screen->dpy (), false);
1186
1396
}
1187
1397
 
1188
1398
void
1301
1511
    }
1302
1512
 
1303
1513
    XUngrabServer (screen->dpy ());
1304
 
    XSync (screen->dpy (), false);
1305
1514
}
1306
1515
 
1307
1516
void
1359
1568
        }
1360
1569
    }
1361
1570
 
 
1571
    /* Different decorator became active, update all decorations */
1362
1572
    if (dmWin != this->dmWin)
1363
1573
    {
1364
1574
        int i;
1365
1575
 
1366
1576
        this->dmSupports = dmSupports;
1367
1577
 
 
1578
        /* Create new default decorations */
1368
1579
        if (dmWin)
1369
1580
        {
1370
1581
            for (i = 0; i < DECOR_NUM; i++)
1371
 
                decor[i] = Decoration::create (screen->root (), decorAtom[i]);
 
1582
            {
 
1583
                decor[i].updateDecoration (screen->root (), decorAtom[i]);
 
1584
            }
1372
1585
        }
1373
1586
        else
1374
1587
        {
 
1588
            /* No decorator active, destroy all decorations */
1375
1589
            for (i = 0; i < DECOR_NUM; i++)
1376
1590
            {
1377
 
                if (decor[i])
1378
 
                {
1379
 
                    Decoration::release (decor[i]);
1380
 
                    decor[i] = 0;
1381
 
                }
1382
 
            }
1383
 
 
1384
 
            foreach (CompWindow *w, screen->windows ())
1385
 
            {
1386
 
                DecorWindow *dw = DecorWindow::get (w);
1387
 
 
1388
 
                if (dw->decor)
1389
 
                {
1390
 
                    Decoration::release (dw->decor);
1391
 
                    dw->decor = 0;
1392
 
                }
 
1591
                decor[i].clear ();
 
1592
 
 
1593
                foreach (CompWindow *w, screen->windows ())
 
1594
                    DecorWindow::get (w)->decor.mList.clear ();
1393
1595
            }
1394
1596
        }
1395
1597
 
1619
1821
            {
1620
1822
                CompWindow    *w = screen->findWindow (event->xproperty.window);
1621
1823
 
1622
 
                if (w)
1623
 
                {
 
1824
                if (w)
 
1825
                {
1624
1826
                    DECOR_WINDOW (w);
1625
1827
 
1626
1828
                    if (dw->isSwitcher && !event->xproperty.state == PropertyDelete)
1627
1829
                        dw->updateSwitcher ();
1628
 
                }
 
1830
                }
1629
1831
            }
1630
1832
            else if (event->xproperty.atom == winDecorAtom)
1631
1833
            {
1670
1872
                        {
1671
1873
                            if (event->xproperty.atom == decorAtom[i])
1672
1874
                            {
1673
 
                                if (decor[i])
1674
 
                                    Decoration::release (decor[i]);
1675
 
 
1676
 
                                decor[i] =
1677
 
                                    Decoration::create (screen->root (),
1678
 
                                                        decorAtom[i]);
 
1875
                                decor[i].updateDecoration (screen->root (),
 
1876
                                                           decorAtom[i]);
1679
1877
 
1680
1878
                                foreach (CompWindow *w, screen->windows ())
1681
1879
                                    DecorWindow::get (w)->update (true);
1690
1888
            if (w)
1691
1889
            {
1692
1890
                DECOR_WINDOW (w);
1693
 
                if (!w->hasUnmapReference () && dw->decor)
 
1891
                if (!w->hasUnmapReference () && dw->wd && dw->wd->decor)
1694
1892
                    dw->updateFrame ();
1695
1893
            }
1696
1894
            break;
2046
2244
    winDecorAtom =
2047
2245
        XInternAtom (s->dpy (), DECOR_WINDOW_ATOM_NAME, 0);
2048
2246
    decorAtom[DECOR_BARE] =
2049
 
        XInternAtom (s->dpy (), DECOR_BARE_ATOM_NAME, 0);
2050
 
    decorAtom[DECOR_NORMAL] =
2051
 
        XInternAtom (s->dpy (), DECOR_NORMAL_ATOM_NAME, 0);
 
2247
        XInternAtom (s->dpy (), DECOR_BARE_ATOM_NAME, 0);
2052
2248
    decorAtom[DECOR_ACTIVE] =
2053
2249
        XInternAtom (s->dpy (), DECOR_ACTIVE_ATOM_NAME, 0);
2054
2250
    inputFrameAtom =
2091
2287
    cmActive = (cScreen) ? cScreen->compositingActive () &&
2092
2288
               GLScreen::get (s) != NULL : false;
2093
2289
 
2094
 
    for (unsigned int i = 0; i < DECOR_NUM; i++)
2095
 
        decor[i] = NULL;
2096
 
 
2097
2290
    checkForDm (false);
2098
2291
 
2099
2292
    decoratorStart.start (boost::bind (&DecorScreen::decoratorStartTimeout,
2107
2300
DecorScreen::~DecorScreen ()
2108
2301
{
2109
2302
    for (unsigned int i = 0; i < DECOR_NUM; i++)
2110
 
        if (decor[i])
2111
 
            Decoration::release (decor[i]);
 
2303
        decor[i].clear ();
2112
2304
 
2113
2305
    screen->addSupportedAtomsSetEnabled (this, false);
2114
2306
    screen->updateSupportedWmHints ();
2121
2313
    cWindow (CompositeWindow::get (w)),
2122
2314
    dScreen (DecorScreen::get (screen)),
2123
2315
    wd (NULL),
2124
 
    decor (NULL),
2125
2316
    inputFrame (None),
2126
2317
    outputFrame (None),
2127
2318
    pixmapFailed (false),
2172
2363
    if (wd)
2173
2364
        WindowDecoration::destroy (wd);
2174
2365
 
2175
 
    if (decor)
2176
 
        Decoration::release (decor);
 
2366
    decor.mList.clear ();
2177
2367
}
2178
2368
 
2179
2369
bool