4

I have two EGL windows belonging to the same Wayland display. Windows are only displayed on the full screen. Mouse and keyboard events come into the display. How to determine which window belongs to which came the event?

It seems to me to be requested at Wayland TOPLEVEL window, but there is no such API.

Chadversary
  • 852
  • 8
  • 11

1 Answers1

3

On the pointer listener there are enter and leave events. In your functions implementing the listener for those events you will receive the surface that the pointer has entered or left.

The other pointer events do not have the surface so you will need to save the focussed surface into your own data structure on enter and reset it on leave. Then when you receive a motion event you can know what surface that event was for.

Rob Bradford
  • 1,440
  • 12
  • 17