[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Hacking kwin_composite
From: Lubos Lunak <l.lunak () suse ! cz>
Date: 2006-08-29 15:57:36
Message-ID: 200608291757.36376.l.lunak () suse ! cz
[Download RAW message or body]
On Tuesday 29 August 2006 17:13, Arturo Garcia wrote:
> Thank you for all the info. I'm now setup and working fine. A few more
> questions:
>
> - Are there any reasons why we shouldn't use exceptions? I want to throw
> and handle stuff when creating GLX contexts, etc
There are not any serious reasons against, as long as it helps the code
instead of making it worse. Note however that vast majority of Qt/KDE is not
written with exceptions in mind and that includes KWin.
Also note that exceptions are disabled by default in KDE and need to be
explicitly turned on when needed. The correct KDE4 of doing that seems to be
adding
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
to CMakeLists.txt (see e.g. kdelibs/khtml).
>, so it can fail over to other compositors (the sceneXrender, or the base,
>etc...)
It cannot fail over to other compositors, because there'll be only one active
at a time. It also cannot fail over to the KWin core, because I frankly
currently don't see any good reason to make the core exceptions-safe. The
exceptions would have to be contained only in the one renderer.
> - I noticed a lot of copycontructorness in the WindowData class
> (sceneXrender.h). I am using pointers ( Toplevel*, GLXToplevel* ) for the
> QMap. Is there any reason why I should use the type itself?
All types in WindowData are either relatively simple types that are cheap to
copy and it doesn't make sense to complicate it by using pointers, or they
are handles (Picture, XserverRegion). Just use whatever makes the most sense.
--
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org
Lihovarska 1060/12 tel: +420 284 028 972
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http//www.suse.cz
_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic