mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 05:09:49 +01:00
parent
2031af82fa
commit
069a21a34e
1 changed files with 10 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue