Giter Club home page Giter Club logo

Comments (15)

feschber avatar feschber commented on September 2, 2024 1

Okay turns out, its actually UB... I should not be using transmute here

from lan-mouse.

feschber avatar feschber commented on September 2, 2024

Just to be sure: Did you upgrade both devices and restart the service?

from lan-mouse.

Mzyhe3n6jmFqkYQyFKzFW3kGRGMok8xTYySN4Tm avatar Mzyhe3n6jmFqkYQyFKzFW3kGRGMok8xTYySN4Tm commented on September 2, 2024

Yes, I did it.

from lan-mouse.

Vesek avatar Vesek commented on September 2, 2024

Same happening here, the Linux PC can control Windows but on Windows the mouse cannot leave the screen.

from lan-mouse.

neur1n avatar neur1n commented on September 2, 2024

Same here. The only version that worked for me (I just started using lan-mouse a couple of weeks ago) on two Windows 11 machines was the prerelease I downloaded on 2024-05-08, but I forgot the commit hash.

from lan-mouse.

feschber avatar feschber commented on September 2, 2024

Same here. The only version that worked for me (I just started using lan-mouse a couple of weeks ago) on two Windows 11 machines was the prerelease I downloaded on 2024-05-08, but I forgot the commit hash.

Thank you, that is very helpful!

from lan-mouse.

omgcem avatar omgcem commented on September 2, 2024

I am also experiencing this issue with the release versions on Windows & Wayland (0.8.0).

The cursor is able to enter the windows client but not able to return to the Wayland client.

It is working with the debug version built from source on Windows (although other issues are then present on windows side) and no changes on the Wayland side.

The release version built from source experiences the same issue as the release download.

from lan-mouse.

feschber avatar feschber commented on September 2, 2024

Okay this is interesting. I will hopefully get to take a look this weekend.

from lan-mouse.

feschber avatar feschber commented on September 2, 2024

Could you check if maybe the "barriers" are just on the wrong side? As in the position is set to right but it's actually on the left side?

from lan-mouse.

omgcem avatar omgcem commented on September 2, 2024

I retested with the source built release version on windows (also dropped down to just 1 monitor) and was not able to exit the screen from any screen edge despite the left being configured as the barrier to the Wayland client.

Reverting back to the source built debug version allowed me to exit from the left screen edge as expected.

from lan-mouse.

miroslav-suvada avatar miroslav-suvada commented on September 2, 2024

I am experiencing a similar problem. I am running version 0.8.0 on both Windows 11 and Ubuntu 22.04.

from lan-mouse.

feschber avatar feschber commented on September 2, 2024

now this is a very interesting bug. It looks to me like a compiler bug:

log::debug!("{}", wparam.0 != WM_MOUSEMOVE as usize);
log::debug!("{}, {}, {}", wparam.0, WM_MOUSEMOVE as usize, wparam.0 == WM_MOUSEMOVE as usize);

This prints

[2024-06-25T09:57:36Z DEBUG lan_mouse::capture::windows] true
[2024-06-25T09:57:36Z DEBUG lan_mouse::capture::windows] 512, 512, true

from lan-mouse.

feschber avatar feschber commented on September 2, 2024
use std::hint::black_box;
use std::ptr::addr_of;
use windows::Win32::Foundation::{LPARAM, WPARAM};
use windows::Win32::UI::WindowsAndMessaging::{MSLLHOOKSTRUCT, WM_MOUSEMOVE};

fn main() {
    let msll = MSLLHOOKSTRUCT::default();
    let wparam = WPARAM(512);
    let lparam = LPARAM(addr_of!(msll) as *const _ as isize);
    unsafe { check_client_activation(wparam, lparam) };
}

pub unsafe fn check_client_activation(wparam: WPARAM, lparam: LPARAM) -> bool {
    eprintln!("{wparam:?}, {lparam:?}");
    if wparam.0 != WM_MOUSEMOVE as usize {
        black_box(wparam.0);
        assert_ne!(wparam.0, WM_MOUSEMOVE as usize);
        return true;
    }
    let mouse_low_level: MSLLHOOKSTRUCT =
        unsafe { *std::mem::transmute::<LPARAM, *const MSLLHOOKSTRUCT>(lparam) };
    black_box(mouse_low_level.pt);

    true
}

reduced example... very very strange

from lan-mouse.

Mzyhe3n6jmFqkYQyFKzFW3kGRGMok8xTYySN4Tm avatar Mzyhe3n6jmFqkYQyFKzFW3kGRGMok8xTYySN4Tm commented on September 2, 2024

I have tested the dev build of lan mouse, from windows to linux is fine, but when back to windows the mouse seem to be frozen, and I can't do anything about this.

from lan-mouse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.