aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/xwayland
diff options
context:
space:
mode:
Diffstat (limited to 'src/xwayland')
-rw-r--r--src/xwayland/XDataSource.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/xwayland/XDataSource.cpp b/src/xwayland/XDataSource.cpp
index 98e0701b..f4059ee1 100644
--- a/src/xwayland/XDataSource.cpp
+++ b/src/xwayland/XDataSource.cpp
@@ -49,10 +49,16 @@ std::vector<std::string> CXDataSource::mimes() {
void CXDataSource::send(const std::string& mime, uint32_t fd) {
xcb_atom_t mimeAtom = 0;
- for (size_t i = 0; i < mimeTypes.size(); ++i) {
- if (mimeTypes.at(i) == mime) {
- mimeAtom = mimeAtoms.at(i);
- break;
+ if (mime == "text/plain")
+ mimeAtom = HYPRATOMS["TEXT"];
+ else if (mime == "text/plain;charset=utf-8")
+ mimeAtom = HYPRATOMS["UTF8_STRING"];
+ else {
+ for (size_t i = 0; i < mimeTypes.size(); ++i) {
+ if (mimeTypes.at(i) == mime) {
+ mimeAtom = mimeAtoms.at(i);
+ break;
+ }
}
}