~mir-team/mir/x11-multi-window

« back to all changes in this revision

Viewing changes to src/platforms/eglstream-kms/server/display.h

Simplify hardware cursor construction (no parameter required).

Previously hardware cursor implementations were expected to show
on construction with a given image. We now instead hide on construction but show an image immediately after as part of the default configuration policy.

Aside from providing a simpler interface, this is required as a
prerequisite for runtime fallback to the software cursor when the
hardware cursor won't be used (both cursors exist but never more than
one of them shown). This is also a prerequisite to fixing bug 1662760.

Assuming that a hardware cursor might only fail during construction was
a poor design. Going forward we will need to deal with a hardware cursor
that might become unusable or undesirable at any point in its life. Fixes: https://bugs.launchpad.net/bugs/1639226.

Approved by mir-ci-bot, Daniel van Vugt, Chris Halse Rogers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
 
64
64
    void resume() override;
65
65
 
66
 
    std::shared_ptr<Cursor> create_hardware_cursor(std::shared_ptr<CursorImage> const& initial_image) override;
 
66
    std::shared_ptr<Cursor> create_hardware_cursor() override;
67
67
 
68
68
    std::unique_ptr<VirtualOutput> create_virtual_output(int width, int height) override;
69
69