[enhancement] Mir lacks relative mouse support

Bug #1276322 reported by Brandon Schaefer
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Fix Released
Robert Carr
mir (Ubuntu)
Fix Released

Bug Description

Mir lacks relative mouse support, as well as a way to warp the mouse. This is a problem when it comes to SDL as quite a few games depend on these features.

SDL bug report:

This is the only thing that is blocking full SDL Mir support.

Related branches

description: updated
kevin gunn (kgunn72)
Changed in mir:
assignee: nobody → Chris Halse Rogers (raof)
milestone: none → 0.1.5
status: New → Triaged
Changed in mir:
importance: Undecided → Medium
summary: - Mir lacks relative mouse support
+ [enhancement] Mir lacks relative mouse support
tags: added: cursor enhancement
Changed in mir:
milestone: 0.1.5 → 0.1.6
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Android-input gives as absolute pointer data only. So if you want relative data it will need to be synthesised. I suggest it would be better to synthesise this in SDL than Mir itself.

Changed in mir:
milestone: 0.1.6 → none
status: Triaged → Opinion
assignee: Chris Halse Rogers (raof) → nobody
Revision history for this message
Chris Halse Rogers (raof) wrote :

We can, and should, provide relative events, and they cannot be correctly synthesised from absolute events - for example, against screen edges it's not possible to synthesise relative events from absolute events because the absolute events have lost any component of motion outside the screen.

Changed in mir:
status: Opinion → Triaged
assignee: nobody → Chris Halse Rogers (raof)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I don't quite understand the screen edge argument. Are you saying some touch devices are wired to sense events outside the pad/screen coordinates?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh, I see. Say you're playing a first person shooter. The mouse pointer is hidden, but if you only had absolute coordinates then your mouse movements would be (infuriatingly) frequently ignored if you hit the screen edge. You do need relative events which stay accurate regardless of what you think the screen dimensions are.

tags: added: input
Changed in mir:
assignee: Chris Halse Rogers (raof) → Robert Carr (robertcarr)
milestone: none → 0.15.0
status: Triaged → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.15.0

Changed in mir:
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Not "fixed" yet. We've done the work in r2770 for servers to get relative pointer info, but games and SDL etc need a client API which we don't have yet.

Changed in mir:
status: Fix Committed → Triaged
milestone: 0.15.0 → none
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

I've not tested it yet but from what I see it should be client API here:
=== modified file 'include/client/mir_toolkit/events/input/pointer_event.h'

Under the axis, i should just need to:
mir_pointer_event_axis_value(pointer_event, mir_pointer_axis_relative_x);


Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh good point. No new functions are required.

Changed in mir:
status: Triaged → Fix Committed
milestone: none → 0.15.0
Changed in mir (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Just remembered. This still isn't enough for FPS gaming. We need to implement pointer "grabs" for first-person-shooter type games, so that the cursor never escapes the window while you're playing. Although a workaround in the absence of grabs is to just say we only support single-monitor setups, in fullscreen, for FPS gaming right now. Such a setup constrains the cursor to never escape, but we will still need a more general solution like pointer grabs.

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Yup ran into that while testing. Yeah if its fullscreen it should work :). Still trying to get steam working again!

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.2 KiB)

This bug was fixed in the package mir - 0.15.0+15.10.20150818-0ubuntu1

mir (0.15.0+15.10.20150818-0ubuntu1) wily; urgency=medium

  [ Daniel van Vugt ]
  * New upstream release 0.15.0 (https://launchpad.net/mir/+milestone/0.15.0)
    - ABI summary: Only servers and graphics drivers need rebuilding;
      . Mirclient ABI unchanged at 9
      . Mirserver ABI bumped to 33
      . Mircommon ABI unchanged at 5
      . Mirplatform ABI bumped to 9
    - Enhancements:
      . Add support for Mir-on-X11.
      . Latency reduction optimizations (around ~15ms reduction in total):
        Reduced input event resampling latency by 5ms. Reduced output latency
        (in system compositors) by around 10ms with the introduction of
        "predictive bypass". And we're not finished; future Mir releases
        should reduce latency further.
      . Introduced a python3-based Mir performance framework.
      . Lots of preparation for an architectural overhaul of buffer swapping,
        required in the least to support future optimizations like nested
      . Added a new cursor: crosshair
      . Added support for 15/16-bit client pixel formats ("high colour").
      . Added a new client function to make picking the right pixel format
        for a given EGLConfig super simple: mir_connection_get_egl_pixel_format
      . Added application-not-responding detection
      . Added client API for specifying input region shape.
      . Fixed the remaining threading flaws identified by ThreadSanitizer and
        turned it on permanently for all continuous integration in future.
      . Added support for relative pointer motion events (e.g. for gaming).
    - Bug fixes:
      . Fix focus issues breaking autopilot tests entering text (LP: #1468029)
      . Fix mir tests failure on armhf with GCC5 (LP: #1478213)
      . mir_buffer_stream_swap_buffers_sync can hang constraints (LP: #1479899)
      . Loading libmirclient.so twice leads to a segfault in libmirprotobuf.so
        (LP: #1391976)
      . Visible corruption in SDL apps (LP: #1460149)
      . MultiThreadedCompositor::destroy_compositing_threads hangs/deadlocks on
        shutdown or display reconfiguration (LP: #1471909)
      . ctest/"make test" reports 100% tests pass even when some fail.
        (LP: #1472911)
      . Mir server crashed - GLib-CRITICAL **: g_source_get_context: assertion
       'source->context != NULL || !SOURCE_DESTROYED (source)' failed
        (LP: #1473869)
      . USC crash on multimonitor unplug [std::exception::what: error during
        hwc prepare()] (LP: #1474891)
      . [regression] Input focus delay after switching app back into focus
        (LP: #1480654)
      . GLibMainLoopTest.propagates_exception_from_server_action fails with
        GCC 5 in armhf (LP: #1482274)
      . [enhancement] Mir lacks relative mouse support (LP: #1276322)
      . ShmBuffer ignores pixel_format (LP: #1424909)
      . Fullscreen bypassed clients stutter with double buffers when other
        clients are running (LP: #1447896)
      . [regression] Demo servers crash on start-up if MIR_ENABLE_TESTS=OFF
        (LP: #1439078)
      . [regression] The software curs...


Changed in mir (Ubuntu):
status: Triaged → Fix Released
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers