generic: remove redundant HAVE_XRENDER configuration definition

if Xrender is not found a fatal message will be issued by the top-level
CMakeLists file because it is required by KWin compositor for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-11-25 00:39:15 +02:00
parent 9e697dfade
commit 795cb31a59
10 changed files with 31 additions and 41 deletions

View file

@ -25,7 +25,6 @@ kde4_bool_to_01(X11_Xdamage_FOUND HAVE_XDAMAGE) # kwin
kde4_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES) # klipper, kicker, kwin
kde4_bool_to_01(X11_Xkb_FOUND HAVE_XKB) # kglobalaccel, kcontrol/keyboard
kde4_bool_to_01(X11_Xrandr_FOUND HAVE_XRANDR) # kwin
kde4_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) # kcontrol/style, kicker
kde4_bool_to_01(X11_xf86misc_FOUND HAVE_XF86MISC) # kcontrol/keyboard
kde4_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kwin
kde4_bool_to_01(X11_XRes_FOUND HAVE_XRES) # ksysguard

View file

@ -22,9 +22,6 @@
/* Define if you have the XTest extension */
#cmakedefine HAVE_XTEST 1
/* Define if your system has XRender support */
#cmakedefine HAVE_XRENDER 1
/* Define if you have the XSync extension */
#cmakedefine HAVE_XSYNC 1

View file

@ -45,7 +45,6 @@ add_executable(kapplymousetheme ${kapplymousetheme_SRCS})
target_link_libraries(kapplymousetheme
${KDE4_KDEUI_LIBS}
${X11_Xrender_LIB}
${X11_X11_LIB}
)
if (X11_Xcursor_FOUND)

View file

@ -62,8 +62,7 @@ target_link_libraries(krunner
${KDE4_SOLID_LIBRARIES}
${KDE4_KDEUI_LIBS}
${KDE4_KCMUTILS_LIBS}
${X11_Xrender_LIB}
${X11_LIBRARIES}
${X11_X11_LIB}
)
if(X11_Xcursor_FOUND)

View file

@ -44,7 +44,8 @@
#include "krunnersettings.h"
#ifdef Q_WS_X11
#include <X11/extensions/Xrender.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#endif
KRunnerApp* KRunnerApp::self()
@ -138,9 +139,6 @@ void KRunnerApp::initialize()
}
#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 argvisuals in a better way
XClassHint classHint;
classHint.res_name = const_cast<char*>("krunner");
classHint.res_class = const_cast<char*>("krunner");

View file

@ -53,7 +53,6 @@ target_link_libraries(ksmserver
${KDE4_KDECLARATIVE_LIBS}
${QT_QTDECLARATIVE_LIBRARY}
${X11_LIBRARIES}
${X11_Xrender_LIB}
kworkspace
)

View file

@ -48,7 +48,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <QtGui/qx11info_x11.h>
#include <QtCore/qfile.h>
#include <X11/extensions/Xrender.h>
#include <X11/Xlib.h>
static const char version[] = "0.4";
static const char description[] = I18N_NOOP( "The reliable KDE session manager that talks the standard X11R6 \nsession management protocol (XSMP)." );

View file

