[gnome-shell] dnd: Also consider indirect scaling of dnd actor
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dnd: Also consider indirect scaling of dnd actor
- Date: Wed, 17 Feb 2021 10:16:26 +0000 (UTC)
commit a24a16c5ac35c08990f483b0b9575f1581b6fcfb
Author: Sebastian Keller <skeller gnome org>
Date: Wed Feb 17 01:00:27 2021 +0100
dnd: Also consider indirect scaling of dnd actor
Some actors don't have the scale applied to them directly but are
children of a scaled parent. In those case just retaining the scale will
not be enough and the scale of the actor itself needs to be adjusted
when reparenting. This could for example be seen when dragging windows
from the workspace thumbnails.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1687>
js/ui/dnd.js | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/js/ui/dnd.js b/js/ui/dnd.js
index 6b4a983823..0e972a13d7 100644
--- a/js/ui/dnd.js
+++ b/js/ui/dnd.js
@@ -400,6 +400,9 @@ var _Draggable = class _Draggable {
scaledWidth = transformedExtents.get_width();
scaledHeight = transformedExtents.get_height();
+ this._dragActor.scale_x = scaledWidth / this._dragOrigWidth;
+ this._dragActor.scale_y = scaledHeight / this._dragOrigHeight;
+
this._dragOrigParent.remove_actor(this._dragActor);
Main.uiGroup.add_child(this._dragActor);
Main.uiGroup.set_child_above_sibling(this._dragActor, null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]