Sync from F11:

* Tue Apr 21 2009 Than Ngo <than@redhat.com> - 4.2.2-9
- don't let plasma appear over screensaver
This commit is contained in:
Kevin Kofler 2009-04-21 15:13:00 +00:00
parent a32a6d25a2
commit afe4cbe2c9
2 changed files with 73 additions and 9 deletions

View File

@ -1,12 +1,73 @@
diff -up kdelibs-4.2.2/plasma/popupapplet.cpp.orig kdelibs-4.2.2/plasma/popupapplet.cpp
--- kdelibs-4.2.2/plasma/popupapplet.cpp.orig 2009-03-30 23:41:08.000000000 +0200
+++ kdelibs-4.2.2/plasma/popupapplet.cpp 2009-04-07 17:36:51.000000000 +0200
@@ -276,7 +276,7 @@ void PopupAppletPrivate::popupConstraint
+++ kdelibs-4.2.2/plasma/popupapplet.cpp 2009-04-21 12:52:16.000000000 +0200
@@ -275,14 +275,8 @@ void PopupAppletPrivate::popupConstraint
//stuff out of your Dialog (extenders). Monitor WindowDeactivate events so we can
//emulate the same kind of behavior as Qt::Popup (close when you click somewhere
//else.
//Use Qt::Tool otherwise dialogs get shown over screensaver (bug #179924).
- //Use Qt::Tool otherwise dialogs get shown over screensaver (bug #179924).
- Qt::WindowFlags wflags = Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint;
+ Qt::WindowFlags wflags = Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint;
-
- if (passive) {
- wflags |= Qt::X11BypassWindowManagerHint;
- }
-
- dialog->setWindowFlags(wflags);
+ dialog->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
+ updateDialogFlags();
KWindowSystem::setState(dialog->winId(), NET::SkipTaskbar | NET::SkipPager);
dialog->installEventFilter(q);
@@ -340,7 +334,7 @@ void PopupApplet::mouseReleaseEvent(QGra
bool PopupApplet::eventFilter(QObject *watched, QEvent *event)
{
- if (watched == d->dialog && (event->type() == QEvent::WindowDeactivate)) {
+ if (!d->passive && watched == d->dialog && (event->type() == QEvent::WindowDeactivate)) {
d->popupLostFocus = true;
hidePopup();
QTimer::singleShot(100, this, SLOT(clearPopupLostFocus()));
@@ -411,15 +405,7 @@ void PopupApplet::setPassivePopup(bool p
d->passive = passive;
if (d->dialog) {
- Qt::WindowFlags wflags = d->dialog->windowFlags();
-
- if (d->passive) {
- wflags |= Qt::X11BypassWindowManagerHint;
- } else {
- wflags &= ~Qt::X11BypassWindowManagerHint;
- }
-
- d->dialog->setWindowFlags(wflags);
+ d->updateDialogFlags();
}
}
@@ -628,6 +614,15 @@ void PopupAppletPrivate::updateDialogPos
dialog->move(pos);
}
+
+
+void PopupAppletPrivate::updateDialogFlags()
+{
+ Q_ASSERT(dialog);
+ dialog->setAttribute(Qt::WA_X11NetWmWindowTypeNotification, passive);
+}
+
+
} // Plasma namespace
#include "popupapplet.moc"
diff -up kdelibs-4.2.2/plasma/private/popupapplet_p.h.orig kdelibs-4.2.2/plasma/private/popupapplet_p.h
--- kdelibs-4.2.2/plasma/private/popupapplet_p.h.orig 2009-04-21 12:59:29.000000000 +0200
+++ kdelibs-4.2.2/plasma/private/popupapplet_p.h 2009-04-21 12:52:16.000000000 +0200
@@ -35,6 +35,7 @@ public:
void dialogSizeChanged();
void dialogStatusChanged(bool status);
void updateDialogPosition();
+ void updateDialogFlags();
void popupConstraintsEvent(Plasma::Constraints constraints);
void checkExtenderAppearance(Plasma::FormFactor f);
if (passive) {
wflags |= Qt::X11BypassWindowManagerHint;

View File

@ -1,6 +1,6 @@
Summary: K Desktop Environment 4 - Libraries
Version: 4.2.2
Release: 8%{?dist}
Release: 9%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
@ -83,7 +83,6 @@ Patch23: kdelibs-4.2.0-gcc44-workaround.patch
# disable strict aliasing in kjs/dtoa.cpp (GCC 4.4 x86_64 crash) (#485968)
Patch24: kdelibs-4.2.0-kjs-gcc44-crash.patch
Patch25: kdelibs-4.2.0-gcc44-misc.patch
Patch26: kdelibs-4.2.2-plasma-focus.patch
# kconf_update script for Patch201 - to be upstreamed
Patch27: kdelibs-4.2.2-popupapplet-kconf_update.patch
@ -94,6 +93,7 @@ Patch101: kdelibs-4.2.2-kjob.patch
Patch102: kdelibs-4.2.2-bidi-kde#189161.patch
Patch103: kdelibs-4.2.2-kde#180785.patch
Patch104: kdelibs-4.2.2-kde#180785-2.patch
Patch105: kdelibs-4.2.2-plasma-focus.patch
# 4.3 branch
Patch200: kdelibs-4.1.96-AllowExternalPaths.patch
@ -232,7 +232,6 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
%patch23 -p1 -b .gcc44
%patch24 -p1 -b .kjs-gcc44-crash
%patch25 -p1 -b .gcc44-misc
%patch26 -p1 -b .kickoff-focus
%patch27 -p1 -b .popupapplet-kconf_update
# upstream patches
@ -242,6 +241,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
%patch102 -p4 -b .bidi-kde#189161
%patch103 -p4 -b .kde#180785
%patch104 -p4 -b .kde#180785-2
%patch105 -p1 -b .kickoff-focus
# 4.3
%patch200 -p1 -b .AllowExternalPaths
@ -428,6 +428,9 @@ rm -rf %{buildroot}
%changelog
* Tue Apr 21 2009 Than Ngo <than@redhat.com> - 4.2.2-9
- don't let plasma appear over screensaver
* Mon Apr 20 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.2.2-8
- fix Plasma PopupApplet configuration interfering with weather applet (#495998)