Good points, but what about allowing a few types (number, string, boolean)
to be read using methods like client:read_xprop_number("NAME") and allowing
awesome to create/write new ones ones only in the AWESOME_NAQUADAH
namespace? like client:write_xprop_number("COUNT",1000) ->
AWESOME_NAQUADAH_COUNT ?

This feel like evil magic, and it is, but so is adding a single BLOB
property. The use case your patch try to allow cannot be fixed using a
single BLOB. I understand X11 is fragile, but do we really have a choice
here?

Emmanuel


On 23 February 2014 13:59, Uli Schlachter <[email protected]> wrote:

> On 23.02.2014 19:15, Elv1313 . wrote:
> [...]
> > But would it be better to simply be able to access random xprops from lua
> > rather than having to patch awesome everytime we want a new one?
> [...]
>
> The problem with accessing random X11 properties is that most random
> properties
> have random formats. I can make UTF8_STRING and CARDINAL work properly, I
> can
> pretend that STRING is UTF8_STRING, I can turn ATOMs into atom names and I
> can
> pretend that WINDOW and PIXMAP really are just integers (client.window and
> drawin.window already pretend the same).
>
> This might help with many properties, but I fear that this will be a
> downhill
> slope and eventually people will want access to more and more X11
> properties.
>
> Also, reading is way less harmful than writing a property. Lua would have
> to
> specify a type here, too (or the alternative would again be a big
> hardcoded list
> of types in C). And now configs would be able to set all kind of broken
> things.
>
> Finally, this breaks all the (weak) abstractions that we have. The Lua API
> that
> awesome provides isn't meant to be a Lua X11 protocol binding...
>
> Uli
> --
> "Some people are worth melting for." - Olaf
>
> --
> To unsubscribe, send mail to [email protected].
>

Reply via email to