Giter VIP home page Giter VIP logo

Comments (12)

NiLuJe avatar NiLuJe commented on May 28, 2024

It's a design simplification, as this should be an exceedingly rare occurrence in practice.

(Also, we also clobber slots on contact losses on some Kobo protocols later, anyway).

from koreader-base.

mapinguari avatar mapinguari commented on May 28, 2024

Fair enough. I am working with the remarkable and its happening regularly.

I will do by best to handle it further downstream.

Want me to close this?

from koreader-base.

NiLuJe avatar NiLuJe commented on May 28, 2024

Want me to close this?

Not necessarily, base's issue tracker isn't crowded, so leaving this open isn't really problematic.

As far as I'm concerned, this would be fairly low on the priority list, even if I actually had time to work on this (spoiler: I don't have any time ;p).

from koreader-base.

NiLuJe avatar NiLuJe commented on May 28, 2024

Could possibly be as simple as passing along the fd number from the C module to Lua-land and simply using fd + ABS_MT_SLOT in GestureManager, as we don't actually care about the slots value per se (in fact, some Kobo devices don't even emit a slot 0).

from koreader-base.

mapinguari avatar mapinguari commented on May 28, 2024

Yeah I did think about something along those lines, but I am not entirely sure what goes on in KOReader wrt slots and ids once they go into gesture detector.

I am just getting some funny double free exceptions from somewhere and it seems to be related to touch and tool events mingling.

from koreader-base.

NiLuJe avatar NiLuJe commented on May 28, 2024

Might need to be slightly more complex, because of the initial state in https://github.com/koreader/koreader/blob/19a607b5484299623cc57563f7a4baa3f49faff5/frontend/device/input.lua#L220-L226 (among possibly other things).

If we had a guarantee that the first event device we open is the touch screen, we might be able to use the inputfds index instead, but we don't.

from koreader-base.

NiLuJe avatar NiLuJe commented on May 28, 2024

It would probably not be too gnarly to deal with, I just have zero time to devote to this (or anything else, really :/) for the foreseeable future.

from koreader-base.

mapinguari avatar mapinguari commented on May 28, 2024

ok cool.

I will leave it be.

from koreader-base.

NiLuJe avatar NiLuJe commented on May 28, 2024

There might be a similar issue with cross-device ABS_MT_TRACKING_ID values, too (although a collision there is possibly much rarer).

from koreader-base.

mapinguari avatar mapinguari commented on May 28, 2024

From my little bit of watching the event streams on this one device then yes, it looks rarer. One device always uses the same ABS_MT_TRACKING_ID 0, and the other just continuously increments it.

from koreader-base.

NiLuJe avatar NiLuJe commented on May 28, 2024

As far as passing along the fd info, it should only take some minor contortions to stuff it in the table ;).

from koreader-base.

mapinguari avatar mapinguari commented on May 28, 2024

that is probably the simplest unobtrusive fix

from koreader-base.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.