From f6ae48ec70dc323f49e1ca3d2b093b6323e6a9da Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Wed, 26 Jan 2011 20:38:22 +0100 Subject: [PATCH] XDND: Use only one constraint for the cursor window position ClutterBindConstraint now supports POSITION, so use that instead of separate X and Y constraints. --- js/ui/xdndHandler.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/js/ui/xdndHandler.js b/js/ui/xdndHandler.js index 02755591f..d33f8afce 100644 --- a/js/ui/xdndHandler.js +++ b/js/ui/xdndHandler.js @@ -67,18 +67,15 @@ XdndHandler.prototype = { if (!cursorWindow.is_override_redirect()) return; - let constraint_x = new Clutter.BindConstraint({ coordinate : Clutter.BindCoordinate.X, - source: cursorWindow}); - let constraint_y = new Clutter.BindConstraint({ coordinate : Clutter.BindCoordinate.Y, - source: cursorWindow}); + let constraint_position = new Clutter.BindConstraint({ coordinate : Clutter.BindCoordinate.POSITION, + source: cursorWindow}); this._cursorWindowClone = new Clutter.Clone({ source: cursorWindow }); global.overlay_group.add_actor(this._cursorWindowClone); Shell.util_set_hidden_from_pick(this._cursorWindowClone, true); // Make sure that the clone has the same position as the source - this._cursorWindowClone.add_constraint(constraint_x); - this._cursorWindowClone.add_constraint(constraint_y); + this._cursorWindowClone.add_constraint(constraint_position); } else { if (this._cursorWindowClone) {