mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-30 03:06:00 +01:00
parent
2031af82fa
commit
069a21a34e
1 changed files with 10 additions and 4 deletions
|
@ -49,12 +49,18 @@ std::vector<std::string> CXDataSource::mimes() {
|
||||||
void CXDataSource::send(const std::string& mime, uint32_t fd) {
|
void CXDataSource::send(const std::string& mime, uint32_t fd) {
|
||||||
xcb_atom_t mimeAtom = 0;
|
xcb_atom_t mimeAtom = 0;
|
||||||
|
|
||||||
|
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) {
|
for (size_t i = 0; i < mimeTypes.size(); ++i) {
|
||||||
if (mimeTypes.at(i) == mime) {
|
if (mimeTypes.at(i) == mime) {
|
||||||
mimeAtom = mimeAtoms.at(i);
|
mimeAtom = mimeAtoms.at(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!mimeAtom) {
|
if (!mimeAtom) {
|
||||||
Debug::log(ERR, "[XDataSource] mime atom not found");
|
Debug::log(ERR, "[XDataSource] mime atom not found");
|
||||||
|
|
Loading…
Reference in a new issue