remove debug print

Junkui Zhang created

Change summary

crates/gpui/src/platform/linux/wayland/client.rs | 6 ------
crates/gpui/src/platform/linux/x11/client.rs     | 7 -------
2 files changed, 13 deletions(-)

Detailed changes

crates/gpui/src/platform/linux/wayland/client.rs 🔗

@@ -1209,7 +1209,6 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientStatePtr {
                     log::error!("Received keymap format {:?}, expected XkbV1", format);
                     return;
                 }
-                println!("Wayland Keymap changed");
                 let xkb_context = xkb::Context::new(xkb::CONTEXT_NO_FLAGS);
                 let keymap = unsafe {
                     xkb::Keymap::new_from_fd(
@@ -1295,7 +1294,6 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientStatePtr {
                 state: WEnum::Value(key_state),
                 ..
             } => {
-                println!("\n==> Wayland Key event: {:#?}", key_state);
                 state.serial_tracker.update(SerialKind::KeyPress, serial);
 
                 let focused_window = state.keyboard_focused_window.clone();
@@ -1309,7 +1307,6 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientStatePtr {
                 let keycode = Keycode::from(key + MIN_KEYCODE);
                 let keysym = keymap_state.key_get_one_sym(keycode);
 
-                println!("is modifier key: {}", keysym.is_modifier_key());
                 match key_state {
                     wl_keyboard::KeyState::Pressed if !keysym.is_modifier_key() => {
                         let mut keystroke = Keystroke::from_xkb(
@@ -1318,7 +1315,6 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientStatePtr {
                             state.modifiers,
                             keycode,
                         );
-                        println!("Wayland Before {:#?}", keystroke);
                         if let Some(mut compose) = state.compose_state.take() {
                             compose.feed(keysym);
                             match compose.status() {
@@ -1359,7 +1355,6 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientStatePtr {
                             }
                             state.compose_state = Some(compose);
                         }
-                        println!("Wayland Key pressed: {:#?}", keystroke);
                         let input = PlatformInput::KeyDown(KeyDownEvent {
                             keystroke: keystroke.clone(),
                             is_held: false,
@@ -1416,7 +1411,6 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientStatePtr {
                             state.repeat.current_keycode = None;
                         }
 
-                        println!("\nWayland Key released: {:#?}", input);
                         drop(state);
                         focused_window.handle_input(input);
                     }

crates/gpui/src/platform/linux/x11/client.rs 🔗

@@ -986,7 +986,6 @@ impl X11Client {
                     locked_layout,
                 };
                 let keyboard_layout = LinuxKeyboardLayout::new(&xkb_state);
-                println!("X11 Keyboard layout: {:#?}", keyboard_layout.id());
                 state.xkb = xkb_state;
                 drop(state);
                 self.handle_keyboard_layout_change();
@@ -1068,14 +1067,12 @@ impl X11Client {
                     if keysym.is_modifier_key() {
                         return Some(());
                     }
-                    println!("X11 Before {:#?}", keystroke);
                     if let Some(mut compose_state) = state.compose_state.take() {
                         compose_state.feed(keysym);
                         match compose_state.status() {
                             xkbc::Status::Composed => {
                                 state.pre_edit_text.take();
                                 let key_char = compose_state.utf8();
-                                println!("    Composed: {:#?}", key_char);
                                 keystroke.key_char = key_char;
                                 if let Some(keysym) = compose_state.keysym() {
                                     keystroke.key = xkbc::keysym_get_name(keysym);
@@ -1088,13 +1085,11 @@ impl X11Client {
                                 let pre_edit =
                                     state.pre_edit_text.clone().unwrap_or(String::default());
                                 drop(state);
-                                println!("    Composing: {:#?}", pre_edit);
                                 window.handle_ime_preedit(pre_edit);
                                 state = self.0.borrow_mut();
                             }
                             xkbc::Status::Cancelled => {
                                 let pre_edit = state.pre_edit_text.take();
-                                println!("    Cancelled: {:#?}", pre_edit);
                                 drop(state);
                                 if let Some(pre_edit) = pre_edit {
                                     window.handle_ime_commit(pre_edit);
@@ -1112,7 +1107,6 @@ impl X11Client {
                     keystroke
                 };
                 drop(state);
-                println!("X11 Key pressed: {:#?}", keystroke);
                 window.handle_input(PlatformInput::KeyDown(crate::KeyDownEvent {
                     keystroke,
                     is_held: false,
@@ -1148,7 +1142,6 @@ impl X11Client {
                     }
                     keystroke
                 };
-                println!("\nX11 Key released: {:#?}", keystroke);
                 drop(state);
                 window.handle_input(PlatformInput::KeyUp(crate::KeyUpEvent { keystroke }));
             }