[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: [kde-solaris] oxygen style needs xrender?
From:       Girish Ramakrishnan <girish () forwardbias ! in>
Date:       2008-05-06 6:20:50
Message-ID: 481FF5F2.7040107 () forwardbias ! in
[Download RAW message or body]

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 <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic