mirror of
https://github.com/FranP-code/wintile.git
synced 2025-10-13 00:33:46 +00:00
Set preview x,y when not yet animating
Setting it on every `showPreview` invocation leads to flickering, since the function is called multiple times for each animation.
This commit is contained in:
@@ -693,10 +693,12 @@ var preview = new St.BoxLayout({
|
||||
Main.uiGroup.add_actor(preview);
|
||||
|
||||
function showPreview(loc, _x, _y, _w, _h) {
|
||||
if (Tweener.getTweenCount(preview) == 0) {
|
||||
let [x, y, _] = global.get_pointer();
|
||||
preview.x = x;
|
||||
preview.y = y;
|
||||
}
|
||||
Tweener.removeTweens(preview);
|
||||
let [x, y, _] = global.get_pointer();
|
||||
preview.x = x;
|
||||
preview.y = y;
|
||||
preview.visible = true;
|
||||
preview.loc = loc;
|
||||
Tweener.addTween(preview, {
|
||||
|
||||
Reference in New Issue
Block a user