@ -56,16 +56,16 @@ namespace Oxygen
_helper( helper ),
_shadowCache( new ShadowCache( helper ) ),
_size( 0 )
#ifdef Q_WS_X11
#ifdef Q_WS_X11
,_atom( None )
#endif
#endif
{}
//_______________________________________________________
ShadowHelper::~ShadowHelper( void )
{
#ifdef Q_WS_X11
#ifdef Q_WS_X11
foreach( const Qt::HANDLE& value, _pixmaps ) {
if (value != 0) {
XFreePixmap( QX11Info::display(), value );
@ -76,7 +76,7 @@ namespace Oxygen
XFreePixmap( QX11Info::display(), value );
}
}
#endif
#endif // Q_WS_X11
delete _shadowCache;
@ -85,7 +85,7 @@ namespace Oxygen
//______________________________________________
void ShadowHelper::reset( void )
{
#ifdef Q_WS_X11
#ifdef Q_WS_X11
// round pixmaps
foreach( const Qt::HANDLE& value, _pixmaps ) {
if (value != 0) {
@ -97,7 +97,7 @@ namespace Oxygen
XFreePixmap( QX11Info::display(), value );
}
}
#endif
#endif // Q_WS_X11
_pixmaps.clear();
_dockPixmaps.clear();
@ -264,9 +264,9 @@ namespace Oxygen
*/
// create atom
#ifdef Q_WS_X11
#ifdef Q_WS_X11
if( !_atom ) _atom = XInternAtom( QX11Info::display(), netWMShadowAtomName, False);
#endif
#endif
// make sure size is valid
if( _size <= 0 ) return _pixmaps;
@ -320,7 +320,7 @@ namespace Oxygen
explicitly and draw the source pixmap on it.
*/
#ifdef Q_WS_X11
#ifdef Q_WS_X11
const int width( source.width() );
const int height( source.height() );
@ -328,9 +328,9 @@ namespace Oxygen
KPixmap pixmap(source);
// handle not released, safe to return
return pixmap.handle();
#else
#else
return 0;
#endif
#endif // Q_WS_X11
}
@ -341,9 +341,7 @@ namespace Oxygen
// check widget and shadow
if( !widget ) return false;
#ifdef Q_WS_X11
#ifndef QT_NO_XRENDER
#ifdef Q_WS_X11
// TODO: also check for NET_WM_SUPPORTED atom, before installing shadow
/*
@ -408,9 +406,7 @@ namespace Oxygen
reinterpret_cast<const unsigned char *>(data.constData()), data.size() );
return true;
#endif
#endif
#endif // Q_WS_X11
return false;
@ -420,10 +416,10 @@ namespace Oxygen
void ShadowHelper::uninstallX11Shadows( QWidget* widget ) const
{
#ifdef Q_WS_X11
#ifdef Q_WS_X11
if( !( widget && widget->testAttribute(Qt::WA_WState_Created) ) ) return;
XDeleteProperty(QX11Info::display(), widget->winId(), _atom);
#endif
#endif
}

View file

@ -35,14 +35,20 @@ qt4_add_dbus_interface(plasma_SRCS ${ksmserver_xml} ksmserver_interface)
add_executable(plasma-desktop ${plasma_SRCS})
target_link_libraries(plasma-desktop ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KTEXTEDITOR_LIBS} ${KDE4_KIDLETIME_LIBS} ${QT_QTSCRIPT_LIBRARY} kworkspace plasmagenericshell ${QT_QTDECLARATIVE_LIBRARY})
target_link_libraries(plasma-desktop
${KDE4_PLASMA_LIBS}
${KDE4_KIO_LIBS}
${KDE4_KFILE_LIBS}
${KDE4_KTEXTEDITOR_LIBS}
${KDE4_KIDLETIME_LIBS}
${QT_QTSCRIPT_LIBRARY}
${QT_QTDECLARATIVE_LIBRARY}
kworkspace
plasmagenericshell
)
if(UNIX AND Q_WS_X11)
target_link_libraries(plasma-desktop ${X11_LIBRARIES})
if(X11_Xrender_FOUND)
target_link_libraries(plasma-desktop ${X11_Xrender_LIB})
endif(X11_Xrender_FOUND)
endif(UNIX AND Q_WS_X11)
install(TARGETS plasma-desktop ${INSTALL_TARGETS_DEFAULT_ARGS})

View file

@ -83,7 +83,7 @@
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>
#include <X11/Xutil.h>
#endif
extern QString plasmaLocale;
@ -755,9 +755,6 @@ void PlasmaApp::createView(Plasma::Containment *containment)
void PlasmaApp::setWmClass(WId id)
{
#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 argvisuals in a better way
XClassHint classHint;
classHint.res_name = const_cast<char*>("Plasma");
classHint.res_class = const_cast<char*>("Plasma");