Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Mouse Control on Wayland: Calculating Delta Without Centering
Forum Updated to NodeBB v4.3 + New Features

Mouse Control on Wayland: Calculating Delta Without Centering

Scheduled Pinned Locked Moved Solved Game Development
3 Posts 1 Posters 170 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    EndrII 0
    wrote on 23 Jun 2025, 11:22 last edited by
    #1

    Hi, I'm having trouble implementing mouse-controlled camera movement in my game on Linux using the Wayland protocol.

    Wayland prevents setting the cursor position within the game, but this is necessary when the player moves the mouse to the screen edge, making it impossible to continue calculating the movement delta.

    To fix this, developers usually use the setPos function of QCursor to reset the mouse position to the screen center. However, this isn't possible on Wayland.

    [06-23 12:35:41.836 42381 Warning] Setting cursor position is not possible on wayland
    

    A temporary solution is to use the XCB plugin for X11, but X11 is very bad for games and FPS. Additionally, the XCB plugin freezes with vSync on Linux systems.

    So, the question is: does anyone have solutions for calculating mouse movement delta without centering the cursor?

    1 Reply Last reply
    0
    • E Offline
      E Offline
      EndrII 0
      wrote a day ago last edited by
      #3

      Issue moved to bug tracker : : https://bugreports.qt.io/browse/QTBUG-113795 and https://bugreports.qt.io/browse/QTBUG-116493

      1 Reply Last reply
      0
      • E Offline
        E Offline
        EndrII 0
        wrote on 23 Jun 2025, 17:12 last edited by
        #2

        Probably exists way when i can handle low level signal for mouse - without cursor position, but with velocity vectors or directions vectors?

        1 Reply Last reply
        0
        • E EndrII 0 referenced this topic 7 days ago
        • E Offline
          E Offline
          EndrII 0
          wrote a day ago last edited by
          #3

          Issue moved to bug tracker : : https://bugreports.qt.io/browse/QTBUG-113795 and https://bugreports.qt.io/browse/QTBUG-116493

          1 Reply Last reply
          0
          • E EndrII 0 has marked this topic as solved a day ago

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved