[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Detecting a "stylus based" system, for sgt-puzzles



Thanks Adam and Paul for your input on this.

Adam Borowski <kilobyte@angband.pl> writes:

> On Wed, Feb 08, 2012 at 11:02:44AM +0800, Paul Wise wrote:
>> On Wed, Feb 8, 2012 at 10:24 AM, Adam Borowski wrote:
>> 
>> > From what I understood, he needs to know whether right/middle click is
>> > reasonably available -- which on your tablet it will never be without
>> > attaching an external mouse.
>> 
>> IIRC, GTK+ 3 will be adding right-click emulation using long touch
>> presses, so in time right clicks will be available on touchscreen
>> based devices running Debian.
>
> GTK 2 already has that (libgtkstylus).  There's no interface as far as I
> know so you need to enable it via GTK_MODULES, but it's there.

I think the upshot is that an autodetection approach would be complex,
subjective and error-prone, and that's even if we somewhat simplify the
problem by disregarding platform changes after the programs are already
running.

For example, some people with phones like mine might like using
libgtkstylus, and might object to any other way of emulating right-click
behaviour.

Hence I'm now thinking of proposing (upstream) an environment variable
solution.  Probably:

  export SGT_PUZZLE_OPTIONS=STYLUS_BASED

so as to allow for further options in future (of which there are more in
the code already, although not of such immediate interest as
STYLUS_BASED).

I think an environment variable will work better than a command line
option, because a user can set that once in their .xsession; whereas a
command line option approach would require changing all relevant
.desktop files.

If you have further comments or thoughts about that, please let me know.

Regards,
        Neil


Reply to: