Hi,

On Thu, Sep 29, 2011 at 5:25 PM, Paul Olav Tvete <[email protected]> wrote:
> On Thursday 29 September 2011 13:33:28 ext Thiago Macieira wrote:
>> A wayland server has nothing to do with the wayland plugin to lighthouse,
>> aside from the fact that they speak the same protocol and may be using the
>> same low-level library.
>
> The "low-level library" in question is Qt :p
>
> Samuel used this example to show that being able to use two different platform
> plugins on the same system, without having to have two separate installations 
> of
> Qt, is not just a cool geeky feature: it's absolutely essential for the 
> Wayland
> use case.
>
> Once you have chosen to use Qt on Wayland, the only sane choice is to use Qt 
> to
> implement your compositor too. I mean, we use Qt because we don't actually 
> enjoy
> low-level C programming. The Wayland compositor will then be run with a 
> command
> line like
>
> qwindow-compositor -platform eglfs -plugin linuxinputmouse
>
> while the client will do something like
>
> hellowindow -platform wayland
>
> Exactly the same Qt libraries involved, but two different lighthouse 
> back-ends.
>

Yes, this is a very good reason to have platform plugins.

As I explained a little more on irc, I wanted to see if we could build
the lighthouse code as (dynamic) plugins with just -nokia-developer
builds. For normal builds, it would compile them statically and an app
could figure which platform was in use using ifdefs. This way I could
do in the app code
#ifdef QPA_X11
#include <Xlib.h>
#elif defined(QPA_XCB)
...
#endif
With the current approach to platforms as plugins, the app has to load
symbols dynamically OR link to both Xlib+Xcb.

Just to take my idea to conclusion before we kill it, can the wayland
and eglfs platforms be merged into one :) ? i.e we have a QPA_WAYLAND
and the platform plugin code itself determines what "mode" it is
(presumably by passing some command line option). In some ways this is
like the -qws option where the server and client reside in same
library.

Girish
_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to