Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag and Drop Text Copies Instead of Cuts #4

Open
codebrainz opened this issue Apr 6, 2015 · 14 comments
Open

Drag and Drop Text Copies Instead of Cuts #4

codebrainz opened this issue Apr 6, 2015 · 14 comments

Comments

@codebrainz
Copy link
Member

I'm not sure if it's just my configuration, but when I select text and then drag it to a new place, it makes a copy in the destination and leaves the original text. I tried it in "TextEdit" and it behaves same as Linux, so it seems like something might be wrong.

@elextr
Copy link
Member

elextr commented Apr 6, 2015

Maybe it should be using Scintilla for OSX?

On 7 April 2015 at 07:10, Matthew Brush notifications@github.com wrote:

I'm not sure if it's just my configuration, but when I select text and
then drag it to a new place, it makes a copy in the destination and leaves
the original text. I tried it in "TextEdit" and it behaves same as Linux,
so it seems like something might be wrong.


Reply to this email directly or view it on GitHub
#4.

@codebrainz
Copy link
Member Author

On 2015-04-06 5:58 PM, elextr wrote:

Maybe it should be using Scintilla for OSX?

Patches welcome on porting Geany to Cocoa and maintaining it.

When you're done you can start working on the Win32 port :)

@elextr
Copy link
Member

elextr commented Apr 7, 2015

heh, sure put it "somebody"s list :)

What I was saying is that I wouldn't be surprised if there are Scintilla glitches using GTK scintilla on OSX, I doubt Neil tests that combination since Scintilla has a native OSX backend. Not sure we can mix OSX Scintilla with GTK everything else though.

@techee
Copy link
Member

techee commented Apr 12, 2015

This one actually looks like a GTK bug - I put some traces to Scintilla and Gtk seems to behave strange regarding dnd. I think there are some dnd patches in gtk-osx which are applied on top of gtk but I guess not everything works.

@elextr Using the Cocoa Scintilla backend would be nice (I have bought SciTE OS X version mostly as a means of donation/thanks to Neil and it looks really nice with smooth scrolling and native behavior) but for Geany it requires bridging the GTK API to the native OS X API which means translating events from one to the other and this is just too much work. But as Matthew said, patches are welcome :-).

@elextr
Copy link
Member

elextr commented Apr 12, 2015

@techee what I was actually saying is that Neil is unlikely to extensively (if at all) test GTK scintilla on OSX since he has a proper backend for that :)

@techee
Copy link
Member

techee commented Nov 20, 2021

I just tried gtk3-demo and dnd seems to copy text there too so this bug isn't related to Scintilla.

@elextr
Copy link
Member

elextr commented Nov 20, 2021

What does gtk3-demo on linux do?

@techee
Copy link
Member

techee commented Nov 20, 2021

I just tried drag and drop selected test in GtkEntry in the demo on macOS and it copies text. I haven't tried gtk3-demo on linux but drag and drop selected text in GtkEntry moves the text. It seems it's some problem with mouse input handling on macOS.

@elextr
Copy link
Member

elextr commented Nov 20, 2021

I haven't tried gtk3-demo on linux but drag and drop selected text in GtkEntry moves the text.

Here (on Linux) DND in the same entry moves text, but DND between two entries [Edit: or to an external program] copies text.

DND within Scintilla moves text, but DND to another widget (eg scribble) or external program (this browser) copies text.

That all seems consistent.

@techee
Copy link
Member

techee commented Nov 20, 2021

Here (on Linux) DND in the same entry moves text

Yeah, but on the Mac it copies text within the same entry too (same with Scintilla).

@elextr
Copy link
Member

elextr commented Nov 20, 2021

What is the normal behaviour on Mac for other apps, is it the same as on Linux? If it is then yeah, seems GTK for OSX has a bug.

@techee
Copy link
Member

techee commented Nov 20, 2021

What is the normal behaviour on Mac for other apps, is it the same as on Linux?

Yes.

If it is then yeah, seems GTK for OSX has a bug.

Exactly.

@techee
Copy link
Member

techee commented Apr 1, 2023

The reason for this bug are the /* FIXME: Implement */ stubs of the functions here:

https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gdk/quartz/gdkdnd-quartz.c#L71

The DND GTK API that Scintilla uses just returns incorrect values because of this.

@elextr
Copy link
Member

elextr commented Apr 2, 2023

char* talk(){
/* FIXME Implement */
 return NULL;
}

Look I wrote chatGPT 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants