Opened 3 years ago

Closed 2 months ago

#14726 closed defect (fixed)

Impossible to select whether to copy or move in dnd operations under OSX

Reported by: agrawal.raj Owned by: Dimitri Schoolwerth <dimitri@…>
Priority: normal Milestone:
Component: wxOSX (any toolkit) Version: stable-latest
Keywords: drag and drop Cc:
Blocked By: Blocking:
Patch: no

Description

Hi,

I want to drag and drop text in file. For this I have found a sample application named as dnd (wxWidgets/sample) in c++. After running the same application I have found that whenever I drag and drop ( with or without pressing ctrl key), copy image only come. I never get move image.
On linux it is working fine but on mac I am getting above issue. Please assist me to solve this.

Thanks

Change History (8)

comment:1 follow-up: Changed 3 years ago by vadz

  • Priority changed from critical to normal
  • Status changed from new to infoneeded_new

Are you dragging to or from the dnd sample? And do you drag text or file?

Please describe the steps needed to reproduce the problem exactly.

comment:2 in reply to: ↑ 1 Changed 3 years ago by agrawal.raj

  • Status changed from infoneeded_new to new

Replying to vadz:

Are you dragging to or from the dnd sample? And do you drag text or file?

Please describe the steps needed to reproduce the problem exactly.

I am dragging and drop inside the application. I am dragging the text.
Steps are:

  1. Build and run the dnd sample application.
  2. You just drag the text and move to above the mouse above where you want to drop.You will see that you will get the copy image but you should get move image.

Please let me know if you could not reproduce at you end.

comment:3 Changed 3 years ago by vadz

  • Status changed from new to confirmed
  • Summary changed from Issue in drag and drop text to Impossible to select whether to copy or move in dnd operations under OSX

The text is indeed always copied. But then I don't even know how are you supposed to select whether it should be moved or copied under OS X, pressing Control or Cmd key doesn't seem to change anything so does anybody know how do you select, from the user point of view, between these operations?

comment:4 Changed 3 years ago by robind

I don't know if dragging text follows the same pattern, but for dragging files the Option (alt) key is usually used to indicate a Copy operation, and without the option key it will move.

comment:5 Changed 3 years ago by agrawal.raj

Yes, dragging text also follow the same pattern.

comment:6 Changed 3 years ago by vadz

I can reproduce it. I don't know enough about drag and drop under OS X to see what is the problem here however unfortunately.

comment:7 Changed 2 months ago by Dimitri Schoolwerth <dimitri@…>

In f40e8bff6969ab283cf58080a073c4ec5a90a5d8/git-wxWidgets:

Fix mouse cursor not changing on OS X during DND

The cursor almost always looks like the one used for copying. Add
missing breaks in a switch statement to fix this.

See #14726.

comment:8 Changed 2 months ago by Dimitri Schoolwerth <dimitri@…>

  • Owner set to Dimitri Schoolwerth <dimitri@…>
  • Resolution set to fixed
  • Status changed from confirmed to closed

In 3f94084e299eb48403f6e6b7692c03cfb9f70b2a/git-wxWidgets:

Add DND move support on OS X

The drag mask passed by Cocoa is conservative and doesn't include
NSDragOperationMove which was added later. Override
draggingSourceOperationMaskForLocal to include that flag if it's wanted.

This also moving of text the default behaviour.

Closes #13819.
Closes #14726.

Note: See TracTickets for help on using tickets.