rpms/kdebase/devel kdebase-3.5.7-bz#244906.patch, NONE, 1.1 kdebase-3.5.7-kde#83974.patch, NONE, 1.1 kdebase.spec, 1.257, 1.258
Rex Dieter (rdieter)
fedora-extras-commits at redhat.com
Fri Jul 13 17:43:21 UTC 2007
Author: rdieter
Update of /cvs/pkgs/rpms/kdebase/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14914
Modified Files:
kdebase.spec
Added Files:
kdebase-3.5.7-bz#244906.patch kdebase-3.5.7-kde#83974.patch
Log Message:
* Mon Jul 02 2007 Than Ngo <than at redhat.com> - 6:3.5.7-6
- fix bz#244906
kdebase-3.5.7-bz#244906.patch:
--- NEW FILE kdebase-3.5.7-bz#244906.patch ---
--- kdebase-3.5.7/konsole/konsole/main.cpp.orig 2007-07-02 14:54:45.000000000 +0200
+++ kdebase-3.5.7/konsole/konsole/main.cpp 2007-07-02 14:55:44.000000000 +0200
@@ -48,11 +48,11 @@
// COMPOSITE disabled by default because the QApplication constructor
// needed to enable the ARGB32 visual has undesired side effects.
-//#if 0
+#if 0
#if defined(Q_WS_X11) && defined(HAVE_XRENDER) && QT_VERSION >= 0x030300
#define COMPOSITE
#endif
-//#endif
+#endif
#ifdef COMPOSITE
# include <X11/Xlib.h>
kdebase-3.5.7-kde#83974.patch:
--- NEW FILE kdebase-3.5.7-kde#83974.patch ---
--- branches/KDE/3.5/kdebase/konsole/konsole/main.cpp 2007/05/29 14:31:54 669487
+++ branches/KDE/3.5/kdebase/konsole/konsole/main.cpp 2007/05/29 14:32:54 669488
@@ -46,18 +46,15 @@
#include "konsole.h"
-// COMPOSITE disabled by default because the QApplication constructor
-// needed to enable the ARGB32 visual has undesired side effects.
-//#if 0
#if defined(Q_WS_X11) && defined(HAVE_XRENDER) && QT_VERSION >= 0x030300
#define COMPOSITE
#endif
-//#endif
#ifdef COMPOSITE
# include <X11/Xlib.h>
# include <X11/extensions/Xrender.h>
# include <fixx11h.h>
+# include <dlfcn.h>
#endif
static const char description[] =
@@ -255,47 +252,62 @@
if( qtargs->isSet("font") )
kdWarning() << "The Qt option -fn, --font has no effect." << endl;
+ KApplication* a = NULL;
#ifdef COMPOSITE
- char *display = 0;
- if ( qtargs->isSet("display"))
- display = qtargs->getOption( "display" ).data();
-
- Display *dpy = XOpenDisplay( display );
- if ( !dpy ) {
- kdError() << "cannot connect to X server " << display << endl;
- exit( 1 );
- }
-
- int screen = DefaultScreen( dpy );
- Colormap colormap = 0;
- Visual *visual = 0;
- int event_base, error_base;
-
- if ( args->isSet("real-transparency") && XRenderQueryExtension( dpy, &event_base, &error_base ) )
- {
- int nvi;
- XVisualInfo templ;
- templ.screen = screen;
- templ.depth = 32;
- templ.c_class = TrueColor;
- XVisualInfo *xvi = XGetVisualInfo( dpy, VisualScreenMask | VisualDepthMask
- | VisualClassMask, &templ, &nvi );
-
- for ( int i = 0; i < nvi; i++ ) {
- XRenderPictFormat *format = XRenderFindVisualFormat( dpy, xvi[i].visual );
- if ( format->type == PictTypeDirect && format->direct.alphaMask ) {
- visual = xvi[i].visual;
- colormap = XCreateColormap( dpy, RootWindow( dpy, screen ), visual, AllocNone );
- kdDebug() << "found visual with alpha support" << endl;
- argb_visual = true;
- break;
+ if ( args->isSet("real-transparency")) {
+ char *display = 0;
+ if ( qtargs->isSet("display"))
+ display = qtargs->getOption( "display" ).data();
+
+ Display *dpy = XOpenDisplay( display );
+ if ( !dpy ) {
+ kdError() << "cannot connect to X server " << display << endl;
+ exit( 1 );
+ }
+
+ int screen = DefaultScreen( dpy );
+ Colormap colormap = 0;
+ Visual *visual = 0;
+ int event_base, error_base;
+
+ if ( XRenderQueryExtension( dpy, &event_base, &error_base ) ) {
+ int nvi;
+ XVisualInfo templ;
+ templ.screen = screen;
+ templ.depth = 32;
+ templ.c_class = TrueColor;
+ XVisualInfo *xvi = XGetVisualInfo( dpy, VisualScreenMask | VisualDepthMask
+ | VisualClassMask, &templ, &nvi );
+
+ for ( int i = 0; i < nvi; i++ ) {
+ XRenderPictFormat *format = XRenderFindVisualFormat( dpy, xvi[i].visual );
+ if ( format->type == PictTypeDirect && format->direct.alphaMask ) {
+ visual = xvi[i].visual;
+ colormap = XCreateColormap( dpy, RootWindow( dpy, screen ), visual, AllocNone );
+ kdDebug() << "found visual with alpha support" << endl;
+ argb_visual = true;
+ break;
+ }
}
}
- }
+ // The QApplication ctor used is normally intended for applications not using Qt
+ // as the primary toolkit (e.g. Motif apps also using Qt), with some slightly
+ // unpleasant side effects (e.g. #83974). This code checks if qt-copy patch #0078
+ // is applied, which allows turning this off.
+ bool* qt_no_foreign_hack = static_cast< bool* >( dlsym( RTLD_DEFAULT, "qt_no_foreign_hack" ));
+ if( qt_no_foreign_hack )
+ *qt_no_foreign_hack = true;
+ // else argb_visual = false ... ? *shrug*
- KApplication a( dpy, Qt::HANDLE( visual ), Qt::HANDLE( colormap ) );
+ if( argb_visual )
+ a = new KApplication( dpy, Qt::HANDLE( visual ), Qt::HANDLE( colormap ) );
+ else
+ XCloseDisplay( dpy );
+ }
+ if( a == NULL )
+ a = new KApplication;
#else
- KApplication a;
+ KApplication* a = new KApplication;
#endif
QString dataPathBase = KStandardDirs::kde_default("data").append("konsole/");
@@ -351,7 +363,7 @@
fixed_size = !args->isSet("resize");
if (!full_script)
- a.dcopClient()->setQtBridgeEnabled(false);
+ a->dcopClient()->setQtBridgeEnabled(false);
QCString type = "";
@@ -467,13 +479,13 @@
putenv((char*)"COLORTERM="); // to trigger mc's color detection
KonsoleSessionManaged ksm;
- if (a.isRestored() || !profile.isEmpty())
+ if (a->isRestored() || !profile.isEmpty())
{
if (!shell)
shell = konsole_shell(eargs);
if (profile.isEmpty())
- sessionconfig = a.sessionConfig();
+ sessionconfig = a->sessionConfig();
sessionconfig->setDesktopGroup();
int n = 1;
@@ -629,7 +641,7 @@
m->setAutoClose(auto_close);
}
- int ret = a.exec();
+ int ret = a->exec();
//// Temporary code, waiting for Qt to do this properly
@@ -654,6 +666,8 @@
delete w;
}
delete list;
+
+ delete a;
return ret;
}
Index: kdebase.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase/devel/kdebase.spec,v
retrieving revision 1.257
retrieving revision 1.258
diff -u -r1.257 -r1.258
--- kdebase.spec 21 Jun 2007 12:04:50 -0000 1.257
+++ kdebase.spec 13 Jul 2007 17:42:49 -0000 1.258
@@ -18,7 +18,7 @@
Name: kdebase
Epoch: 6
Version: 3.5.7
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPL
Url: http://www.kde.org
@@ -66,6 +66,9 @@
Patch26: kdebase-3.5.5-suspend.patch
Patch27: kdebase-3.5.6-consolekit-kdm.patch
Patch28: kdebase-3.5.6-kdm-alternatebackground.patch
+Patch29: kdebase-3.5.7-bz#244906.patch
+# Upstream alternative to patch29, requires qt-copy 0078-argb-visual-hack.patch
+Patch83974: kdebase-3.5.7-kde#83974.patch
Provides: kdebase3 = %{version}-%{release}
@@ -219,6 +222,9 @@
%{?_with_suspend:%patch26 -p1 -b .suspend}
%{?_with_hal:%patch27 -p1 -b .consolekit}
%patch28 -p1 -b .kdm-alternatebackground
+%patch29 -p1 -b .konsole-bz#244906
+## alternative to patch29, requires qt-copy 0078-argb-visual-hack.patch
+#patch83974 -p4 -b .kde#83974
%if %redhatify
cp %{SOURCE1} konsole
@@ -631,6 +637,9 @@
%changelog
+* Mon Jul 02 2007 Than Ngo <than at redhat.com> - 6:3.5.7-6
+- fix bz#244906
+
* Wed Jun 20 2007 Rex Dieter <rdieter[AT]fedoraproject.org> - 6:3.5.7-5
- Provides: kdebase3(-devel)
More information about the fedora-extras-commits
mailing list