Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong mouse-cursor when two TouchArea's are involved #6443

Open
Enyium opened this issue Oct 4, 2024 · 2 comments
Open

Wrong mouse-cursor when two TouchArea's are involved #6443

Enyium opened this issue Oct 4, 2024 · 2 comments
Labels
a:builtin elements The runtime data structures related to the items (mO,bT) bug Something isn't working priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this

Comments

@Enyium
Copy link
Contributor

Enyium commented Oct 4, 2024

Demo video, slowed down 4x:

cursor-sporadically-changing.mp4

The bug doesn't occur in SlintPad, but in a local build as well as the VS Code preview window.

Rust test project I wrote on Windows 10: mouse-cursor-bug.zip. The code is a simplification of a part of my app; so, the nested TouchAreas are necessary.

Relevant part:

    // The bug happens with both of the variants below:

    /*
    */
    TouchArea {
        Text {
            text: "https://www.example.com/lorem+ipsum+dolor+sit+amet";

            TouchArea {
                mouse-cursor: pointer;
            }
        }
    }

    /*
    TouchArea {
        TouchArea {
            width: self.preferred-width;
            height: self.preferred-height;
            mouse-cursor: pointer;

            Text {
                text: "https://www.example.com/lorem+ipsum+dolor+sit+amet";
            }
        }
    }
    */
@Enyium
Copy link
Contributor Author

Enyium commented Oct 4, 2024

With a TextInput inside a TouchArea:

    TouchArea {
        TextInput {
            text: "https://www.example.com/lorem+ipsum+dolor+sit+amet";
        }
    }

...the situation described in #6444 becomes worse: Now, clicking with any mouse button switches to the default cursor, at least temporarily (while holding the button). This can be reproduced in SlintPad.

@ogoffart ogoffart added the need triaging Issue that the owner of the area still need to triage label Oct 5, 2024
@ogoffart ogoffart changed the title TouchArea's mouse-cursor sporadically ignored, briefly switching back to default cursor Wrong mouse-cursor when two TouchArea's are involved Oct 7, 2024
@ogoffart ogoffart added bug Something isn't working a:builtin elements The runtime data structures related to the items (mO,bT) priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this and removed need triaging Issue that the owner of the area still need to triage labels Oct 7, 2024
@ogoffart
Copy link
Member

ogoffart commented Oct 7, 2024

When two TouchArea have the cursor at the same time, they both will call set_mouse_cursor, resulting in potential blinking cursor as the WM gets both cursor command in a row.

There is also a problem if two TouchArea are next to each other, the exit event might be sent after the inter event of the other, resulting in the default cursor to be shown when the mouse just move over to the second TouchArea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:builtin elements The runtime data structures related to the items (mO,bT) bug Something isn't working priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this
Projects
None yet
Development

No branches or pull requests

2 participants