SVN commit 852580 by segato: other windows fixes M +8 -4 CMakeLists.txt M +17 -0 plasmaapp.cpp --- trunk/KDE/kdebase/workspace/plasma/shells/mid/CMakeLists.txt #852579:852580 @@ -12,10 +12,14 @@ kde4_add_kdeinit_executable(plasma-mid ${plasma-mid_SRCS}) -target_link_libraries(kdeinit_plasma-mid plasma kworkspace ${KDE4_KNEWSTUFF2_LIBS} ${KDE4_KIO_LIBS} ${X11_LIBRARIES}) -if(X11_Xrender_FOUND) - target_link_libraries(kdeinit_plasma-mid ${X11_Xrender_LIB}) -endif(X11_Xrender_FOUND) +if(NOT WIN32) + target_link_libraries(kdeinit_plasma-mid plasma kworkspace ${KDE4_KNEWSTUFF2_LIBS} ${KDE4_KIO_LIBS} ${X11_LIBRARIES}) + if(X11_Xrender_FOUND) + target_link_libraries(kdeinit_plasma-mid ${X11_Xrender_LIB}) + endif(X11_Xrender_FOUND) +else(NOT WIN32) + target_link_libraries(kdeinit_plasma-mid plasma ${KDE4_KNEWSTUFF2_LIBS} ${KDE4_KIO_LIBS} ${X11_LIBRARIES}) +endif(NOT WIN32) install(TARGETS kdeinit_plasma-mid DESTINATION ${LIB_INSTALL_DIR}) install(TARGETS plasma-mid ${INSTALL_TARGETS_DEFAULT_ARGS}) --- trunk/KDE/kdebase/workspace/plasma/shells/mid/plasmaapp.cpp #852579:852580 @@ -43,12 +43,15 @@ #include "midcorona.h" #include "midview.h" +#ifdef Q_WS_X11 #include #include Display* dpy = 0; Colormap colormap = 0; Visual *visual = 0; +#endif + static const int CONTROL_BAR_HEIGHT = 22; void checkComposite() @@ -92,14 +95,22 @@ { if (!kapp) { checkComposite(); +#ifdef Q_WS_X11 return new PlasmaApp(dpy, visual ? Qt::HANDLE(visual) : 0, colormap ? Qt::HANDLE(colormap) : 0); +#else + return new PlasmaApp(0, 0, 0); +#endif } return qobject_cast(kapp); } PlasmaApp::PlasmaApp(Display* display, Qt::HANDLE visual, Qt::HANDLE colormap) +#ifdef Q_WS_X11 : KUniqueApplication(display, visual, colormap), +#else + : KUniqueApplication(), +#endif m_corona(0), m_window(0), m_controlBar(0), @@ -142,6 +153,7 @@ m_window = new QWidget; +#ifdef Q_WS_X11 //FIXME: if argb visuals enabled Qt will always set WM_CLASS as "qt-subapplication" no matter what //the application name is we set the proper XClassHint here, hopefully won't be necessary anymore when //qapplication will manage apps with argb visuals in a better way @@ -149,6 +161,7 @@ classHint.res_name = const_cast("Plasma"); classHint.res_class = const_cast("Plasma"); XSetClassHint(QX11Info::display(), m_window->winId(), &classHint); +#endif QVBoxLayout *layout = new QVBoxLayout(m_window); layout->setMargin(0); @@ -312,7 +325,11 @@ bool PlasmaApp::hasComposite() { +#ifdef Q_WS_X11 return colormap && KWindowSystem::compositingActive(); +#else + return false; +#endif } void PlasmaApp::notifyStartup(bool completed)