[gnome-shell/gbsneto/graphene-ray: 4/4] Adapt to pick changes
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/graphene-ray: 4/4] Adapt to pick changes
- Date: Mon, 26 Oct 2020 13:34:41 +0000 (UTC)
commit 69516a52c606277ba0e6ee00381d5a49925a8052
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Oct 17 12:34:22 2020 -0300
Adapt to pick changes
It turns out, StViewport's pick implementation was broken, since
Clutter stopped reading clipping from the framebuffer. Rejoice with
bugfixing by removing code!
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1470
src/st/st-viewport.c | 23 ++++-------------------
1 file changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/src/st/st-viewport.c b/src/st/st-viewport.c
index 864b044045..3ed2d89e13 100644
--- a/src/st/st-viewport.c
+++ b/src/st/st-viewport.c
@@ -434,39 +434,24 @@ st_viewport_pick (ClutterActor *actor,
ClutterActorBox allocation_box;
ClutterActorBox content_box;
ClutterActor *child;
- CoglFramebuffer *fb = clutter_pick_context_get_framebuffer (pick_context);
-
- get_border_paint_offsets (viewport, &x, &y);
- if (x != 0 || y != 0)
- {
- cogl_framebuffer_push_matrix (fb);
- cogl_framebuffer_translate (fb, (int)x, (int)y, 0);
- }
CLUTTER_ACTOR_CLASS (st_viewport_parent_class)->pick (actor, pick_context);
- if (x != 0 || y != 0)
- cogl_framebuffer_pop_matrix (fb);
-
if (clutter_actor_get_n_children (actor) == 0)
return;
clutter_actor_get_allocation_box (actor, &allocation_box);
st_theme_node_get_content_box (theme_node, &allocation_box, &content_box);
+ get_border_paint_offsets (viewport, &x, &y);
+
content_box.x1 += x;
content_box.y1 += y;
content_box.x2 += x;
content_box.y2 += y;
if (priv->hadjustment || priv->vadjustment)
- {
- cogl_framebuffer_push_rectangle_clip (fb,
- (int)content_box.x1,
- (int)content_box.y1,
- (int)content_box.x2,
- (int)content_box.y2);
- }
+ clutter_pick_context_push_clip (pick_context, &content_box);
for (child = clutter_actor_get_first_child (actor);
child != NULL;
@@ -474,7 +459,7 @@ st_viewport_pick (ClutterActor *actor,
clutter_actor_pick (child, pick_context);
if (priv->hadjustment || priv->vadjustment)
- cogl_framebuffer_pop_clip (fb);
+ clutter_pick_context_pop_clip (pick_context);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]