Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2020-03-09 12:56:51 +0300
committerbubnikv <bubnikv@gmail.com>2020-03-09 12:56:51 +0300
commite83fb4582c1de8477fd10d8675e3b0a1e5ef9767 (patch)
treeacbf829cf19c3928eea35f764879ddcdda5bf24a /src/slic3r/GUI/RemovableDriveManager.hpp
parentec75b760b8e7277ed90f0e4cd7113190db4607bf (diff)
Reworked the eject on unix systems to wait for the return of the
system call to the command line utility and send out the unmount wxWidgets event immediately. Hopefully improves 2.2.0-RC Eject is very slow in Linux (#3795)
Diffstat (limited to 'src/slic3r/GUI/RemovableDriveManager.hpp')
-rw-r--r--src/slic3r/GUI/RemovableDriveManager.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/slic3r/GUI/RemovableDriveManager.hpp b/src/slic3r/GUI/RemovableDriveManager.hpp
index 3b808d9d7..7ada13e5a 100644
--- a/src/slic3r/GUI/RemovableDriveManager.hpp
+++ b/src/slic3r/GUI/RemovableDriveManager.hpp
@@ -65,6 +65,8 @@ public:
// Verify whether the path provided is on removable media. If so, save the path for further eject and return true, otherwise return false.
bool set_and_verify_last_save_path(const std::string &path);
// Eject drive of a file set by set_and_verify_last_save_path().
+ // On Unix / OSX, the function blocks and sends out the EVT_REMOVABLE_DRIVE_EJECTED event on success.
+ // On Windows, the function does not block, and the eject is detected in the background thread.
void eject_drive();
struct RemovableDrivesStatus {
@@ -102,7 +104,9 @@ private:
// When user requested an eject, the drive to be forcefuly ejected is stored here, so the next update will
// recognize that the eject was finished with success and an eject event is sent out.
// guarded with m_drives_mutex
+#ifdef WIN32
DriveData m_drive_data_last_eject;
+#endif // WIN32
mutable tbb::mutex m_drives_mutex;
// Returns drive path (same as path in DriveData) if exists otherwise empty string.