Accepting request 48551 from home:vuntz:branches:GNOME:Factory

OBS-URL: https://build.opensuse.org/request/show/48551
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=32
This commit is contained in:
Vincent Untz 2010-09-21 08:58:18 +00:00 committed by Git OBS Bridge
parent 032e69d595
commit d79251ef50
3 changed files with 156 additions and 0 deletions

View File

@ -0,0 +1,147 @@
From 3fb7cce80fa18315d81619fa511a057b1c3b6131 Mon Sep 17 00:00:00 2001
From: Adel Gadllah <adel.gadllah@gmail.com>
Date: Fri, 16 Jul 2010 20:24:22 +0000
Subject: Drop custom ClutterActor.contains
Clutter 1.4 does provides a native implementation
https://bugzilla.gnome.org/show_bug.cgi?id=624571
---
diff --git a/js/ui/environment.js b/js/ui/environment.js
index 22f8e19..6bab830 100644
--- a/js/ui/environment.js
+++ b/js/ui/environment.js
@@ -82,11 +82,6 @@ function init() {
Clutter.Actor.prototype.toString = function() {
return St.describe_actor(this);
};
- Clutter.Actor.prototype.contains = function(child) {
- while (child != null && child != this)
- child = child.get_parent();
- return child != null;
- };
_blockMethod('Clutter.Event.get_state', 'Shell.get_event_state',
'gjs\'s handling of Clutter.ModifierType is broken. See bug 597292.');
--
cgit v0.8.3.1
From 766b5b801c1a23d1e8c346f29664f3a68ffe4816 Mon Sep 17 00:00:00 2001
From: Florian Müllner <fmuellner@gnome.org>
Date: Tue, 10 Aug 2010 08:52:18 +0000
Subject: [St] Remove _st_actor_contains()
The function has been upstreamed as clutter_actor_contains() - with
the switch to clutter-1.4 it is now available to the Shell, so it
is no longer necessary to keep a copy in-tree.
https://bugzilla.gnome.org/show_bug.cgi?id=626512
---
diff --git a/src/st/st-clickable.c b/src/st/st-clickable.c
index abed5be..38cc41f 100644
--- a/src/st/st-clickable.c
+++ b/src/st/st-clickable.c
@@ -121,7 +121,7 @@ st_clickable_button_press_event (ClutterActor *actor,
if (self->priv->held)
return TRUE;
- if (!_st_actor_contains (actor, event->source))
+ if (!clutter_actor_contains (actor, event->source))
return FALSE;
self->priv->held = TRUE;
@@ -148,7 +148,7 @@ st_clickable_button_release_event (ClutterActor *actor,
self->priv->held = FALSE;
clutter_ungrab_pointer ();
- if (!_st_actor_contains (actor, event->source))
+ if (!clutter_actor_contains (actor, event->source))
return FALSE;
set_pressed (self, FALSE);
diff --git a/src/st/st-entry.c b/src/st/st-entry.c
index 7da2886..7c4170c 100644
--- a/src/st/st-entry.c
+++ b/src/st/st-entry.c
@@ -584,7 +584,7 @@ st_entry_enter_event (ClutterActor *actor,
{
StEntryPrivate *priv = ST_ENTRY_PRIV (actor);
- if (_st_actor_contains (actor, event->source)
+ if (clutter_actor_contains (actor, event->source)
&& priv->hint && priv->hint_visible)
{
st_widget_set_hover (ST_WIDGET (actor), TRUE);
@@ -597,7 +597,7 @@ static gboolean
st_entry_leave_event (ClutterActor *actor,
ClutterCrossingEvent *event)
{
- if (!_st_actor_contains (actor, event->related))
+ if (!clutter_actor_contains (actor, event->related))
st_widget_set_hover (ST_WIDGET (actor), FALSE);
return CLUTTER_ACTOR_CLASS (st_entry_parent_class)->leave_event (actor, event);
diff --git a/src/st/st-private.c b/src/st/st-private.c
index 248c703..c1614b0 100644
--- a/src/st/st-private.c
+++ b/src/st/st-private.c
@@ -320,12 +320,3 @@ _st_set_text_from_style (ClutterText *text,
clutter_text_set_line_alignment (text, (PangoAlignment) align);
}
}
-
-gboolean
-_st_actor_contains (ClutterActor *actor,
- ClutterActor *child)
-{
- while (child != NULL && child != actor)
- child = clutter_actor_get_parent (child);
- return child != NULL;
-}
diff --git a/src/st/st-private.h b/src/st/st-private.h
index eecd7fd..8368665 100644
--- a/src/st/st-private.h
+++ b/src/st/st-private.h
@@ -72,7 +72,4 @@ void _st_allocate_fill (StWidget *parent,
void _st_set_text_from_style (ClutterText *text,
StThemeNode *theme_node);
-gboolean _st_actor_contains (ClutterActor *actor,
- ClutterActor *child);
-
#endif /* __ST_PRIVATE_H__ */
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index eb976ac..d4850a7 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -568,7 +568,7 @@ st_widget_enter (ClutterActor *actor,
if (priv->track_hover)
{
- if (_st_actor_contains (actor, event->source))
+ if (clutter_actor_contains (actor, event->source))
st_widget_set_hover (ST_WIDGET (actor), TRUE);
else
{
@@ -594,7 +594,7 @@ st_widget_leave (ClutterActor *actor,
if (priv->track_hover)
{
- if (!_st_actor_contains (actor, event->related))
+ if (!clutter_actor_contains (actor, event->related))
st_widget_set_hover (ST_WIDGET (actor), FALSE);
}
@@ -1589,7 +1589,10 @@ st_widget_sync_hover (StWidget *widget)
pointer = clutter_device_manager_get_core_device (device_manager,
CLUTTER_POINTER_DEVICE);
pointer_actor = clutter_input_device_get_pointer_actor (pointer);
- st_widget_set_hover (widget, _st_actor_contains (CLUTTER_ACTOR (widget), pointer_actor));
+ if (pointer_actor)
+ st_widget_set_hover (widget, clutter_actor_contains (CLUTTER_ACTOR (widget), pointer_actor));
+ else
+ st_widget_set_hover (widget, FALSE);
}
/**
--
cgit v0.8.3.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Sep 20 13:01:39 CEST 2010 - vuntz@opensuse.org
- Add gnome-shell-fix-recent-clutter.patch: gnome-shell failed to
run because it was using some API gone in clutter 1.3.14.
-------------------------------------------------------------------
Sat Sep 18 13:30:33 CEST 2010 - vuntz@opensuse.org

View File

@ -30,6 +30,8 @@ Source1: gnome-shell-session
Source2: gnome3.desktop
# PATCH-FIX-UPSTREAM gnome-shell-fix-recent-gtk3.patch vuntz@opensuse.org -- Fix build with recent GTK+ 3, taken from git
Patch0: gnome-shell-fix-recent-gtk3.patch
# PATCH-FIX-UPSTREAM gnome-shell-fix-recent-clutter.patch vuntz@opensuse.org -- Do not use API gone in recent clutter, taken from git
Patch1: gnome-shell-fix-recent-clutter.patch
BuildRequires: intltool
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(clutter-1.0)
@ -64,6 +66,7 @@ documents, and organizing open windows in GNOME.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%configure \