~mil/sxmo-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH peanutbutter] added parameter (-F) to disable touch feedback

Details
Message ID
<20241202103314.1242814-2-proycon@anaproy.nl>
DKIM signature
pass
Download raw message
Patch: +12 -3
As requested by Baroque_0bamo:

> i wish the visual feedback could be configured, or as a default
> de-activated. i just realized upon waking up, in a dark environment,
> that the pb feedback provides by far the most light of my entire setup,
> when flashing a white screen. i can see situations (in a cinema, in a
> bed, in ill.lit street at night,, etc.) where this would attract a lot
> of unwanted attention to the device and its operator.
---
 src/main.rs             | 12 +++++++++---
 src/wayland_protocol.rs |  3 +++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index a23e254..5bc7994 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -19,6 +19,7 @@ use touch_pass::TouchState;
fn main() {
    let mut debug = false;
    let mut notouch = false;
    let mut nofeedback = false;
    let mut statuscommand: Option<Vec<String>> = None;
    let mut parsefont = false;
    let mut fontname: String = "Sans".into();
@@ -26,6 +27,7 @@ fn main() {
        match argument.as_str() {
            "-d" | "--debug" => debug = true,
            "-T" | "--notouch" => notouch = true,
            "-F" | "--nofeedback" => nofeedback = true,
            "-s" | "--statuscommand" => statuscommand = Some(Vec::new()),
            "-f" | "--font" => parsefont = true,
            "-h" | "--help" => {
@@ -34,6 +36,7 @@ fn main() {
                    " -d / --debug                    Debug mode (allows quiting on any keypress)"
                );
                eprintln!(" -T / --notouch                  Disable touch support");
                eprintln!(" -F / --nofeedback               Disable touch feedback");
                eprintln!(" -f / --font [font               Set font family");
                eprintln!(" -s / --statuscommand [command]  Run this command for a status line, it should run continuously and each new output line will become the status line");
                std::process::exit(0);
@@ -102,7 +105,8 @@ fn main() {
        None
    };

    let (mut way_state, mut event_queue) = init_wayland(&fontname, debug, notouch, status);
    let (mut way_state, mut event_queue) =
        init_wayland(&fontname, debug, notouch, nofeedback, status);
    let wait_between_lock_unlock = time::Duration::from_secs(2);
    let wait_between_polling = time::Duration::from_millis(250);

@@ -182,8 +186,10 @@ fn main() {
                        .unwrap()
                        .add_touch(last_down.x, last_down.y)
                    {
                        way_state.invert();
                        way_state.redraw = true;
                        if !way_state.nofeedback {
                            way_state.invert();
                            way_state.redraw = true;
                        }
                    }
                }
            }
diff --git a/src/wayland_protocol.rs b/src/wayland_protocol.rs
index c0a0adb..ce66979 100644
--- a/src/wayland_protocol.rs
+++ b/src/wayland_protocol.rs
@@ -66,6 +66,7 @@ pub struct State {
    pub redraw: bool,
    pub debug: bool, // In debug mode, a simple ESC suffices to unlock (useful for testing without touch support)
    notouch: bool,   // disable touch support  (for devices that don't have it)
    pub nofeedback: bool, // disable visual feedback
    wm_base: Option<xdg_wm_base::XdgWmBase>,
    zxdg_manager: Option<zxdg_output_manager_v1::ZxdgOutputManagerV1>,
    pub wl_shm: Option<wl_shm::WlShm>,
@@ -275,6 +276,7 @@ pub fn init_wayland(
    fontname: &str,
    debug: bool,
    notouch: bool,
    nofeedback: bool,
    status: Arc<Mutex<String>>,
) -> (State, EventQueue<State>) {
    // Create a Wayland connection by connecting to the server through the
@@ -332,6 +334,7 @@ pub fn init_wayland(
        scale: 1, //will be set by wloutput scale callback
        debug,
        notouch,
        nofeedback,
        running: true,
        zxdg_manager: None,
        wl_shm: None,
-- 
2.47.1
Details
Message ID
<D64F665NFHC6.1840RS5MJM2M6@momi.ca>
In-Reply-To
<20241202103314.1242814-2-proycon@anaproy.nl> (view parent)
DKIM signature
pass
Download raw message
Thanks!

To git@git.sr.ht:~anjan/peanutbutter
   90bd4e17..f02fa612  master -> master
Reply to thread Export thread (mbox)