refactor arg_dropfiles with std::filesystem::path

This commit is contained in:
Jinhao
2019-03-03 07:07:58 +08:00
parent 71f57bbf92
commit f137f751c0
4 changed files with 12 additions and 11 deletions

View File

@@ -1238,7 +1238,7 @@ namespace detail
0, AnyPropertyType, &type, &format, &len,
&dummy_bytes_left, &data))
{
auto files = new std::vector<std::string>;
auto files = new std::vector<std::filesystem::path>;
std::stringstream ss(reinterpret_cast<char*>(data));
while(true)
@@ -1258,7 +1258,7 @@ namespace detail
break;
}
files->push_back(file);
files->emplace_back(file);
}
if(files->size())

View File

@@ -3,6 +3,7 @@
#include <X11/Xlib.h>
#include <vector>
#include <nana/deploy.hpp>
#include <nana/filesystem/filesystem.hpp>
namespace nana
{
@@ -29,7 +30,7 @@ namespace detail
Window window;
int x;
int y;
std::vector<std::string> * files;
std::vector<std::filesystem::path> * files;
}mouse_drop;
}u;
};