Skip to content

Commit

Permalink
dont check if alive
Browse files Browse the repository at this point in the history
  • Loading branch information
pentamassiv committed Oct 25, 2023
1 parent f14d760 commit 0102f03
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/linux/wayland.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::collections::VecDeque;
use std::convert::TryInto;
use std::env;
use std::os::unix::io::AsFd;
use std::os::unix::net::UnixStream;
use std::path::PathBuf;
use std::time::Instant;
use std::{collections::VecDeque, sync::Arc};

use log::{debug, error, trace, warn};
use wayland_client::{
Expand Down Expand Up @@ -190,7 +190,7 @@ impl Con {
fn send_key_event(&mut self, keycode: Keycode, direction: Direction) -> InputResult<()> {
if self.virtual_keyboard.is_some() {
let vk = self.virtual_keyboard.take().expect("not possible");
is_alive(&vk)?;
// is_alive(&vk)?;
let time = self.get_time();
let keycode = keycode - 8; // Adjust by 8 due to the xkb/xwayland requirements

Expand All @@ -215,7 +215,7 @@ impl Con {
fn send_modifier_event(&mut self, modifiers: ModifierBitflag) -> InputResult<()> {
if self.virtual_keyboard.is_some() {
let vk = self.virtual_keyboard.take().expect("not possible");
is_alive(&vk)?;
// is_alive(&vk)?;
trace!("vk.modifiers({modifiers}, 0, 0, 0)");
vk.modifiers(0, 0, modifiers, 0);
self.flush()?;
Expand All @@ -233,7 +233,7 @@ impl Con {
trace!("apply_keymap(&mut self)");
if self.virtual_keyboard.is_some() {
let vk = self.virtual_keyboard.take().expect("not possible");
is_alive(&vk)?;
// is_alive(&vk)?;
let Ok(keymap_res) = self.keymap.regenerate() else {
return Err(InputError::Mapping(
"unable to regenerate keymap".to_string(),
Expand Down Expand Up @@ -553,7 +553,7 @@ impl KeyboardControllableNext for Con {
if self.input_method.is_some() {
let (im, mut serial) = self.input_method.take().expect("not possible");

is_alive(&im)?;
// is_alive(&im)?;
trace!("fast text input with imput_method protocol");
im.commit_string(text.to_string());
im.commit(serial);
Expand Down

0 comments on commit 0102f03

Please sign in to comment.