[gnome-shell/gbsneto/custom-icon-positions: 18/44] appDisplay: Ignore dragging over leeways
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/custom-icon-positions: 18/44] appDisplay: Ignore dragging over leeways
- Date: Mon, 6 Jul 2020 22:51:07 +0000 (UTC)
commit 431ef6c20ea2443ef87c161d83e199720cb5b3b0
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon May 25 16:00:23 2020 -0300
appDisplay: Ignore dragging over leeways
The leeways are parts of the icon that ignore incoming drag
events. This is how IconGrid and IconGridLayout treat it, and
this is how the icons should treat themselves too.
Make AppIcon ignore dragging over the left and right leeways.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
js/ui/appDisplay.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 833bb997b6..9f43121f58 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -2176,13 +2176,17 @@ var AppIcon = GObject.registerClass({
return DND.DragMotionResult.CONTINUE;
}
- handleDragOver(source) {
+ handleDragOver(source, _actor, x) {
if (source == this)
return DND.DragMotionResult.NO_DROP;
if (!this._canAccept(source))
return DND.DragMotionResult.CONTINUE;
+ if (x < IconGrid.LEFT_DIVIDER_LEEWAY ||
+ x + IconGrid.RIGHT_DIVIDER_LEEWAY > this.width)
+ return DND.DragMotionResult.CONTINUE;
+
this._setHoveringByDnd(true);
return DND.DragMotionResult.MOVE_DROP;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]