[gnome-shell] StContainer: simplify focus navigation
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] StContainer: simplify focus navigation
- Date: Tue, 8 Mar 2011 14:38:16 +0000 (UTC)
commit 84eb66d5aab0788f8ddfb2158e1af474f574de2d
Author: Dan Winship <danw gnome org>
Date: Mon Mar 7 14:14:02 2011 -0500
StContainer: simplify focus navigation
When navigating from a non-immediate descendant of a container, we
were attempting to use clutter_actor_get_transformed_position() to get
the exact position of that actor relative to the container, but this
did not really make sense, since we would be using the position of
the intermediate container when navigating back.
https://bugzilla.gnome.org/show_bug.cgi?id=644134
src/st/st-container.c | 18 ++----------------
1 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/src/st/st-container.c b/src/st/st-container.c
index 2f7d095..24430d0 100644
--- a/src/st/st-container.c
+++ b/src/st/st-container.c
@@ -646,23 +646,9 @@ st_container_navigate_focus (StWidget *widget,
* any child is inconsistently scaled, then the focus chain will
* probably be unpredictable.
*/
- if (from)
+ if (focus_child)
{
- if (from == focus_child)
- clutter_actor_get_allocation_box (focus_child, &sort_data.box);
- else
- {
- float cx, cy, fx, fy, fw, fh;
-
- clutter_actor_get_transformed_position (CLUTTER_ACTOR (container), &cx, &cy);
- clutter_actor_get_transformed_position (from, &fx, &fy);
- clutter_actor_get_transformed_size (from, &fw, &fh);
-
- sort_data.box.x1 = fx - cx;
- sort_data.box.x2 = fx - cx + fw;
- sort_data.box.y1 = fy - cy;
- sort_data.box.y2 = fy - cy + fh;
- }
+ clutter_actor_get_allocation_box (focus_child, &sort_data.box);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]