mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
scintilla: improve drag&drop support (#4533)
This commit is contained in:
49
x11-libs/scintilla/patches/scintilla-4.2.0.patchset
Normal file
49
x11-libs/scintilla/patches/scintilla-4.2.0.patchset
Normal file
@@ -0,0 +1,49 @@
|
||||
From e1438fc2e46c2af6340a955ad81c48a9ec1a10dd Mon Sep 17 00:00:00 2001
|
||||
From: X512 <danger_mail@list.ru>
|
||||
Date: Wed, 8 Jan 2020 23:47:41 +0900
|
||||
Subject: [PATCH] fix text drag&drop
|
||||
|
||||
---
|
||||
haiku/ScintillaHaiku.cxx | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/haiku/ScintillaHaiku.cxx b/haiku/ScintillaHaiku.cxx
|
||||
index a47ab50..9335654 100644
|
||||
--- a/haiku/ScintillaHaiku.cxx
|
||||
+++ b/haiku/ScintillaHaiku.cxx
|
||||
@@ -700,8 +700,10 @@ bool ScintillaHaiku::Drop(BMessage* message, const BPoint& point, const BPoint&
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ SetDragPosition(SelectionPosition(Sci::invalidPosition));
|
||||
|
||||
- Point p(static_cast<int>(point.x - offset.x), static_cast<int>(point.y - offset.y + vs.lineHeight / 2));
|
||||
+ Point p(static_cast<int>(point.x), static_cast<int>(point.y));
|
||||
SelectionPosition movePos = SPositionFromLocation(p, false, false, UserVirtualSpace());
|
||||
|
||||
DropAt(movePos, text, textLen, move, isRectangular);
|
||||
@@ -815,13 +817,17 @@ void ScintillaHaiku::MouseMoved(BPoint point, uint32 transit, const BMessage* me
|
||||
const int mod = _ConvertToSciModifiers(modifiers());
|
||||
const Point pt(static_cast<int>(point.x), static_cast<int>(point.y));
|
||||
const int64 when = movedMsg->GetInt64("when", 0) / 1000;
|
||||
+ ButtonMoveWithModifiers(pt, when, mod);
|
||||
switch(transit) {
|
||||
case B_ENTERED_VIEW:
|
||||
case B_INSIDE_VIEW:
|
||||
+ if (message != NULL && message->HasData("text/plain", B_MIME_TYPE)) {
|
||||
+ SetDragPosition(SPositionFromLocation(pt, false, false, UserVirtualSpace()));
|
||||
+ }
|
||||
+ break;
|
||||
case B_EXITED_VIEW:
|
||||
- case B_OUTSIDE_VIEW:
|
||||
- ButtonMoveWithModifiers(pt, when, mod);
|
||||
- break;
|
||||
+ SetDragPosition(SelectionPosition(Sci::invalidPosition));
|
||||
+ break;
|
||||
};
|
||||
}
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -13,7 +13,7 @@ colours and multiple fonts."
|
||||
HOMEPAGE="https://scintilla.org"
|
||||
COPYRIGHT="1998-2019 Neil Hodgson"
|
||||
LICENSE="Scintilla"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://prdownloads.sf.net/scintilla/scintilla${portVersion//\./}.tgz"
|
||||
CHECKSUM_SHA256="8278bc86635c5ddf461d5b006c08d073f5b92829d9ed218879d7b3eb0c8ad50b"
|
||||
SOURCE_DIR="scintilla"
|
||||
@@ -23,6 +23,7 @@ srcGitRev3="b655d76a29b8a9278137c4e1ad681de0b4a51a58"
|
||||
SOURCE_URI_3="https://github.com/KapiX/scintilla-haiku-lexers/archive/$srcGitRev3.tar.gz"
|
||||
CHECKSUM_SHA256_3="8b68fd180742786037f5121b2517a258ebd30b73d16a5721db73e91cd9c316bd"
|
||||
SOURCE_DIR_3="scintilla-haiku-lexers-$srcGitRev3"
|
||||
PATCHES_2="scintilla-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
Reference in New Issue
Block a user