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

Subsurface input (finally) #346

Merged
merged 5 commits into from
Apr 27, 2018
Merged

Subsurface input (finally) #346

merged 5 commits into from
Apr 27, 2018

Conversation

wmww
Copy link
Contributor

@wmww wmww commented Apr 27, 2018

This adds the ability for subsurfaces to get mouse input.

Copy link
Collaborator

@AlanGriffiths AlanGriffiths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keyboard and mouse input seems to be working on subsurfaces, but not touch input. Unless that's trivial, I'm happy to land this pending a separate fix.

Test case:

  1. Start gedit.
  2. Touch "Open"
  3. Touch a recent doc. Expect it opens, actual nothing
  4. Touch "Other Document...". Expect open dialog, actual nothing.

@@ -110,13 +112,20 @@ void mf::WlPointer::handle_event(MirPointerEvent const* event, WlSurface* surfac
auto point = Point{mir_pointer_event_axis_value(event, mir_pointer_axis_x),
mir_pointer_event_axis_value(event, mir_pointer_axis_y)};
auto transformed = surface->transform_point(point);
handle_enter(transformed.first, transformed.second);
handle_frame();
if (transformed)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a style nit: I prefer to restrict the scope of everything (in this case transformed). Vis:

            if (auto const transformed = surface->transform_point(point))

I know it makes little difference here (and won't block on it).

@AlanGriffiths
Copy link
Collaborator

On further thoughts: let's land this before the weekend, I'll file a bug for about the touch issues.

bors r+

bors bot added a commit that referenced this pull request Apr 27, 2018
346: Subsurface input (finally) r=AlanGriffiths a=wmww

This adds the ability for subsurfaces to get mouse input.

Co-authored-by: William Wold <william.wold@canonical.com>
@bors
Copy link
Contributor

bors bot commented Apr 27, 2018

Build succeeded

@bors bors bot merged commit 41defcb into master Apr 27, 2018
@bors bors bot deleted the subcompositor branch April 27, 2018 14:24
@wmww wmww restored the subcompositor branch April 30, 2018 15:09
@wmww wmww deleted the subcompositor branch April 30, 2018 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants