Giter Club home page Giter Club logo

Comments (2)

joggee-fr avatar joggee-fr commented on July 20, 2024 1

I have tested it using weston-clickdot with WAYLAND_DEBUG=1 environment variable to try to understand what's happening.
Without any modification on wlrctl, I can observe wl_pointer.button event is not sent by the compositor (Cage) to the client (clickdot). If I add a call to wl_display_dispatch() or wl_display_roundtrip() (or just a simple sleep) after zwlr_virtual_pointer_manager_v1_create_virtual_pointer() in wlrctl, the event is well distributed.

I am clearly not a Wayland nor wlroots expert at all, but as I understand it in headless case, no pointer device exists before wlrctl creates a virtual one. Once created, the client (clickdot) get a notification of capabilities update for wl_seat and retrieves a pointer object using wl_seat.get_pointer. It seems that wlroots send pointer events only to client which has requested a pointer object yet. That's where the quick and dirty sleep patch I have tested in wlrctl can make a difference, allowing the client (clickdot) to have time to request a pointer object.

I can't see a reliable way to determine if client is ready to receive pointer events to propose a patch for wlrctl but it is quite interesting.

from cage.

cmitsakis avatar cmitsakis commented on July 20, 2024

I added -c to the grim command to show the mouse pointer. There is no pointer.

I noticed wlrctl creates a virtual pointer and then destroys it. I modified wlrctl and added some sleep time before it destroys the pointer, and took a screenshot while wlrctl was running and discovered that there is pointer.

Is there a way to keep the pointer after wlrctl exits?

from cage.

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.