public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas K. Huettel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde:master commit in: kde-base/plasma-workspace/files/, kde-base/plasma-workspace/
Date: Sat, 21 May 2011 20:33:02 +0000 (UTC)	[thread overview]
Message-ID: <355dfc135755c1a39ad0c9c0f2024f3caa96c439.dilfridge@gentoo> (raw)

commit:     355dfc135755c1a39ad0c9c0f2024f3caa96c439
Author:     Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Sat May 21 20:53:09 2011 +0000
Commit:     Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat May 21 20:53:09 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=355dfc13

[kde-base/plasma-workspace] Revert upstream commit causing problems with panel placement, bug 364555

(Portage version: 2.1.9.49/git/Linux x86_64, signed Manifest commit with key B6C5F7DE)

---
 .../plasma-workspace-4.6.2-panelplacement.patch    |  350 ++++++++++++++++++++
 .../plasma-workspace-4.6.9999.ebuild               |    1 +
 2 files changed, 351 insertions(+), 0 deletions(-)

diff --git a/kde-base/plasma-workspace/files/plasma-workspace-4.6.2-panelplacement.patch b/kde-base/plasma-workspace/files/plasma-workspace-4.6.2-panelplacement.patch
new file mode 100644
index 0000000..e9c049e
--- /dev/null
+++ b/kde-base/plasma-workspace/files/plasma-workspace-4.6.2-panelplacement.patch
@@ -0,0 +1,350 @@
+diff --git a/plasma/desktop/shell/panelview.cpp b/plasma/desktop/shell/panelview.cpp
+index 9e76304..ac1425a 100644
+--- a/plasma/desktop/shell/panelview.cpp
++++ b/plasma/desktop/shell/panelview.cpp
+@@ -20,6 +20,7 @@
+ #include "panelview.h"
+ 
+ #include <QApplication>
++#include <QDesktopWidget>
+ #include <QGraphicsLinearLayout>
+ #include <QPropertyAnimation>
+ #include <QTimer>
+@@ -29,9 +30,8 @@
+ #include <X11/extensions/shape.h>
+ #endif
+ 
+-#include <KDebug>
+-#include <KIdleTime>
+ #include <KWindowSystem>
++#include <KDebug>
+ 
+ #include <Plasma/Containment>
+ #include <Plasma/Corona>
+@@ -309,7 +309,6 @@ PanelView::PanelView(Plasma::Containment *panel, int id, QWidget *parent)
+       m_glowBar(0),
+       m_mousePollTimer(0),
+       m_strutsTimer(new QTimer(this)),
+-      m_rehideAfterAutounhideTimer(new QTimer(this)),
+       m_spacer(0),
+       m_spacerIndex(-1),
+       m_shadowWindow(0),
+@@ -319,8 +318,7 @@ PanelView::PanelView(Plasma::Containment *panel, int id, QWidget *parent)
+       m_visibilityMode(NormalPanel),
+       m_lastHorizontal(true),
+       m_editing(false),
+-      m_triggerEntered(false),
+-      m_respectStatus(true)
++      m_triggerEntered(false)
+ {
+     // KWin setup
+     KWindowSystem::setOnAllDesktops(winId(), true);
+@@ -330,13 +328,11 @@ PanelView::PanelView(Plasma::Containment *panel, int id, QWidget *parent)
+     m_strutsTimer->setSingleShot(true);
+     connect(m_strutsTimer, SIGNAL(timeout()), this, SLOT(updateStruts()));
+ 
+-    // this timer controls checks to re-hide a panel after it's been unhidden
+-    // for the user because, e.g., something is demanding attention
+-    m_rehideAfterAutounhideTimer->setSingleShot(true);
+-    connect(m_rehideAfterAutounhideTimer, SIGNAL(timeout()), this, SLOT(checkAutounhide()));
+-
+     // Graphics view setup
+     setFrameStyle(QFrame::NoFrame);
++    //setAutoFillBackground(true);
++    //setDragMode(QGraphicsView::RubberBandDrag);
++    //setCacheMode(QGraphicsView::CacheBackground);
+     setInteractive(true);
+     setAcceptDrops(true);
+     setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+@@ -356,20 +352,10 @@ PanelView::PanelView(Plasma::Containment *panel, int id, QWidget *parent)
+ 
+     const bool onScreen = panel->screen() < PlasmaApp::self()->corona()->numScreens();
+     const QRect screenRect = onScreen ?  PlasmaApp::self()->corona()->screenGeometry(panel->screen()) : QRect();
+-    const int sw = screenRect.width();
+-    const int sh = screenRect.height();
+-    m_lastSeenSize = sizes.readEntry("lastsize", m_lastHorizontal ? sw : sh);
+-
+-    if (onScreen) {
+-        const QString last = m_lastHorizontal ? "Horizontal" + QString::number(sw) :
+-                                                "Vertical" + QString::number(sh);
+-        if (sizes.hasGroup(last)) {
+-            KConfigGroup thisSize(&sizes, last);
+-            resize(thisSize.readEntry("size", m_lastHorizontal ? QSize(sw, 27) : QSize(27, sh)));
+-        }
+-    } else {
++    if (!onScreen) {
+         resize(panel->size().toSize());
+     }
++    m_lastSeenSize = sizes.readEntry("lastsize", m_lastHorizontal ? screenRect.width() : screenRect.height());
+ 
+     m_alignment = alignmentFilter((Qt::Alignment)viewConfig.readEntry("Alignment", (int)Qt::AlignLeft));
+     KConfigGroup sizeConfig(&viewConfig, (m_lastHorizontal ? "Horizontal" : "Vertical") +
+@@ -413,7 +399,7 @@ void PanelView::setContainment(Plasma::Containment *containment)
+         disconnect(oldContainment);
+     }
+ 
+-    connect(containment, SIGNAL(newStatus(Plasma::ItemStatus)), this, SLOT(statusUpdated(Plasma::ItemStatus)));
++    connect(containment, SIGNAL(newStatus(Plasma::ItemStatus)), this, SLOT(setStatus(Plasma::ItemStatus)));
+     connect(containment, SIGNAL(destroyed(QObject*)), this, SLOT(panelDeleted()));
+     connect(containment, SIGNAL(toolBoxToggled()), this, SLOT(togglePanelController()));
+     connect(containment, SIGNAL(appletAdded(Plasma::Applet *, const QPointF &)), this, SLOT(appletAdded(Plasma::Applet *)));
+@@ -436,6 +422,10 @@ void PanelView::setContainment(Plasma::Containment *containment)
+ 
+     // ensure we aren't overlapping other panels
+     const QRect screenRect = PlasmaApp::self()->corona()->screenGeometry(containment->screen());
++    const QRegion availGeom = PlasmaApp::self()->corona()->availableScreenRegion(containment->screen());
++    const int w = containment->size().width();
++    const int h = containment->size().height();
++    const int length = containment->formFactor() == Plasma::Horizontal ? w : h;
+ 
+     View::setContainment(containment);
+ 
+@@ -448,11 +438,6 @@ void PanelView::setContainment(Plasma::Containment *containment)
+ 
+     updateStruts();
+     checkShadow();
+-
+-    // if we are an autohiding panel, then see if the status mandates we do something about it
+-    if (m_visibilityMode != NormalPanel && m_visibilityMode != WindowsGoBelow) {
+-        checkUnhide(containment->status());
+-    }
+ }
+ 
+ void PanelView::themeChanged()
+@@ -463,7 +448,6 @@ void PanelView::themeChanged()
+ 
+ void PanelView::checkShadow()
+ {
+-#ifndef Q_WS_WIN
+     if (KWindowSystem::compositingActive() && containment()->property("shadowPath").isValid()) {
+         if (!m_shadowWindow) {
+             m_shadowWindow = new ShadowWindow(this);
+@@ -478,11 +462,12 @@ void PanelView::checkShadow()
+         if (m_shadowWindow->isValid() && isVisible()) {
+             m_shadowWindow->show();
+         }
+-    } else if (m_shadowWindow) {
+-        m_shadowWindow->deleteLater();
+-        m_shadowWindow = 0;
++    } else {
++        if (m_shadowWindow) {
++            m_shadowWindow->deleteLater();
++            m_shadowWindow = 0;
++        }
+     }
+-#endif
+ }
+ 
+ void PanelView::setPanelDragPosition(const QPoint &point)
+@@ -709,6 +694,8 @@ void PanelView::updatePanelGeometry()
+             geom.moveTopLeft(QPoint(screenGeom.center().x() - geom.width()/2 + 1 - geom.width()%2 + m_offset, screenGeom.top()));
+         }
+ 
++        //enable borders if needed
++        //c->setGeometry(QRect(geom.left(), c->geometry().top(), geom.width(), geom.height()));
+         break;
+ 
+     case Plasma::LeftEdge:
+@@ -720,6 +707,8 @@ void PanelView::updatePanelGeometry()
+             geom.moveTopLeft(QPoint(screenGeom.left(), screenGeom.center().y() - geom.height()/2 + 1 - geom.height()%2 + m_offset));
+         }
+ 
++        //enable borders if needed
++        //c->setGeometry(QRect(c->geometry().left(), geom.top(), geom.width(), geom.height()));
+         break;
+ 
+     case Plasma::RightEdge:
+@@ -731,6 +720,8 @@ void PanelView::updatePanelGeometry()
+             geom.moveTopRight(QPoint(screenGeom.right(), screenGeom.center().y() - geom.height()/2 + 1 - geom.height()%2 + m_offset));
+         }
+ 
++        //enable borders if needed
++        //c->setGeometry(QRect(c->geometry().left(), geom.top(), geom.width(), geom.height()));
+         break;
+ 
+     case Plasma::BottomEdge:
+@@ -743,6 +734,8 @@ void PanelView::updatePanelGeometry()
+             geom.moveBottomLeft(QPoint(screenGeom.center().x() - geom.width()/2 + 1 - geom.width()%2 + m_offset, screenGeom.bottom()));
+         }
+ 
++        //enable borders if needed
++        //c->setGeometry(QRect(geom.left(), c->geometry().top(), geom.width(), geom.height()));
+         break;
+     }
+ 
+@@ -818,7 +811,8 @@ void PanelView::pinchContainment(const QRect &screenGeom)
+     KConfigGroup sizes = config();
+     sizes = KConfigGroup(&sizes, "Sizes");
+ 
+-    if (m_lastHorizontal != horizontal || m_lastSeenSize != (horizontal ? sw : sh)) {
++    if (m_lastHorizontal != horizontal ||
++        m_lastSeenSize != (horizontal ? sw : sh)) {
+         // we're adjusting size. store the current size now
+         KConfigGroup lastSize(&sizes, (m_lastHorizontal ? "Horizontal" : "Vertical") +
+                                       QString::number(m_lastSeenSize));
+@@ -1032,23 +1026,17 @@ void PanelView::togglePanelController()
+         }
+     }
+ 
+-    if (m_panelController->isVisible()) {
+-        if (m_panelController->showingWidgetExplorer() ||
+-            m_panelController->showingActivityManager()) {
+-            m_panelController->switchToController();
+-            m_panelController->move(m_panelController->positionForPanelGeometry(geometry()));
+-        } else {
+-            Plasma::WindowEffects::slideWindow(m_panelController, location());
+-            m_panelController->close();
+-            updateStruts();
+-        }
+-    } else {
++    if (!m_panelController->isVisible()) {
+         m_editing = true;
+         m_panelController->resize(m_panelController->sizeHint());
+         m_panelController->move(m_panelController->positionForPanelGeometry(geometry()));
+         Plasma::WindowEffects::slideWindow(m_panelController, location());
+         kDebug() << "showing panel controller!" << m_panelController->geometry();
+         m_panelController->show();
++    } else {
++        Plasma::WindowEffects::slideWindow(m_panelController, location());
++        m_panelController->close();
++        updateStruts();
+     }
+ }
+ 
+@@ -1438,7 +1426,7 @@ void PanelView::unhide(bool destroyTrigger)
+     }
+ }
+ 
+-void PanelView::statusUpdated(Plasma::ItemStatus newStatus)
++void PanelView::setStatus(Plasma::ItemStatus newStatus)
+ {
+     if (newStatus == Plasma::AcceptingInputStatus) {
+         KWindowSystem::forceActiveWindow(winId());
+@@ -1447,50 +1435,14 @@ void PanelView::statusUpdated(Plasma::ItemStatus newStatus)
+ 
+ void PanelView::checkUnhide(Plasma::ItemStatus newStatus)
+ {
+-    //kDebug() << "================= got a status: " << newStatus << Plasma::ActiveStatus;
+-    m_respectStatus = true;
+-
++    //kDebug() << "================= got a new status: " << newStatus << Plasma::ActiveStatus;
+     if (newStatus > Plasma::ActiveStatus) {
+         unhide();
+-        if (newStatus == Plasma::NeedsAttentionStatus) {
+-            //kDebug() << "starting the timer!";
+-            // start our rehide timer, so that the panel doesn't stay up and stuck forever and a day
+-            m_rehideAfterAutounhideTimer->start(AUTOUNHIDE_CHECK_DELAY);
+-        }
+     } else {
+-        //kDebug() << "new status, just autohiding";
+         startAutoHide();
+     }
+ }
+ 
+-void PanelView::checkAutounhide()
+-{
+-    //kDebug() << "***************************" << KIdleTime::instance()->idleTime();
+-    if (KIdleTime::instance()->idleTime() >= AUTOUNHIDE_CHECK_DELAY) {
+-        // the user is idle .. let's not hige the panel on them quite yet, but rather given them a
+-        // chance to see this thing!
+-        connect(KIdleTime::instance(), SIGNAL(resumingFromIdle()), this, SLOT(checkAutounhide()),
+-                Qt::UniqueConnection);
+-        KIdleTime::instance()->catchNextResumeEvent();
+-        //kDebug() << "exit 1 ***************************";
+-        return;
+-    }
+-
+-    m_respectStatus = false;
+-    //kDebug() << "in to check ... who's resonsible?" << sender() << KIdleTime::instance();
+-    if (sender() == KIdleTime::instance()) {
+-        //kDebug() << "doing a 2s wait";
+-        QTimer::singleShot(2000, this, SLOT(startAutoHide()));
+-    } else {
+-        //kDebug() << "just starting autohide!";
+-        startAutoHide();
+-    }
+-
+-    // this line must come after the check on sender() as it *clears* that value!
+-    disconnect(KIdleTime::instance(), SIGNAL(resumingFromIdle()), this, SLOT(checkAutounhide()));
+-    //kDebug() << "exit 0 ***************************";
+-}
+-
+ void PanelView::unhide()
+ {
+     unhide(true);
+@@ -1503,31 +1455,10 @@ void PanelView::resetTriggerEnteredSuppression()
+ 
+ void PanelView::startAutoHide()
+ {
+-    /*
+-    kDebug() << m_editing << (containment() ? containment()->status() : 0) << Plasma::ActiveStatus
+-             << geometry().adjusted(-10, -10, 10, 10).contains(QCursor::pos()) << hasPopup();
+-    if (containment() && containment()->status() > Plasma::ActiveStatus) {
+-        foreach (Plasma::Applet *applet, containment()->applets()) {
+-            kDebug() << "     " << applet->name() << applet->status();
+-        }
+-    }
+-    */
+-
+-
+-    if (m_editing || (m_respectStatus && (containment() && containment()->status() > Plasma::ActiveStatus))) {
+-        if (m_mousePollTimer) {
+-            m_mousePollTimer->stop();
+-            disconnect(m_mousePollTimer, SIGNAL(timeout()), this, SLOT(startAutoHide()));
+-        }
+-
+-        return;
+-    }
+-
+-    // since we've gotten this far, we don't need to worry about rehiding-after-auto-unhide, so just
+-    // stop the timer
+-    m_rehideAfterAutounhideTimer->stop();
+-
+-    if (geometry().adjusted(-10, -10, 10, 10).contains(QCursor::pos()) || hasPopup()) {
++    //TODO: is 5s too long? not long enough?
++    if (m_editing || (containment() && containment()->status() > Plasma::ActiveStatus) ||
++        geometry().adjusted(-10, -10, 10, 10).contains(QCursor::pos()) ||
++        hasPopup()) {
+         if (!m_mousePollTimer) {
+             leaveEvent(0);
+         }
+diff --git a/plasma/desktop/shell/panelview.h b/plasma/desktop/shell/panelview.h
+index 9bdf780..c4be6b4 100644
+--- a/plasma/desktop/shell/panelview.h
++++ b/plasma/desktop/shell/panelview.h
+@@ -141,7 +141,7 @@ public Q_SLOTS:
+     /**
+      * Decides whether give focus to the panel
+      */
+-    void statusUpdated(Plasma::ItemStatus newStatus);
++    void setStatus(Plasma::ItemStatus newStatus);
+ 
+     /**
+      * Pinches the min/max sizes of the containment to the current screen resolution
+@@ -240,7 +240,6 @@ private Q_SLOTS:
+     void overlayMoved(PanelAppletOverlay *overlay);
+     void panelDeleted();
+     void startAutoHide();
+-    void checkAutounhide();
+ 
+     /**
+      * update the appearance of the unhide hinter
+@@ -270,7 +269,6 @@ private:
+     GlowBar *m_glowBar;
+     QTimer *m_mousePollTimer;
+     QTimer *m_strutsTimer;
+-    QTimer *m_rehideAfterAutounhideTimer;
+     QTimeLine *m_timeLine;
+     QGraphicsWidget *m_spacer;
+     int m_spacerIndex;
+@@ -292,10 +290,7 @@ private:
+ 
+     bool m_editing : 1;
+     bool m_triggerEntered : 1;
+-    bool m_respectStatus : 1;
+-
+     static const int STRUTSTIMERDELAY = 200;
+-    static const int AUTOUNHIDE_CHECK_DELAY = 3000;
+ };
+ 
+ #endif

diff --git a/kde-base/plasma-workspace/plasma-workspace-4.6.9999.ebuild b/kde-base/plasma-workspace/plasma-workspace-4.6.9999.ebuild
index 0bcf186..8086797 100644
--- a/kde-base/plasma-workspace/plasma-workspace-4.6.9999.ebuild
+++ b/kde-base/plasma-workspace/plasma-workspace-4.6.9999.ebuild
@@ -73,6 +73,7 @@ KMLOADLIBS="libkworkspace libplasmaclock libplasmagenericshell libtaskmanager"
 PATCHES=(
 	"${FILESDIR}/${PN}-4.4.2-xinerama_cmake_automagic.patch"
 	"${FILESDIR}/${PN}-4.6.2-optional_akonadi-server.patch"
+	"${FILESDIR}/${PN}-4.6.2-panelplacement.patch"
 )
 
 pkg_setup() {



             reply	other threads:[~2011-05-21 20:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-21 20:33 Andreas K. Huettel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-09-19 17:38 [gentoo-commits] proj/kde:master commit in: kde-base/plasma-workspace/files/, kde-base/plasma-workspace/ Johannes Huber
2014-05-30  6:10 Johannes Huber
2014-05-28 14:42 Johannes Huber
2014-05-25 15:49 Johannes Huber
2014-05-24 22:48 Johannes Huber
2014-04-24 22:45 Johannes Huber
2014-04-09 15:26 Johannes Huber
2013-03-28 21:19 Andreas Hüttel
2013-02-13 10:38 Michael Palimaka
2013-02-07 22:19 Andreas Hüttel
2012-04-23 11:45 Michael Palimaka
2011-05-28 22:09 Andreas Hüttel
2011-04-06 22:31 Theo Chatzimichos
2011-04-02 12:06 Andreas K. Huettel
2011-02-04 13:38 tampakrap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=355dfc135755c1a39ad0c9c0f2024f3caa96c439.dilfridge@gentoo \
    --to=dilfridge@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox