-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix/drag and drop on linux #19232
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
Open
mikekrylov
wants to merge
15
commits into
AvaloniaUI:master
Choose a base branch
from
mikekrylov:fix/DragAndDropOnLinux
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix/drag and drop on linux #19232
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
a5fef8e
DropTarget
mikekrylov 61c8405
Drag Source
mikekrylov 9fc385c
drag source - INCR
mikekrylov 747b3f0
DropTarget - data load on Enter
mikekrylov 261c77c
Data on get and serialization
mikekrylov ccd3fa2
remove BinaryFormatter
mikekrylov be11142
drop between same app
mikekrylov 5b8953c
same app dnd optimization
mikekrylov cfdf0d9
Merge branch 'AvaloniaUI:master' into fix/DragAndDropOnLinux
mikekrylov 6657f81
switching to IDataTransfer
mikekrylov 743ad71
Null character fix
mikekrylov 6df4a8c
dispose improvement
mikekrylov 825b373
Merge branch 'master' into fix/DragAndDropOnLinux
MrJul 7eace14
Cursour fix
mikekrylov 79367d7
Merge branch 'fix/DragAndDropOnLinux' of https://github.com/mikekrylo…
mikekrylov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| using System; | ||
| using Avalonia.Input; | ||
|
|
||
| namespace Avalonia.X11 | ||
| { | ||
| internal static class DragDropEffectsExtensions | ||
| { | ||
| public static DragDropEffects ConvertDropEffect(this X11Atoms atoms, IntPtr effect) | ||
| { | ||
| DragDropEffects result = DragDropEffects.None; | ||
| if (((uint)effect & (uint)(atoms.XdndActionCopy)) == (uint)atoms.XdndActionCopy) | ||
| result |= DragDropEffects.Copy; | ||
| if (((uint)effect & (uint)(atoms.XdndActionMove)) == (uint)atoms.XdndActionMove) | ||
| result |= DragDropEffects.Move; | ||
| if (((uint)effect & (uint)(atoms.XdndActionLink)) == (uint)atoms.XdndActionLink) | ||
| result |= DragDropEffects.Link; | ||
| return result; | ||
| } | ||
|
|
||
| public static IntPtr ConvertDropEffect(this X11Atoms atoms, DragDropEffects operation) | ||
| { | ||
| uint result = (uint)IntPtr.Zero; | ||
| if (operation.HasAllFlags(DragDropEffects.Copy)) | ||
| result |= (uint)atoms.XdndActionCopy; | ||
| if (operation.HasAllFlags(DragDropEffects.Move)) | ||
| result |= (uint)atoms.XdndActionMove; | ||
| if (operation.HasAllFlags(DragDropEffects.Link)) | ||
| result |= (uint)atoms.XdndActionLink; | ||
| return (IntPtr)result; | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
/.nuke/temp/instead