[mutter/gbsneto/graphene-ray: 3/11] clutter/actor: Use pick context in clutter_actor_should_pick_paint()
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/graphene-ray: 3/11] clutter/actor: Use pick context in clutter_actor_should_pick_paint()
- Date: Sat, 17 Oct 2020 16:21:30 +0000 (UTC)
commit 3f511ce30c1ed14987af4cd0590fb8430e8e0bce
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Oct 16 10:02:56 2020 -0300
clutter/actor: Use pick context in clutter_actor_should_pick_paint()
Pass the ClutterPickContext to clutter_actor_should_pick_paint() and
check the pick mode from it.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1509
clutter/clutter/clutter-actor.c | 7 ++++---
clutter/clutter/clutter-actor.h | 3 ++-
src/compositor/meta-surface-actor.c | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index f4b8b61780..b7617e2cac 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -2329,7 +2329,7 @@ static void
clutter_actor_real_pick (ClutterActor *self,
ClutterPickContext *pick_context)
{
- if (clutter_actor_should_pick_paint (self))
+ if (clutter_actor_should_pick_paint (self, pick_context))
{
ClutterActorBox box = {
.x1 = 0,
@@ -2373,13 +2373,14 @@ clutter_actor_real_pick (ClutterActor *self,
* %FALSE otherwise
*/
gboolean
-clutter_actor_should_pick_paint (ClutterActor *self)
+clutter_actor_should_pick_paint (ClutterActor *self,
+ ClutterPickContext *pick_context)
{
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
if (CLUTTER_ACTOR_IS_MAPPED (self) &&
clutter_actor_has_allocation (self) &&
- (_clutter_context_get_pick_mode () == CLUTTER_PICK_ALL ||
+ (clutter_pick_context_get_mode (pick_context) == CLUTTER_PICK_ALL ||
CLUTTER_ACTOR_IS_REACTIVE (self)))
return TRUE;
diff --git a/clutter/clutter/clutter-actor.h b/clutter/clutter/clutter-actor.h
index 3ffd98f2cb..8bb7bd1745 100644
--- a/clutter/clutter/clutter-actor.h
+++ b/clutter/clutter/clutter-actor.h
@@ -591,7 +591,8 @@ void clutter_actor_set_offscreen_redirect
CLUTTER_EXPORT
ClutterOffscreenRedirect clutter_actor_get_offscreen_redirect (ClutterActor
*self);
CLUTTER_EXPORT
-gboolean clutter_actor_should_pick_paint (ClutterActor
*self);
+gboolean clutter_actor_should_pick_paint (ClutterActor
*self,
+ ClutterPickContext
*pick_context);
CLUTTER_EXPORT
gboolean clutter_actor_is_in_clone_paint (ClutterActor
*self);
CLUTTER_EXPORT
diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c
index 7d5f2bc5d8..89cd7b0146 100644
--- a/src/compositor/meta-surface-actor.c
+++ b/src/compositor/meta-surface-actor.c
@@ -184,7 +184,7 @@ meta_surface_actor_pick (ClutterActor *actor,
ClutterActorIter iter;
ClutterActor *child;
- if (!clutter_actor_should_pick_paint (actor))
+ if (!clutter_actor_should_pick_paint (actor, pick_context))
return;
/* If there is no region then use the regular pick */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]