rpms/kdebase-workspace/devel kdebase-workspace-4.0.0-gtk_applets.patch, NONE, 1.1 kdebase-workspace.spec, 1.18, 1.19
Rex Dieter (rdieter)
fedora-extras-commits at redhat.com
Tue Jan 8 18:48:34 UTC 2008
- Previous message (by thread): rpms/mysql/devel mysql-stack.patch,1.5,1.6
- Next message (by thread): rpms/pam/devel pam-0.99.8.1-unix-hpux-aging.patch, NONE, 1.1 pam-0.99.8.1-unix-update-helper.patch, 1.2, 1.3 pam.spec, 1.164, 1.165 pam-0.99.7.1-unix-hpux-aging.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rdieter
Update of /cvs/pkgs/rpms/kdebase-workspace/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22609
Modified Files:
kdebase-workspace.spec
Added Files:
kdebase-workspace-4.0.0-gtk_applets.patch
Log Message:
- pull upstream patch to workaround gtk applet crasher (#427442)
kdebase-workspace-4.0.0-gtk_applets.patch:
--- NEW FILE kdebase-workspace-4.0.0-gtk_applets.patch ---
Index: plasma/applets/systemtray/qx11embed_x11.cpp
===================================================================
--- plasma/applets/systemtray/qx11embed_x11.cpp (revision 0)
+++ plasma/applets/systemtray/qx11embed_x11.cpp (revision 758247)
@@ -0,0 +1,1849 @@
+/*
+
+ This is original Qt QX11Embed* code, with some modifications (check history,
+ the first commit was the original unmodified code) to allow embedding window
+ with different visual/depths/whatever. QX11EmbedContainer should handle this
+ on its own, so this should be eventually done a bit more properly and
+ submitted to TT.
+
+*/
+
+/****************************************************************************
+**
+** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License version 2.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of
+** this file. Please review the following information to ensure GNU
+** General Public Licensing requirements will be met:
+** http://trolltech.com/products/qt/licenses/licensing/opensource/
+**
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
+** or contact the sales department at sales at trolltech.com.
+**
+** In addition, as a special exception, Trolltech gives you certain
+** additional rights. These rights are described in the Trolltech GPL
+** Exception version 1.0, which can be found at
+** http://www.trolltech.com/products/qt/gplexception/ and in the file
+** GPL_EXCEPTION.txt in this package.
+**
+** In addition, as a special exception, Trolltech, as the sole copyright
+** holder for Qt Designer, grants users of the Qt/Eclipse Integration
+** plug-in the right for the Qt/Eclipse Integration to link to
+** functionality provided by Qt Designer and its related libraries.
+**
+** Trolltech reserves all rights not expressly granted herein.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+
+#include "qx11embed_x11.h"
+#include <qapplication.h>
+#include <qevent.h>
+#include <qpainter.h>
+#include <qlayout.h>
+#include <qstyle.h>
+#include <qstyleoption.h>
+#include <qdatetime.h>
+#include <qpointer.h>
+#include <qdebug.h>
+#include <qx11info_x11.h>
+#include <private/qt_x11_p.h>
+#include <private/qwidget_p.h>
+
+#define XK_MISCELLANY
+#define XK_LATIN1
+#define None 0
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+#include <X11/keysymdef.h>
+#include <X11/X.h>
+
+#ifndef XK_ISO_Left_Tab
+#define XK_ISO_Left_Tab 0xFE20
+#endif
+
+//#define QX11EMBED_DEBUG
+#ifdef QX11EMBED_DEBUG
+#include <qdebug.h>
+#endif
+
+namespace PlasmaSystray
+{
+
+/*!
+ \class QX11EmbedWidget
+
+ \brief The QX11EmbedWidget class provides an XEmbed client widget.
+
+ XEmbed is an X11 protocol that supports the embedding of a widget
+ from one application into another application.
+
+ An XEmbed \e{client widget} is a window that is embedded into a
+ \e container. A container is the graphical location that embeds
+ (or \e swallows) an external application.
+
+ QX11EmbedWidget is a widget used for writing XEmbed applets or
+ plugins. When it has been embedded and the container receives tab
+ focus, focus is passed on to the widget. When the widget reaches
+ the end of its focus chain, focus is passed back to the
+ container. Window activation, accelerator support, modality and
+ drag and drop (XDND) are also handled.
+
+ The widget and container can both initiate the embedding. If the
+ widget is the initiator, the X11 window ID of the container that
+ it wants to embed itself into must be passed to embedInto().
+
+ If the container initiates the embedding, the window ID of the
+ embedded widget must be known. The container calls embed(),
+ passing the window ID.
+
+ This example shows an application that embeds a QX11EmbedWidget
+ subclass into the window whose ID is passed as a command-line
+ argument:
+
+ \quotefromfile snippets/qx11embedwidget/main.cpp
+ \skipto main
+ \printuntil /^\}/
+
+ The problem of obtaining the window IDs is often solved by the
+ container invoking the application that provides the widget as a
+ separate process (as a panel invokes a docked applet), passing
+ its window ID to the new process as a command-line argument. The
+ new process can then call embedInto() with the container's window
+ ID, as shown in the example code above. Similarly, the new
+ process can report its window ID to the container through IPC, in
+ which case the container can embed the widget.
+
+ When the widget has been embedded, it emits the signal
+ embedded(). If it is closed by the container, the widget emits
+ containerClosed(). If an error occurs when embedding, error() is
+ emitted.
+
+ There are XEmbed widgets available for KDE and GTK+. The GTK+
+ equivalent of QX11EmbedWidget is GtkPlug. The KDE widget is called
+ QXEmbed.
+
+ \sa QX11EmbedContainer, {XEmbed Specification}
+*/
+
+/*!
+ \class QX11EmbedContainer
+
+ \brief The QX11EmbedContainer class provides an XEmbed container
+ widget.
+
+ XEmbed is an X11 protocol that supports the embedding of a widget
+ from one application into another application.
+
+ An XEmbed \e container is the graphical location that embeds an
+ external \e {client widget}. A client widget is a window that is
+ embedded into a container.
+
+ When a widget has been embedded and the container receives tab
+ focus, focus is passed on to the widget. When the widget reaches
+ the end of its focus chain, focus is passed back to the
+ container. Window activation, accelerator support, modality and
+ drag and drop (XDND) are also handled.
+
+ QX11EmbedContainer is commonly used for writing panels or
+ toolbars that hold applets, or for \e swallowing X11
+ applications. When writing a panel application, one container
+ widget is created on the toolbar, and it can then either swallow
+ another widget using embed(), or allow an XEmbed widget to be
+ embedded into itself. The container's X11 window ID, which is
+ retrieved with winId(), must then be known to the client widget.
+ After embedding, the client's window ID can be retrieved with
+ clientWinId().
+
+ In the following example, a container widget is created as the
+ main widget. It then invokes an application called "playmovie",
+ passing its window ID as a command line argument. The "playmovie"
+ program is an XEmbed client widget. The widget embeds itself into
+ the container using the container's window ID.
+
+ \quotefromfile snippets/qx11embedcontainer/main.cpp
+ \skipto main
+ \printuntil /^\}/
+
+ When the client widget is embedded, the container emits the
+ signal clientIsEmbedded(). The signal clientClosed() is emitted
+ when a widget is closed.
+
+ It is possible for QX11EmbedContainer to embed XEmbed widgets
+ from toolkits other than Qt, such as GTK+. Arbitrary (non-XEmbed)
+ X11 widgets can also be embedded, but the XEmbed-specific
+ features such as window activation and focus handling are then
+ lost.
+
+ The GTK+ equivalent of QX11EmbedContainer is GtkSocket. The KDE
+ widget is called QXEmbed.
+
+ \sa QX11EmbedWidget, {XEmbed Specification}
+*/
+
+/*! \fn void QX11EmbedWidget::embedded()
+
[...1649 lines suppressed...]
+ d->rejectClient(d->client);
+ }
+}
+
+} // namespace
+
Index: plasma/applets/systemtray/qx11embed_x11.h
===================================================================
--- plasma/applets/systemtray/qx11embed_x11.h (revision 0)
+++ plasma/applets/systemtray/qx11embed_x11.h (revision 758247)
@@ -0,0 +1,134 @@
+/*
+
+ This is original Qt QX11Embed* code, with some modifications (check history,
+ the first commit was the original unmodified code) to allow embedding window
+ with different visual/depths/whatever. QX11EmbedContainer should handle this
+ on its own, so this should be eventually done a bit more properly and
+ submitted to TT.
+
+*/
+
+/****************************************************************************
+**
+** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** This file may be used under the terms of the GNU General Public
+** License version 2.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of
+** this file. Please review the following information to ensure GNU
+** General Public Licensing requirements will be met:
+** http://trolltech.com/products/qt/licenses/licensing/opensource/
+**
+** If you are unsure which license is appropriate for your use, please
+** review the following information:
+** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
+** or contact the sales department at sales at trolltech.com.
+**
+** In addition, as a special exception, Trolltech gives you certain
+** additional rights. These rights are described in the Trolltech GPL
+** Exception version 1.0, which can be found at
+** http://www.trolltech.com/products/qt/gplexception/ and in the file
+** GPL_EXCEPTION.txt in this package.
+**
+** In addition, as a special exception, Trolltech, as the sole copyright
+** holder for Qt Designer, grants users of the Qt/Eclipse Integration
+** plug-in the right for the Qt/Eclipse Integration to link to
+** functionality provided by Qt Designer and its related libraries.
+**
+** Trolltech reserves all rights not expressly granted herein.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+
+#ifndef QX11EMBED_X11_H
+#define QX11EMBED_X11_H
+
+#include <QtGui/qwidget.h>
+
+namespace PlasmaSystray
+{
+
+class QX11EmbedWidgetPrivate;
+class Q_GUI_EXPORT QX11EmbedWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ QX11EmbedWidget(QWidget *parent = 0);
+ ~QX11EmbedWidget();
+
+ void embedInto(WId id);
+ WId containerWinId() const;
+
+ enum Error {
+ Unknown,
+ Internal,
+ InvalidWindowID
+ };
+ Error error() const;
+
+Q_SIGNALS:
+ void embedded();
+ void containerClosed();
+ void error(QX11EmbedWidget::Error error);
+
+protected:
+ bool x11Event(XEvent *);
+ bool eventFilter(QObject *, QEvent *);
+ bool event(QEvent *);
+ void resizeEvent(QResizeEvent *);
+
+private:
+ Q_DECLARE_PRIVATE(QX11EmbedWidget)
+ Q_DISABLE_COPY(QX11EmbedWidget)
+};
+
+class QX11EmbedContainerPrivate;
+class Q_GUI_EXPORT QX11EmbedContainer : public QWidget
+{
+ Q_OBJECT
+public:
+ QX11EmbedContainer(WId prepareid, QWidget *parent = 0);
+ ~QX11EmbedContainer();
+
+ void embedClient(WId id);
+ void discardClient();
+
+ WId clientWinId() const;
+
+ QSize minimumSizeHint() const;
+
+ enum Error {
+ Unknown,
+ Internal,
+ InvalidWindowID
+ };
+ Error error() const;
+
+Q_SIGNALS:
+ void clientIsEmbedded();
+ void clientClosed();
+ void error(QX11EmbedContainer::Error);
+
+protected:
+ bool x11Event(XEvent *);
+ bool eventFilter(QObject *, QEvent *);
+ void paintEvent(QPaintEvent *e);
+ void resizeEvent(QResizeEvent *);
+ void showEvent(QShowEvent *);
+ void hideEvent(QHideEvent *);
+ bool event(QEvent *);
+
+private:
+ Q_DECLARE_PRIVATE(QX11EmbedContainer)
+ Q_DISABLE_COPY(QX11EmbedContainer)
+};
+
+} // namespace
+
+typedef PlasmaSystray::QX11EmbedContainer KX11EmbedContainer;
+
+#endif // QX11EMBED_X11_H
Index: plasma/applets/systemtray/systemtraycontainer.cpp
===================================================================
--- plasma/applets/systemtray/systemtraycontainer.cpp (revision 758245)
+++ plasma/applets/systemtray/systemtraycontainer.cpp (revision 758247)
@@ -32,7 +32,7 @@
#include <X11/Xlib.h>
SystemTrayContainer::SystemTrayContainer(WId clientId, QWidget *parent)
- : QX11EmbedContainer(parent)
+ : KX11EmbedContainer(clientId, parent)
{
connect(this, SIGNAL(clientClosed()), SLOT(deleteLater()));
connect(this, SIGNAL(error(QX11EmbedContainer::Error)), SLOT(handleError(QX11EmbedContainer::Error)));
@@ -40,11 +40,6 @@
// Tray icons have a fixed size of 22x22
setMinimumSize(22, 22);
- // HACK: Tell the client to draw it's own black background rather than
- // taking ours as things are broken with ARGB visuals it seems.
- XSetWindowBackgroundPixmap(QX11Info::display(), clientId, None);
- XSetWindowBackground(QX11Info::display(), clientId, 0 /* black */);
-
kDebug() << "attempting to embed" << clientId;
embedClient(clientId);
Index: plasma/applets/systemtray/CMakeLists.txt
===================================================================
--- plasma/applets/systemtray/CMakeLists.txt (revision 758245)
+++ plasma/applets/systemtray/CMakeLists.txt (revision 758247)
@@ -3,7 +3,8 @@
set(systemtray_SRCS
systemtray.cpp
systemtraycontainer.cpp
- systemtraywidget.cpp)
+ systemtraywidget.cpp
+ qx11embed_x11.cpp)
kde4_add_plugin(plasma_applet_systemtray ${systemtray_SRCS})
target_link_libraries(plasma_applet_systemtray ${KDE4_KDEUI_LIBS} plasma)
Index: plasma/applets/systemtray/systemtraycontainer.h
===================================================================
--- plasma/applets/systemtray/systemtraycontainer.h (revision 758245)
+++ plasma/applets/systemtray/systemtraycontainer.h (revision 758247)
@@ -23,9 +23,9 @@
#define SYSTEMTRAYCONTAINER_H
// Qt
-#include <QX11EmbedContainer>
+#include "qx11embed_x11.h"
-class SystemTrayContainer: public QX11EmbedContainer
+class SystemTrayContainer: public KX11EmbedContainer
{
Q_OBJECT
Index: kdebase-workspace.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase-workspace/devel/kdebase-workspace.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- kdebase-workspace.spec 8 Jan 2008 14:09:10 -0000 1.18
+++ kdebase-workspace.spec 8 Jan 2008 18:47:55 -0000 1.19
@@ -15,6 +15,9 @@
Patch1: kdebase-workspace-4.0.0-redhat-startkde.patch
Patch2: kdebase-workspace-4.0.0-consolekit-kdm.patch
+# svn diff -r 758245:758247
+# http://bugzilla.redhat.com/427442
+Patch3: kdebase-workspace-4.0.0-gtk_applets.patch
# upgrade path for former kde-redhat'ers
Obsoletes: kdebase-kdm < 6:%{version}-%{release}
@@ -97,6 +100,8 @@
%patch1 -p1 -b .redhat-startkde
# ConsoleKit support for KDM (#228111, kde#147790)
%patch2 -p1 -b .consolekit
+#
+%patch3 -p0 -b .gtk_applets
%build
@@ -209,6 +214,7 @@
%changelog
* Tue Jan 08 2008 Rex Dieter <rdieter[AT]fedoraproject.org> 4.0.0-2
- omit plasma-pager patch
+- pull upstream patch to workaround gtk applet crasher (#427442)
* Mon Jan 07 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.0.0-1
- update to 4.0.0
- Previous message (by thread): rpms/mysql/devel mysql-stack.patch,1.5,1.6
- Next message (by thread): rpms/pam/devel pam-0.99.8.1-unix-hpux-aging.patch, NONE, 1.1 pam-0.99.8.1-unix-update-helper.patch, 1.2, 1.3 pam.spec, 1.164, 1.165 pam-0.99.7.1-unix-hpux-aging.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list