Git Product home page Git Product logo

Comments (5)

uberyoji avatar uberyoji commented on July 23, 2024 2

Got the fix! Touchscreen now works perfectly.

In microui.c changed line 654:
if (mouseover /*&& !ctx->mouse_down*/) { ctx->hover = id; }

In microui.c added a new line at 1042:
if( ctx->last_hover_root == 0 ) ctx->last_hover_root = cnt;

from microui.

uberyoji avatar uberyoji commented on July 23, 2024

I think I have a better understanding now. ctx->hover_root is not set on mousedown and the mu_mouse_over called from mu_update_control fails because in_hover_root returns false.
Not sure how to fix it yet though.

from microui.

uberyoji avatar uberyoji commented on July 23, 2024

Ok I think I found the issue. The problem lies with ctx->last_hover_root. Since it is null at the beginning, the first move and click will be lost. This never happens when we send down mouse moves every frame as ctx->last_hover_root will be quickly set to something valid. I think I will fix my problem by sending fake mouse moves at the window header coordinates.
I wonder if this behavior could also affect focus state.

from microui.

ericoporto avatar ericoporto commented on July 23, 2024

@uberyoji do you still have the modified microui.c somewhere? I think the lines changed or I am not sure if I am looking in the right place. Do you remember if this solved in Switch but broke the mouse?

from microui.

pythonmcpi avatar pythonmcpi commented on July 23, 2024

@ericoporto The most recently commit available when uberyoji wrote their comment is c988730 (Committed on Oct 6, 2019).

If you have a local copy of the repository (from git clone), you can run git checkout c988730 to visit that commit. You can run git checkout - to go back to the current commit. (If you've made any local commits after running the first command, check this stackoverflow answer before you go back or you may lose your changes.)

from microui.

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.