Index: kapplication.cpp =================================================================== RCS file: /home/kde/kdelibs/kdecore/kapplication.cpp,v retrieving revision 1.684 diff -u -r1.684 kapplication.cpp --- kapplication.cpp 13 Oct 2004 11:15:40 -0000 1.684 +++ kapplication.cpp 14 Oct 2004 18:59:26 -0000 @@ -73,7 +73,7 @@ #include #include -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 #include #endif @@ -101,7 +101,7 @@ #include #include #include -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 //#ifndef Q_WS_QWS //FIXME(E): NetWM should talk to QWS... #include #endif @@ -112,7 +112,6 @@ #include #endif -//#if defined Q_WS_X11 && ! defined K_WS_QTONLY #ifdef Q_WS_X11 #include // schrode #include // schrode @@ -138,7 +137,7 @@ #define DISPLAY "QWS_DISPLAY" #endif -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 #include #endif @@ -191,6 +190,10 @@ } #endif +#ifdef Q_WS_WIN +void KApplication_init_windows(bool GUIenabled); +#endif + /* Private data to make keeping binary compatibility easier */ @@ -498,7 +501,7 @@ if( t == QEvent::Show && receiver->isWidgetType()) { QWidget* w = static_cast< QWidget* >( receiver ); -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 if( w->isTopLevel() && !startupId().isEmpty()) // TODO better done using window group leader? KStartupInfo::setWindowStartupId( w->winId(), startupId()); #endif @@ -518,7 +521,7 @@ void KApplication::checkAppStartedSlot() { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 KStartupInfo::handleAutoAppStartedSending(); #endif } @@ -781,7 +784,7 @@ smw = 0; // Initial KIPC event mask. -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 kipcEventMask = (1 << KIPC::StyleChanged) | (1 << KIPC::PaletteChanged) | (1 << KIPC::FontChanged) | (1 << KIPC::BackgroundChanged) | (1 << KIPC::ToolbarStyleChanged) | (1 << KIPC::SettingsChanged) | @@ -879,6 +882,8 @@ 32, PropModeReplace, (unsigned char *)&data, 1); } d->oldIceIOErrorHandler = IceSetIOErrorHandler( kde_ice_ioerrorhandler ); +#elif defined(Q_WS_WIN) + KApplication_init_windows(GUIenabled); #else // FIXME(E): Implement for Qt Embedded #endif @@ -1715,7 +1720,6 @@ } } -#if defined Q_WS_X11 && ! defined K_WS_QTONLY if ((_event->type == ClientMessage) && (_event->xclient.message_type == kipcCommAtom)) { @@ -1780,14 +1784,13 @@ } return true; } -#endif // Q_WS_X11 && ! K_WS_QTONLY return false; } -#endif +#endif // Q_WS_X11 void KApplication::updateUserTimestamp( unsigned long time ) { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 if( time == 0 ) { // get current X timestamp Window w = XCreateSimpleWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0, 0, 0 ); @@ -1807,7 +1810,7 @@ unsigned long KApplication::userTimestamp() const { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 return qt_x_user_time; #else return 0; @@ -1816,7 +1819,7 @@ void KApplication::updateRemoteUserTimestamp( const QCString& dcopId, unsigned long time ) { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 if( time == 0 ) time = qt_x_user_time; DCOPRef( dcopId, "MainApplication-Interface" ).call( "updateUserTimestamp", time ); @@ -2463,7 +2466,7 @@ } #endif stream << envs; -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 // make sure there is id, so that user timestamp exists stream << ( startup_id.isEmpty() ? KStartupInfo::createNewStartupId() : startup_id ); #endif @@ -2702,7 +2705,7 @@ // set the specified icons topWidget->setIcon( icon() ); //standard X11 -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 //#ifdef Q_WS_X11 // FIXME(E): Implement for Qt/Embedded KWin::setIcons(topWidget->winId(), icon(), miniIcon() ); // NET_WM hints for KWin @@ -2723,7 +2726,7 @@ else { d->startup_id = startup_id; -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 KStartupInfoId id; id.initId( startup_id ); long timestamp = id.timestamp(); @@ -2737,7 +2740,7 @@ // not to propagate it to processes started from this app void KApplication::read_app_startup_id() { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 KStartupInfoId id = KStartupInfo::currentStartupIdEnv(); KStartupInfo::resetStartupEnv(); d->startup_id = id.id();