From 0dd68c866c1c6a3d5deae29b5e2bb9ab88bc19f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 21 May 2010 21:47:57 +0000 Subject: [PATCH] * Moved child creation to the constructor; it doesn't seem to have any negative effect, and DetachedFromWindow() was not symmetrical to AttachedToWindow(), and would have leaked the children if called without destroying inbetween. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36888 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/deskbar/BarView.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/deskbar/BarView.cpp b/src/apps/deskbar/BarView.cpp index 15adc7e090..f113e6a566 100644 --- a/src/apps/deskbar/BarView.cpp +++ b/src/apps/deskbar/BarView.cpp @@ -86,6 +86,11 @@ TBarView::TBarView(BRect frame, bool vertical, bool left, bool top, fMaxRecentApps(kDefaultRecentAppCount), fLastDragItem(NULL) { + fReplicantTray = new TReplicantTray(this, fVertical); + fDragRegion = new TDragRegion(this, fReplicantTray); + fDragRegion->AddChild(fReplicantTray); + if (fTrayLocation != 0) + AddChild(fDragRegion); } @@ -104,12 +109,6 @@ TBarView::AttachedToWindow() SetViewColor(ui_color(B_MENU_BACKGROUND_COLOR)); SetFont(be_plain_font); - fReplicantTray = new TReplicantTray(this, fVertical); - fDragRegion = new TDragRegion(this, fReplicantTray); - fDragRegion->AddChild(fReplicantTray); - if (fTrayLocation != 0) - AddChild(fDragRegion); - UpdateAutoRaise(); UpdatePlacement(); @@ -576,6 +575,7 @@ TBarView::ShowingClock() const // #pragma mark - Drag and Drop + void TBarView::CacheDragData(const BMessage* incoming) {