From 9688cf451815e7e777651aa125c962aac0781972 Mon Sep 17 00:00:00 2001 From: aseigo Date: Sun, 18 Jan 2009 22:28:43 +0000 Subject: [PATCH] not quite so much needs to be delayed to the init() function git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/KDE/kdebase@913223 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- workspace/plasma/shells/desktop/panelview.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/workspace/plasma/shells/desktop/panelview.cpp b/workspace/plasma/shells/desktop/panelview.cpp index 3ff05c88..5e5b1ee0 100644 --- a/workspace/plasma/shells/desktop/panelview.cpp +++ b/workspace/plasma/shells/desktop/panelview.cpp @@ -232,20 +232,13 @@ PanelView::PanelView(Plasma::Containment *panel, int id, QWidget *parent) KConfigGroup sizes = KConfigGroup(&viewConfig, "Sizes"); QRect screenRect = Kephal::ScreenUtils::screenGeometry(containment()->screen()); m_lastSeenSize = sizes.readEntry("lastsize", m_lastHorizontal ? screenRect.width() : screenRect.height()); + m_alignment = alignmentFilter((Qt::Alignment)viewConfig.readEntry("Alignment", (int)Qt::AlignLeft)); m_offset = viewConfig.readEntry("Offset", 0); m_lastHorizontal = isHorizontal(); - QTimer::singleShot(0, this, SLOT(init())); -} - -void PanelView::init() -{ - KConfigGroup viewConfig = config(); - m_alignment = alignmentFilter((Qt::Alignment)viewConfig.readEntry("Alignment", (int)Qt::AlignLeft)); - setVisibilityMode((VisibilityMode)viewConfig.readEntry("panelVisibility", (int)m_visibilityMode)); + KWindowSystem::setType(winId(), NET::Dock); // pinchContainment calls updatePanelGeometry for us - QRect screenRect = Kephal::ScreenUtils::screenGeometry(containment()->screen()); pinchContainment(screenRect); m_lastMin = containment()->minimumSize(); m_lastMax = containment()->maximumSize(); @@ -253,6 +246,14 @@ void PanelView::init() // KWin setup KWindowSystem::setOnAllDesktops(winId(), true); + QTimer::singleShot(0, this, SLOT(init())); +} + +void PanelView::init() +{ + KConfigGroup viewConfig = config(); + setVisibilityMode((VisibilityMode)viewConfig.readEntry("panelVisibility", (int)m_visibilityMode)); + m_init = true; updateStruts(); @@ -353,7 +354,6 @@ void PanelView::setVisibilityMode(PanelView::VisibilityMode mode) delete m_glowBar; m_glowBar = 0; - KWindowSystem::setType(winId(), NET::Dock); if (mode == LetWindowsCover) { createUnhideTrigger(); KWindowSystem::clearState(winId(), NET::StaysOnTop | NET::KeepAbove); -- 2.11.4.GIT