GithubHelp home page GithubHelp logo

Comments (4)

Consolatis avatar Consolatis commented on June 17, 2024

We might not do mouse emulation for touch events, I don't have hardware to test this but src/input/touch.c is pretty small.
It seems to indeed completely skip non client surfaces, maybe we could emulate usual cursor events in those cases instead. Similar to src/input/tablet.c (e.g. via cursor_emulate_move_absolute() and cursor_emulate_button() after a timeout on touch_down()).

CC @bi4k8 as original author of the touch support.

from labwc.

spl237 avatar spl237 commented on June 17, 2024

OK, I have written a very crude bodge using cursor_emulate functions which means I can operate the close, minimize etc buttons on a headerbar with the touchscreen. I haven't yet got window dragging working, but this seems to at least be a viable solution in the short term - I'll hack about and see what I can get working.

(But if someone else knows more about this than me - which is almost certainly the case - do please feel free to come up with something better!)

from labwc.

spl237 avatar spl237 commented on June 17, 2024

Right, I have window dragging and button clicking working, but the problem I now have is that this breaks behaviour in a few other areas of the system. I think what I need to do is to ensure that the cursor_emulate functions are only applied when a touch is on an SSD titlebar.

Is there any easy way to determine if the item under the touch point is an SSD titlebar? If I could do that, I think this would work pretty much perfectly...

from labwc.

spl237 avatar spl237 commented on June 17, 2024

It looks as if just checking if the surface returned from touch_get_coords is valid can be used to check whether you are on the SSD or not, as because the SSD seems to be the only thing that is returned as not a valid touch surface. That assumption may of course be incorrect!

PR raised - this works pretty well for me, but is largely based on guesswork...

from labwc.

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.