From 475fc0667b76ca8f708628ff252f9599257368fe Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 12 Jan 2022 07:14:14 -0700 Subject: [PATCH] fix termwiz compilation when widgets are enabled refs: #1457 --- .github/workflows/termwiz.yml | 36 +++++++++++++++++++++++++++++++++++ termwiz/src/widgets/mod.rs | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/termwiz.yml diff --git a/.github/workflows/termwiz.yml b/.github/workflows/termwiz.yml new file mode 100644 index 000000000..fb9e55434 --- /dev/null +++ b/.github/workflows/termwiz.yml @@ -0,0 +1,36 @@ +name: termwiz + +on: + pull_request: + branches: + - main + paths-ignore: + - ".cirrus.yml" + - "docs/*" + - "ci/build-docs.sh" + - "ci/generate-docs.py" + - "ci/subst-release-info.py" + - ".github/workflows/pages.yml" + - ".github/workflows/verify-pages.yml" + - ".github/ISSUE_TEMPLATE/*" + - "**/*.md" + +jobs: + build-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: "Install Rust" + uses: actions-rs/toolchain@v1 + with: + profile: "minimal" + toolchain: "stable" + override: true + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: "true" + - name: Build + run: | + source $HOME/.cargo/env + cargo build -p termwiz --all-features + diff --git a/termwiz/src/widgets/mod.rs b/termwiz/src/widgets/mod.rs index cbd3ed192..1022cb841 100644 --- a/termwiz/src/widgets/mod.rs +++ b/termwiz/src/widgets/mod.rs @@ -244,6 +244,7 @@ impl<'widget> Ui<'widget> { self.do_deliver(id, &WidgetEvent::Input(InputEvent::Mouse(m))) } WidgetEvent::Input(InputEvent::Paste(_)) + | WidgetEvent::Input(InputEvent::PixelMouse(_)) | WidgetEvent::Input(InputEvent::Key(_)) | WidgetEvent::Input(InputEvent::Wake) => self.do_deliver(id, event), }; @@ -324,6 +325,7 @@ impl<'widget> Ui<'widget> { } WidgetEvent::Input(InputEvent::Key(_)) | WidgetEvent::Input(InputEvent::Paste(_)) + | WidgetEvent::Input(InputEvent::PixelMouse(_)) | WidgetEvent::Input(InputEvent::Wake) => { if let Some(focus) = self.focused { self.deliver_event(focus, &event);