pub fn grab_mouse_clicks(&self, handle: xlib::Window, is_focused: bool) {
        self.ungrab_buttons(handle);
        if !is_focused {
            self.grab_buttons(handle, xlib::Button1, xlib::AnyModifier);
            self.grab_buttons(handle, xlib::Button3, xlib::AnyModifier);
        }
        self.grab_buttons(handle, xlib::Button1, u32::from(self.mouse_key_mask.bits()));
        self.grab_buttons(
            handle,
            xlib::Button1,
            u32::from(self.mouse_key_mask.bits()) | xlib::ShiftMask,
        );
        self.grab_buttons(handle, xlib::Button3, u32::from(self.mouse_key_mask.bits()));
        self.grab_buttons(
            handle,
            xlib::Button3,
            u32::from(self.mouse_key_mask.bits()) | xlib::ShiftMask,
        );
    }
Grabs the mouse clicks of a window.
display-servers/xlib-display-server/src/xwrap/mouse.rs