display: Establish a separate state variable for routing events

Desktop / GNOME / Mutter - Jasper St. Pierre [mecheye.net] - 15 August 2014 15:08 UTC

We've long used a switch statement on the grab operation to determine where events should go. The issue with MetaGrabOp is that it's a mixture of a few different things, including event routing, state management, and the behavior to choose during operations.

This leads to poorly defined event routing and hard-to-follow logic, since it's sometimes unclear what should point where, and our utility methods for determining grab operations apart can be poorly named.

To fix this, establish the concept of a "event route", which describes where events should be routed to.

0e758a9 display: Establish a separate state variable for routing events
src/backends/meta-cursor-tracker.c | 2 +-
src/compositor/compositor.c | 4 +-
src/core/display-private.h | 24 ++++++++++-
src/core/display.c | 78 +++++++++++++++++++++++++++++-------
src/core/events.c | 13 ++----
src/wayland/meta-wayland-pointer.c | 20 +++++----
6 files changed, 107 insertions(+), 34 deletions(-)

Upstream: git.gnome.org


  • Share