--Boundary-00=_uaD5AmUmytfXMQ+ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wednesday 30 of June 2004 17:58, Lubos Lunak wrote: > Hello, > > KDE3.2 got quite good reputation for being faster than KDE3.1. And since > (AFAIK) there haven't been any noticeable optimizations for KDE3.3, I'd > like to get in 3.3 at least the attached kdeinit hack. Done by Michael > Matz, tested by Coolo, fixed by me :). > Silence is agreement, so I'll commit :). It can be simply turned off if there will be any problem with it (I hope I got the configure checks right). -- Lubos Lunak KDE developer --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org Drahobejlova 27 tel: +420 2 9654 2373 190 00 Praha 9 fax: +420 2 9654 2374 Czech Republic http://www.suse.cz/ --Boundary-00=_uaD5AmUmytfXMQ+ Content-Type: text/x-diff; charset="utf-8"; name="kinit.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kinit.patch" --- kinit/configure.in.in.sav 2004-07-01 16:41:12.000000000 +0200 +++ kinit/configure.in.in 2004-07-01 18:01:26.219247536 +0200 @@ -0,0 +1,21 @@ +KDEINIT_USE_XFT=1 +dnl check if Qt is linked against Xft +KDE_CHECK_LIB(qt-mt,XftInit,[],[KDEINIT_USE_XFT=]) + +dnl Xft requires freetype to compile +KDE_FIND_PATH(freetype-config, KDEINIT_FREETYPE_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin]) +if test -n "$KDEINIT_FREETYPE_CONFIG"; then + KDEINIT_XFT_INCLUDES=`$KDEINIT_FREETYPE_CONFIG --cflags` + kdeinit_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $KDEINIT_XFT_INCLUDES" + KDE_CHECK_HEADER(X11/Xft/Xft.h,[],[KDEINIT_USE_XFT=]) + CPPFLAGS=$kdeinit_cppflags + KDE_CHECK_HEADER(fontconfig/fontconfig.h,[],[KDEINIT_USE_XFT=]) +else + KDEINIT_USE_XFT= +fi + +if test -n "$KDEINIT_USE_XFT"; then + AC_DEFINE(KDEINIT_USE_XFT,1,[Use Xft preinitialization in kdeinit]) + AC_SUBST(KDEINIT_XFT_INCLUDES) +fi --- kinit/Makefile.am.sav 2003-07-01 10:05:02.000000000 +0200 +++ kinit/Makefile.am 2004-07-01 18:01:09.885730608 +0200 @@ -15,7 +15,7 @@ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -INCLUDES = -I$(srcdir)/../libltdl/ $(all_includes) +INCLUDES = -I$(srcdir)/../libltdl/ $(all_includes) $(KDEINIT_XFT_INCLUDES) SUBDIRS = . tests --- kinit/kinit.cpp.sav 2004-05-28 17:34:36.000000000 +0200 +++ kinit/kinit.cpp 2004-07-01 18:02:20.781952744 +0200 @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -49,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -87,6 +89,12 @@ # endif #endif +#ifdef KDEINIT_USE_XFT +#include +extern "C" FcBool XftInitFtLibrary (void); +#include +#endif + extern char **environ; extern int lt_dlopen_flag; @@ -1316,6 +1324,10 @@ static void handle_requests(pid_t waitFo int sock = accept(d.wrapper, (struct sockaddr *)&client, &sClient); if (sock >= 0) { +#ifdef KDEINIT_USE_XFT + if( !FcConfigUptoDate(NULL)) + FcInitReinitialize(); +#endif if (fork() == 0) { close_fds(); @@ -1332,6 +1344,10 @@ static void handle_requests(pid_t waitFo int sock = accept(d.wrapper_old, (struct sockaddr *)&client, &sClient); if (sock >= 0) { +#ifdef KDEINIT_USE_XFT + if( !FcConfigUptoDate(NULL)) + FcInitReinitialize(); +#endif if (fork() == 0) { close_fds(); @@ -1742,6 +1758,22 @@ int main(int argc, char **argv, char **e X11fd = initXconnection(); #endif + { +#ifdef KDEINIT_USE_XFT + XftInit(0); + XftInitFtLibrary(); +#endif + QFont::initialize(); + setlocale (LC_ALL, ""); + setlocale (LC_NUMERIC, "C"); + if (XSupportsLocale ()) + { + // Similar to QApplication::create_xim() + // but we need to use our own display + XOpenIM (X11display, 0, 0, 0); + } + } + for(i = 1; i < argc; i++) { if (safe_argv[i][0] == '+') --Boundary-00=_uaD5AmUmytfXMQ+ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kde-optimize mailing list Kde-optimize@kde.org https://mail.kde.org/mailman/listinfo/kde-optimize --Boundary-00=_uaD5AmUmytfXMQ+--