Re: [kde-solaris] oxygen style needs xrender?
- Date: Tue, 06 May 2008 11:38:50 +0530
- From: Girish Ramakrishnan <girish@xxxxxxxxxxxxxx>
- Subject: Re: [kde-solaris] oxygen style needs xrender?
Allen Winter wrote:
> On Monday 05 May 2008 06:03:53 John Tapsell wrote:
>>> > I believe this is expected behavior. Without xrender, Qt does not
>>> > support antialiasing and some composition modes. When no xrender is
>>> > detected, Qt just falls back to the Windows style. I guess kde needs
>>> > to do similar?
>>> >
>>> > You can test this on any machine using QT_X11_NO_XRENDER=1 ./myapp.
>> How can we best detect if xrender is disable in our code?
>>
> The FindX11 cmake module finds XRender for you.
>
> So, in your project CMakeLists.txt, add the lines:
> if(X11_Xrender_FOUND)
> add_definitions(-DHAVE_XRENDER)
> target_link_libraries(foo ${X11_Xrender_LIB})
> endif(X11_Xrender_FOUND)
>
> Finally, put conditional compiles in your source code:
> #if defined(HAVE_XRENDER)
> #include <X11/extensions/Xrender.h>
> ...and other xrender specific stuff
> #endif
>
>
To check if Qt detected XRender libs during compilation, just go to the
Qt build directory and check the contents of .qmake.cache. If XRender
was found, you will find a line like "QMAKE_LIBS_X11 = -lXrender
$$QMAKE_LIBS_X11". If not, you will find the flag QT_NO_XRENDER defined
somewhere. Of course, you will find this info printed when running
configure, if you were attentive enough :-)
For runtime, xdpyinfo | grep -i render.
Girish
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<