Bugzilla – Attachment 64723 Details for
Bug 143697
Splash screen of KDE looks odd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
kdebase patch
kde_startup_busy_cursor.patch (text/plain), 4.19 KB, created by
Lubos Lunak
on 2006-01-24 13:04:53 UTC
(
hide
)
Description:
kdebase patch
Filename:
MIME Type:
Creator:
Lubos Lunak
Created:
2006-01-24 13:04:53 UTC
Size:
4.19 KB
patch
obsolete
>--- kdesktop/startupid.cpp.sav 2005-09-29 21:34:14.000000000 +0200 >+++ kdesktop/startupid.cpp 2006-01-23 22:31:09.000000000 +0100 >@@ -22,19 +22,34 @@ > > #include <kiconloader.h> > #include <qcursor.h> >-#include <qapplication.h> >+#include <kapplication.h> > #include <qimage.h> > #include <qbitmap.h> > #include <kconfig.h> > #include <X11/Xlib.h> > >-StartupId::StartupId( QObject* parent, const char* name ) >- : QObject( parent, name ), >+#define KDE_STARTUP_ICON "kmenu" >+ >+enum kde_startup_status_enum { StartupPre, StartupIn, StartupDone }; >+static kde_startup_status_enum kde_startup_status = StartupPre; >+static Atom kde_splash_progress; >+ >+StartupId::StartupId( QWidget* parent, const char* name ) >+ : QWidget( parent, name ), > startup_info( KStartupInfo::CleanOnCantDetect ), > startup_widget( NULL ), > blinking( true ), > bouncing( false ) > { >+ hide(); // is QWidget only because of x11Event() >+ if( kde_startup_status == StartupPre ) >+ { >+ kde_splash_progress = XInternAtom( qt_xdisplay(), "_KDE_SPLASH_PROGRESS", False ); >+ XWindowAttributes attrs; >+ XGetWindowAttributes( qt_xdisplay(), qt_xrootwin(), &attrs); >+ XSelectInput( qt_xdisplay(), qt_xrootwin(), attrs.your_event_mask | SubstructureNotifyMask); >+ kapp->installX11EventFilter( this ); >+ } > connect( &update_timer, SIGNAL( timeout()), SLOT( update_startupid())); > connect( &startup_info, > SIGNAL( gotNewStartup( const KStartupInfoId&, const KStartupInfoData& )), >@@ -85,14 +100,45 @@ void StartupId::gotRemoveStartup( const > startups.remove( id_P ); > if( startups.count() == 0 ) > { >- stop_startupid(); > current_startup = KStartupInfoId(); // null >+ if( kde_startup_status == StartupIn ) >+ start_startupid( KDE_STARTUP_ICON ); >+ else >+ stop_startupid(); > return; > } > current_startup = startups.begin().key(); > start_startupid( startups[ current_startup ] ); > } > >+bool StartupId::x11Event( XEvent* e ) >+ { >+ if( e->type == ClientMessage && e->xclient.window == qt_xrootwin() >+ && e->xclient.message_type == kde_splash_progress ) >+ { >+ const char* s = e->xclient.data.b; >+ if( strcmp( s, "kicker" ) == 0 && kde_startup_status == StartupPre ) >+ { >+ kde_startup_status = StartupIn; >+ if( startups.count() == 0 ) >+ start_startupid( KDE_STARTUP_ICON ); >+ // 60(?) sec timeout - shouldn't be hopefully needed anyway, ksmserver should have it too >+ QTimer::singleShot( 60000, this, SLOT( finishKDEStartup())); >+ } >+ else if( strcmp( s, "session ready" ) == 0 && kde_startup_status < StartupDone ) >+ QTimer::singleShot( 2000, this, SLOT( finishKDEStartup())); >+ } >+ return false; >+ } >+ >+void StartupId::finishKDEStartup() >+ { >+ kde_startup_status = StartupDone; >+ kapp->removeX11EventFilter( this ); >+ if( startups.count() == 0 ) >+ stop_startupid(); >+ } >+ > void StartupId::stop_startupid() > { > delete startup_widget; >--- kdesktop/startupid.h.sav 2005-09-29 21:34:14.000000000 +0200 >+++ kdesktop/startupid.h 2006-01-23 21:58:50.000000000 +0100 >@@ -22,7 +22,7 @@ > > #include <sys/types.h> > >-#include <qobject.h> >+#include <qwidget.h> > #include <qpixmap.h> > #include <qstring.h> > #include <qtimer.h> >@@ -32,14 +32,15 @@ > class QStyle; > > class StartupId >- : public QObject >+ : public QWidget > { > Q_OBJECT > public: >- StartupId( QObject* parent = 0, const char* name = 0 ); >+ StartupId( QWidget* parent = 0, const char* name = 0 ); > virtual ~StartupId(); > void configure(); > protected: >+ virtual bool x11Event( XEvent* e ); > void start_startupid( const QString& icon ); > void stop_startupid(); > protected slots: >@@ -47,6 +48,7 @@ class StartupId > void gotNewStartup( const KStartupInfoId& id, const KStartupInfoData& data ); > void gotStartupChange( const KStartupInfoId& id, const KStartupInfoData& data ); > void gotRemoveStartup( const KStartupInfoId& id ); >+ void finishKDEStartup(); > protected: > KStartupInfo startup_info; > QWidget* startup_widget;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 143697
: 64723