Hi there,
I installed the IDE zed in an AppVM. But when you run it you will be stuck in a blank window and it does not run at all.
Starting it with the command zed --foreground
you can see the error message, which is:
So apparently, zed does not find the xinput mouse pointer device.
The error message stems from this part of code:
fn get_new_pointer_device_states(
xcb_connection: &XCBConnection,
scroll_values_to_preserve: &BTreeMap<xinput::DeviceId, PointerDeviceState>,
) -> BTreeMap<xinput::DeviceId, PointerDeviceState> {
let devices_query_result = xcb_connection
.xinput_xi_query_device(XINPUT_ALL_DEVICES)
.unwrap()
.reply()
.unwrap();
let mut pointer_device_states = BTreeMap::new();
pointer_device_states.extend(
devices_query_result
.infos
.iter()
.filter(|info| is_pointer_device(info.type_))
.filter_map(|info| {
let scroll_data = info
.classes
.iter()
.filter_map(|class| class.data.as_scroll())
.map(|class| *class)
.rev()
.collect::<Vec<_>>();
let old_state = scroll_values_to_preserve.get(&info.deviceid);
let old_horizontal = old_state.map(|state| &state.horizontal);
let old_vertical = old_state.map(|state| &state.vertical);
let horizontal = scroll_data
.iter()
.find(|data| data.scroll_type == xinput::ScrollType::HORIZONTAL)
.map(|data| scroll_data_to_axis_state(data, old_horizontal));
let vertical = scroll_data
.iter()
.find(|data| data.scroll_type == xinput::ScrollType::VERTICAL)
.map(|data| scroll_data_to_axis_state(data, old_vertical));
if horizontal.is_none() && vertical.is_none() {
None
} else {
Some((
info.deviceid,
PointerDeviceState {
horizontal: horizontal.unwrap_or_else(Default::default),
vertical: vertical.unwrap_or_else(Default::default),
},
))
}
}),
);
if pointer_device_states.is_empty() {
log::error!("Found no xinput mouse pointers.");
}
return pointer_device_states;
}
I am not that good in rust, but it looks like the virtual mouse pointer device is a problem for zed:
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ qubesdev id=6 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
Is there anything one could do about that? Help would be appreciated.