Skip to content

Commit adc3202

Browse files
committed
unused code
1 parent 6290928 commit adc3202

File tree

1 file changed

+0
-75
lines changed

1 file changed

+0
-75
lines changed

src/dbus/a11y_keyboard_monitor.rs

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -220,81 +220,6 @@ impl KeyboardMonitor {
220220
#[derive(Debug)]
221221
struct Modifiers(u32);
222222

223-
enum Event {
224-
GrabKeyboard,
225-
UngrabKeyboard,
226-
WatchKeyboard,
227-
UnwatchKeyboard,
228-
SetKeyGrabs {
229-
virtual_modifiers: Vec<Keysym>,
230-
keystrokes: Vec<(Keysym, Modifiers)>,
231-
},
232-
}
233-
234-
/*
235-
pub fn spawn() -> calloop::channel::Channel<Event> {
236-
let (sender, channel) = calloop::channel::channel();
237-
238-
// TODO: Use calloop executor when it's confirmed to no longer be buggy
239-
std::thread::spawn(|| {
240-
let res = futures_executor::block_on(async {
241-
let context = xkb::Context::new(xkb::CONTEXT_NO_FLAGS);
242-
// XXX
243-
// multiple layout mods?
244-
let keymap = xkb::Keymap::new_from_names(
245-
&context,
246-
"",
247-
"",
248-
"",
249-
"",
250-
None,
251-
xkb::KEYMAP_COMPILE_NO_FLAGS,
252-
)
253-
//xkb::Keymap::new_from_names(&context, "", "pc105", "us", "", None, xkb::KEYMAP_COMPILE_NO_FLAGS)
254-
//xkb::Keymap::new_from_names(&context, "", "pc105", "ru", "", None, xkb::KEYMAP_COMPILE_NO_FLAGS)
255-
//xkb::Keymap::new_from_names(&context, "", "pc105", "es,de,jp", "", None, xkb::KEYMAP_COMPILE_NO_FLAGS)
256-
.unwrap();
257-
let mut mod_names = Vec::new();
258-
for i in 0.. {
259-
let name = keymap.mod_get_name(i);
260-
if name == "" {
261-
break;
262-
}
263-
mod_names.push(name.to_string());
264-
}
265-
dbg!(&mod_names);
266-
267-
let keyboard_monitor = KeyboardMonitor { mod_names };
268-
let _conn = zbus::connection::Builder::session()?
269-
.name("org.freedesktop.a11y.Manager")?
270-
.serve_at("/org/freedesktop/a11y/Manager", keyboard_monitor)?
271-
.build()
272-
.await?;
273-
274-
pending::<zbus::Result<()>>().await
275-
});
276-
if let Err(err) = res {
277-
tracing::error!("Failed to serve `org.freedesktop.a11y.Manager`: {err}");
278-
}
279-
});
280-
281-
channel
282-
}
283-
*/
284-
285-
/*
286-
async fn serve() -> zbus::Result<()> {
287-
let keyboard_monitor = KeyboardMonitor {};
288-
let _conn = zbus::connection::Builder::session()?
289-
.name("org.freedesktop.a11y.Manager")?
290-
.serve_at("/org/freedesktop/a11y/Manager", keyboard_monitor)?
291-
.build()
292-
.await?;
293-
294-
pending::<zbus::Result<()>>().await
295-
}
296-
*/
297-
298223
async fn serve(
299224
clients: Arc<Mutex<Clients>>,
300225
) -> zbus::Result<zbus::Connection> {

0 commit comments

Comments
 (0)