Port gnome-shell to the Clutter-1.0 API

- clutter_actor_get_transformed_position()/size() return floats
- clutter_stage_get_actor_at_pos() takes a pick mode
- ClutterTimeline no longer has a concept of frames
- ClutterUnit is now replaced by float
- cogl_texture_new_from_data() signature changed

http://bugzilla.gnome.org/show_bug.cgi?id=585013
This commit is contained in:
Owen W. Taylor
2009-06-06 13:07:41 -04:00
parent 315da57c97
commit 2c7d33bad2
8 changed files with 37 additions and 38 deletions

View File

@ -122,7 +122,9 @@ _Draggable.prototype = {
// Because we want to find out what other actor is located at the current position of this._dragActor,
// we have to temporarily hide this._dragActor.
this._dragActor.hide();
let target = actor.get_stage().get_actor_at_pos(stageX + this._dragOffsetX, stageY + this._dragOffsetY);
let target = actor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL,
stageX + this._dragOffsetX,
stageY + this._dragOffsetY);
this._dragActor.show();
while (target) {
if (target._delegate && target._delegate.handleDragOver) {
@ -156,7 +158,8 @@ _Draggable.prototype = {
// Find a drop target
actor.hide();
let [dropX, dropY] = event.get_coords();
let target = actor.get_stage().get_actor_at_pos(dropX, dropY);
let target = actor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL,
dropX, dropY);
actor.show();
while (target) {
if (target._delegate && target._delegate.acceptDrop) {