From e7b65b1fc8cc2c6a1eb3284c4c468db3a6cd3216 Mon Sep 17 00:00:00 2001 From: Netflate Date: Sat, 26 Sep 2026 17:07:29 +0100 Subject: [PATCH] image-copy: Fix non-deterministic dmabuf format order --- src/wayland/handlers/image_copy_capture/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wayland/handlers/image_copy_capture/mod.rs b/src/wayland/handlers/image_copy_capture/mod.rs index 85a01c9a..81f3a671 100644 --- a/src/wayland/handlers/image_copy_capture/mod.rs +++ b/src/wayland/handlers/image_copy_capture/mod.rs @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-3.0-only -use std::{borrow::Borrow, collections::HashMap, sync::Mutex}; +use std::{borrow::Borrow, sync::Mutex}; + +use indexmap::IndexMap; use smithay::{ backend::{ @@ -459,7 +461,7 @@ fn constraints_for_renderer( .dmabuf_render_formats() .iter() .fold( - HashMap::>::new(), + IndexMap::>::new(), |mut map, format| { map.entry(format.code).or_default().push(format.modifier); map