clipboard: bind the first wl_seat only (#3989)

port 2.0
This commit is contained in:
xibielemn authored and GitHub committed 2026-10-28 17:55:25 -04:00
1 parent e4c4fe44ea
commit df8b1d85ca
3 files changed
+128 -16

No files matched your search

+4 -3
View File
@@ -119,9 +119,10 @@ Singleton {
(entry.pinned ? pinned : unpinned).push(entry);
}
const byIdDesc = (a, b) => b.id - a.id;
pinned.sort(byIdDesc);
unpinned.sort(byIdDesc);
// JS Date keeps milliseconds only, so rows sharing one get id as the tie-break.
const byTimestampDesc = (a, b) => (new Date(b.timestamp) - new Date(a.timestamp)) || (b.id - a.id);
pinned.sort(byTimestampDesc);
unpinned.sort(byTimestampDesc);
pinnedEntries = pinned;
unpinnedEntries = unpinned;