#679 SciTE should on drag op releasing drop src soon

Completed
closed
Neil Hodgson
SciTE (231)
2
2010-06-02
2010-04-13
Hans
No

The drop source is blocked, when a file is dropped on SciTE until it loads it.

Early releasing the drag handle the drop source is responsive soon.

This is especially needed for large files, when the opening takes noticeable amount of time.

Discussion

1 2 > >> (Page 1 of 2)
  • Hans
    Hans
    2010-04-13

    Sample implementation, see SCITE_DROP

     
    Attachments
  • Neil Hodgson
    Neil Hodgson
    2010-04-13

    Looks to me like a minor issue with a heavy maintenance cost in terms of complexity. Pointers are posted as messages and may leak with multiple in-transit.

    Don't you avoid source blockage by calling ::DragFinish before any Open()s?

     
  • Neil Hodgson
    Neil Hodgson
    2010-04-13

    • priority: 5 --> 2
    • assigned_to: nobody --> nyamatongwe
     
  • Hans
    Hans
    2010-04-14

    I tested it again, calling ::DragFinish is not sufficient. The WM_DROP message callback must be returned.
    Try to add Sleep(5000) in the message handler.
    It seem it has to do with focus switching by the window manager.

    You are right with multiple transits though.

     
  • Neil Hodgson
    Neil Hodgson
    2010-04-15

    dropFilesArray should just be a std::queue of GUI::gui_string with DropFiles adding to the queue and SCITE_DROP popping them and opening the files.

     
  • Hans
    Hans
    2010-04-15

    new patch with deque

     
    Attachments
  • Hans
    Hans
    2010-04-15

    new patch with deque

     
    Attachments
  • Hans
    Hans
    2010-04-15

    I have changed the implementation as suggested, at time of my original implementation using c++ std lib in SciTE was rare.

     
  • Neil Hodgson
    Neil Hodgson
    2010-04-16

    Since pathDropped is an array of 2 byte characters and the third argument to DragQueryFile is number of characters, not bytes, sizeof can't be used as it says the buffer is twice as large as it really is.

    Committed for drop files case but not including paste files. Minor edits like changing name dropFilesBuffer to dropFilesQueue.

     
  • Neil Hodgson
    Neil Hodgson
    2010-04-16

    • milestone: --> Completed
     
1 2 > >> (Page 1 of 2)