New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dual screen on macOS doesn't work #56
Comments
Hey, this issue has been reported - it seems like Mac maps the absolute report coordinates to the primary screen only, but if a relative motion is reported, it allows you to switch between screens. The workaround for this is under construction, albeit a bit slower than anticipated due to heavy workload on other fronts. The idea is to define another, "relative" mouse and use that to switch between screens. The tricky thing is knowing where that screen is and how many are there, so I'm trying to figure out how to make it happen without config files and recompiling for every custom layout. Stay tuned. |
I would also be interested in a fix for this issue. My setup is a macbook with an extra monitor and a PC. Let;s call the laptop's built in monitor screen A, the extra Mac monitor screen B, and the PC monitor screen C. Reading from left to right the layout is A - B - C. |
Multiple mac screens workaround should be easier to implement than multiple windows screens, will try once I'm back from my work trip. |
Ok, the updated codebase is out. You need to rebuild and define OUTPUT_A_OS/OUTPUT_B_OS to specify where your MACOS is, and define the corresponding screen_count in defaults.c Will be moved to config file and supported by a keyboard shortcut for easy config. Leaving this open until confirmed working OK by several folks. |
That's great, thanks, I'll give it a try and report back. |
B needs to be your main mac screen, A needs to be the extended one (that's defined under MacOS I believe). Then in defaults.c for output A you would define screen_count = 2 instead of 1 and in user_defaults.h OUTPUT_A_OS as MACOS. It's still not super user-friendly, as it's a work in progress, but should get there. I'll also try writing better instructions. |
My test setup: First notice: my keyboard, as reported in #47 does not work with this build. Other then that, it kinda work… 🎉 Sometimes, when you freshly connect deskhop and I try move from A1, I actually end up on B1 first (should be B2). Moving the mouse to the right edge of B1 seems to discover that the external monitor is on the left, not the right. After that, I can move the mouse from A1 to B2 to B1 as expected. 👍 Is there anything I can provide? Maybe logs from WireShark or something? |
Hm, I'm getting the following error when trying to build it: C:\deskhop\deskhop\src\mouse.c: In function 'switch_desktop': I thought it might be because I'm building on Windows but I tried on an Ubuntu machine and got the same error. Am I doing something wrong? |
@Fallingonion can you please pull the latest version and try again? Initializing a struct within a switch/case doesn't seem to make some compiler versions happy. :-) |
@jalmeroth do these do anything for your keyboard? |
@hrvach Yes, keyboard works with this. But I can't move the mouse from A1 to B2 (from left [A] to right [B2]). I have to go to the left to land on B2 but can't reach B1 at all. 🤷 |
@jalmeroth Try parking cursor on mac output and pressing right shift + backspace + 2 and then right shift + backspace + 9. Any difference? |
@hrvach yes, now I can move to B1 as well. But still the jump is on the wrong edge |
@hrvach oh, and is moving windows on macOS (B1 <-> B2) supposed to work already? |
OK, so that now builds correctly and works perfectly for my setup! Amazing, thanks :) |
One side comment - on the Mac, I can't click+drag a window from one screen to the other using the mouse that goes through deskhop. The built-in trackpad works as you would expect. No idea if there's anything that can be done about that :) |
Hmmm, maybe ... I didn't think of the mouse buttons, the relative "helper" mouse should mimic the button presses from the absolute one, then it just might work |
@Fallingonion can you try this and let me know? |
Hi - didn't work unfortunately: I was unable to move the mouse to screen A (the laptop's built-in screen.) Movement between B and C (Mac extra screen and Windows) works as expected... |
Did you configure that output as two screens (Right Shift + Backspace + 2), MacOS (Right Shift + Backspace + 9) ? |
Oops, no, I hadn't. I have now done that and can move the mouse to all three screens, but I still can't click+drag between the two Mac screens. |
I think I know what else might be needed, will try looking into it... |
++ Same. I also notice that sometimes when moving from the second MacOS screen to the primary, the cursor gets stuck on the second screen 🤔 It's almost like it got stuck in a second layer, as moving it to the far left edge doesn't move the cursor to the other machine, but back into the secondary MacOS screen. |
It probably needs some tweaking to reliably move the "helper" mouse for the MacOS workaround. For the click-and-drag, I have an idea how it might be done, but still not 100% it will work... will try though! :) |
You need to configure the output is a mac and there are two monitors there. Top/bottom still isn't implemented, so you need to configure displays as left-right. |
Hi,
I have two laptops and one external monitor. If I connect the monitor to the Linux-laptop, everything works as expected. I can move to all three screens: Linux-Laptop (DeskHop B) -> external monitor -> Mac (DeskHop A).
Unfortunately, if I connect the monitor to the macOS-laptop (using the same USB-C cable as with the other laptop), I can only control one screen on the Mac. It just doesn't allow me to use the second screen. Altough I can use the built-in trackpad to move between both screens. Either it's stuck to the primary screen, or if I use the trackpad to move the mouse to the secondary screen, it just allows this one. So it's: Mac (DeskHop B) or external monitor -> Linux (DeskHop A) but not Mac (DeskHop B) -> external monitor -> Linux (DeskHop A).
The Mac is running Sonoma 14.3.1. What information can I provide to narrow this problem?
The text was updated successfully, but these errors were encountered: