XDND: Use only one constraint for the cursor window position
ClutterBindConstraint now supports POSITION, so use that instead of separate X and Y constraints.
This commit is contained in:
parent
61869d7db1
commit
f6ae48ec70
@ -67,9 +67,7 @@ XdndHandler.prototype = {
|
|||||||
if (!cursorWindow.is_override_redirect())
|
if (!cursorWindow.is_override_redirect())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let constraint_x = new Clutter.BindConstraint({ coordinate : Clutter.BindCoordinate.X,
|
let constraint_position = new Clutter.BindConstraint({ coordinate : Clutter.BindCoordinate.POSITION,
|
||||||
source: cursorWindow});
|
|
||||||
let constraint_y = new Clutter.BindConstraint({ coordinate : Clutter.BindCoordinate.Y,
|
|
||||||
source: cursorWindow});
|
source: cursorWindow});
|
||||||
|
|
||||||
this._cursorWindowClone = new Clutter.Clone({ source: cursorWindow });
|
this._cursorWindowClone = new Clutter.Clone({ source: cursorWindow });
|
||||||
@ -77,8 +75,7 @@ XdndHandler.prototype = {
|
|||||||
Shell.util_set_hidden_from_pick(this._cursorWindowClone, true);
|
Shell.util_set_hidden_from_pick(this._cursorWindowClone, true);
|
||||||
|
|
||||||
// Make sure that the clone has the same position as the source
|
// Make sure that the clone has the same position as the source
|
||||||
this._cursorWindowClone.add_constraint(constraint_x);
|
this._cursorWindowClone.add_constraint(constraint_position);
|
||||||
this._cursorWindowClone.add_constraint(constraint_y);
|
|
||||||
} else {
|
} else {
|
||||||
if (this._cursorWindowClone)
|
if (this._cursorWindowClone)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user