[mutter/wip/carlosg/grabs-pt1: 92/93] clutter: Add specific event flag to tag "grab notify" crossing events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/grabs-pt1: 92/93] clutter: Add specific event flag to tag "grab notify" crossing events
- Date: Tue, 7 Dec 2021 21:33:02 +0000 (UTC)
commit 5c7f8f7444bafb3f4c4a44317be8aad8554b99d1
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Oct 29 12:29:51 2021 +0200
clutter: Add specific event flag to tag "grab notify" crossing events
These events may need some differentiation or special handling, so add
this event flag and set it in the relevant events.
clutter/clutter/clutter-enums.h | 1 +
clutter/clutter/clutter-stage.c | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-enums.h b/clutter/clutter/clutter-enums.h
index 9177f1095e..9ee55fb5c4 100644
--- a/clutter/clutter/clutter-enums.h
+++ b/clutter/clutter/clutter-enums.h
@@ -804,6 +804,7 @@ typedef enum /*< flags prefix=CLUTTER_EVENT >*/
CLUTTER_EVENT_FLAG_INPUT_METHOD = 1 << 1,
CLUTTER_EVENT_FLAG_REPEATED = 1 << 2,
CLUTTER_EVENT_FLAG_RELATIVE_MOTION = 1 << 3,
+ CLUTTER_EVENT_FLAG_GRAB_NOTIFY = 1 << 4,
} ClutterEventFlags;
/**
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 6559059e06..00b806a878 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -3496,6 +3496,7 @@ create_crossing_event (ClutterStage *stage,
ClutterInputDevice *device,
ClutterEventSequence *sequence,
ClutterEventType event_type,
+ ClutterEventFlags flags,
ClutterActor *source,
ClutterActor *related,
graphene_point_t coords,
@@ -3505,7 +3506,7 @@ create_crossing_event (ClutterStage *stage,
event = clutter_event_new (event_type);
event->crossing.time = time_ms;
- event->crossing.flags = 0;
+ event->crossing.flags = flags;
event->crossing.stage = stage;
event->crossing.source = source;
event->crossing.x = coords.x;
@@ -3576,7 +3577,7 @@ clutter_stage_update_device (ClutterStage *stage,
{
event = create_crossing_event (stage,
device, sequence,
- CLUTTER_LEAVE,
+ CLUTTER_LEAVE, 0,
old_actor, new_actor,
point, time_ms);
if (!_clutter_event_process_filters (event))
@@ -3589,7 +3590,7 @@ clutter_stage_update_device (ClutterStage *stage,
{
event = create_crossing_event (stage,
device, sequence,
- CLUTTER_ENTER,
+ CLUTTER_ENTER, 0,
new_actor, old_actor,
point, time_ms);
if (!_clutter_event_process_filters (event))
@@ -3770,6 +3771,7 @@ clutter_stage_notify_grab_on_entry (ClutterStage *stage,
entry->device,
entry->sequence,
event_type,
+ CLUTTER_EVENT_FLAG_GRAB_NOTIFY,
entry->current_actor,
event_type == CLUTTER_LEAVE ?
grab_actor : old_grab_actor,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]