mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 14:45:59 +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) {
|
||||
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) {
|
||||
if (mimeTypes.at(i) == mime) {
|
||||
mimeAtom = mimeAtoms.at(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!mimeAtom) {
|
||||
Debug::log(ERR, "[XDataSource] mime atom not found");
|
||||
|
|
Loading…
Reference in a new issue