Synergy-core: Recognize individual screen size

Created on 10 Mar 2017  路  15Comments  路  Source: symless/synergy-core

Synergy is trading multiple monitors on the client as one big monitor as far as I read. That leads to a problem, when the resolutions are different, what happens often with a laptop + external monitor.

clientresolutions

When drawing a rectangle around the client monitors, there is an area with no monitor. When moving the mouse to this area, synergy virtually moves the mouse into it. So when you think, you are at the bottom of your monitor, and you want to move the mouse up again, it don't instantly moves up, but first moves out of the invisible area and starts moving up on the real monitor after that.

logmovement

It will get uncomfortable when you want to press on a programm in your taskbar. So you move your mouse down much, because the bottom border of the monitor should stop your mouse movement, click on the programm you want to focus, and then move the mouse up again. You will have to move the mouse up more than expecting, because you first have to move it out of the invisible area.

Also another side effect is moving the mouse from the bigger monitor into the invisible area of the smaller monitor, it works. You can move your mouse as much as you want in this invisible area.

expection
(Red: movement of the mouse, Green: Expected behaviour)

And finally another side effect: Windows 10 introduced snapping corners for easier closing windows, hitting start button or going to desktop. These snapping corners work well on the server, but won't work on the client. Even on the upper aligned borders you can't get your mouse to hold on the Close-Window-Button.

Operating Systems

Server: Windows 10
Client: Windows 10

Synergy Version

1.8.8-stable-c30301e (updated half an hour ago)

Steps to reproduce bug

Entering the invisible area from the upper side:

  1. Configure your client with two monitors of different resolutions. Place the smaller monitor to the left and align the upper borders.
  2. Configure your server so the client is left of the server.
  3. Move your mouse to the left client monitor (stay vertically in the middle).
  4. Move your mouse to the bottom and move it down a bit more.
  5. Move your mouse up again. The bug occurs. The mouse will need a while until it really starts moving up.

Entering the invisible area from another monitor:

  1. Configure your client with two monitors of different resolutions. Place the smaller monitor to the left and align the upper borders.
  2. Configure your server so the client is left of the server.
  3. Move your mouse to the right client monitor.
  4. Move your mouse to the bottom.
  5. Move your mouse to the left into the left client monitor. The bug occurs. You shouldn't be able to get to the left client monitor.
  6. Move your mouse up. The bug occurs. The mouse will need a while until it really starts moving up.

Other info

  • When did the problem start to occur? Since I reinstalled synergy 1 1/2 years ago.
  • Is there a way to work around it? Moving your mouse really carefully. Not really a work around.
  • Does this bug prevent you from using Synergy entirely? No

Some cherrypicked log informations which should describe the bug:

[2017-03-10T10:01:54] DEBUG: received client "DESKTOP-IV581NQ" info shape=0,0 3520x1080 at 0,0 (no, my client is not a regular rectangle)
[...]
[2017-03-10T10:01:59] INFO: switch from "Wulf-PC" to "DESKTOP-IV581NQ" at 3519,836
[...]
[2017-03-10T10:03:11] DEBUG2: onMouseMoveSecondary +1,+0
[2017-03-10T10:03:11] DEBUG2: move on DESKTOP-IV581NQ to 796,899 (thats ok, but should be the limit)
[2017-03-10T10:03:11] DEBUG2: send mouse move to "DESKTOP-IV581NQ" 796,899
[...]
[2017-03-10T10:03:11] DEBUG2: onMouseMoveSecondary +0,+1
[2017-03-10T10:03:11] DEBUG2: move on DESKTOP-IV581NQ to 796,901 (should not be possible)
[2017-03-10T10:03:11] DEBUG2: send mouse move to "DESKTOP-IV581NQ" 796,901
[...]
[2017-03-10T10:03:22] DEBUG2: onMouseMoveSecondary +0,+1
[2017-03-10T10:03:22] DEBUG2: move on DESKTOP-IV581NQ to 804,941 (should not be possible)
[2017-03-10T10:03:22] DEBUG2: send mouse move to "DESKTOP-IV581NQ" 804,941

synergyconfig_1
synergyconfig_2

feature

Most helpful comment

@ColinCreamer Thanks, and yeah, that's what I was thinking - keep it simple for now.
I've just done a basic (hacky) implementation of multi-monitor dragging as a proof of concept. Aside from silly issues like it snapping to other monitors of the same computer where they were at the start of the drag, and pixel-accuracy problems because I haven't set up a proper data model... it works, but it definitely needs to take into account the whole shape when snapping; snapping based on the dragged monitor isn't enough.

nw-synergy 7

So, I could rewrite this with React, do it properly and try to implement (convex) shape snapping.
Are the devs willing to go down the route of a desktop web app?

All 15 comments

synergy displays configuration UI should be re-done to fix this issue...
to account for multiple monitors, how about showing 'groups' of monitors for a host?
(which would be similar to windows 10 multi-monitor configuration UI, with 'colors' to group by hosts)

I agree @devdoomari completely with having 'groups' of monitors. I`ve been wanting proper multi monitor support implemented for years. I made the same sort of request in 2015 with issue #4795, though it got closed nearly immediately due to similarities to other issues. Synergy really does need to rework the monitor UI so that it recognizes and displays the multi monitor layout of all computers connected, server and client. This way each computers monitor layout group, reflects the actual shape of all monitors on that computer, and, so each group can be positioned to fit together like puzzle pieces.
multimonitory layout support

@ColinCreamer nice drawing : )

A couple years ago I started working on a synergy client that was going to support this. I was about to implement snapping but I found a jQuery UI function that did something like 90% of what I needed for 10% of the work. You can play around with the start of the interface here.
nw-synergy
It can kinda detect one monitor from the web page, but it does multi-monitor detection in the NW.js app. (Here's the repo.)
nw-synergy 4
I think it shouldn't be too hard to implement dragging and snapping conjoint monitors. In fact it could work to just move connected monitors with the dragged monitor, which would technically give you more control than if it handled snapping of the whole shape at once. (Edit: in some situations theoretically)

@1j01 Pretty nice. Implementing the current Synergy GUI program in HTML/JS/CSS and serving it from a local webserver binary would be great for removing the Qt (C++ GUI library) dependency in the project too.

@1j01 Great demo. Very cool.
That would be excellent if synergy implemented snapping and monitor placement such as yours.
On a side note: I frayed away form requesting manipulation of every monitor independently, since I didn't want to ask for too much. Independent monitor manipulation would require synergy re-configuring the operating systems monitor layout. Also if we have full individual monitor placement control, for multiple monitors from multiple different machines, the snapping logic would have to be smart enough to prevent invalid monitor arrangements. IE. every monitor from the same computer HAS to be touching another monitor from the same computer Figured best just leaving the local computers monitor arrangement to be done using OSs provided GUI, then in synergy, only arranging each computers cluster of monitors as a whole. For the first version anyways.

@ColinCreamer Thanks, and yeah, that's what I was thinking - keep it simple for now.
I've just done a basic (hacky) implementation of multi-monitor dragging as a proof of concept. Aside from silly issues like it snapping to other monitors of the same computer where they were at the start of the drag, and pixel-accuracy problems because I haven't set up a proper data model... it works, but it definitely needs to take into account the whole shape when snapping; snapping based on the dragged monitor isn't enough.

nw-synergy 7

So, I could rewrite this with React, do it properly and try to implement (convex) shape snapping.
Are the devs willing to go down the route of a desktop web app?

I very much need individual monitor support. What would be the right way for me to help with that?

Detail: Right now I have 2 computers. Computer 1 has 3 monitors, different sizes. Computer 2 has 2 monitors, the same size. They are roughly physically arranged as:

1 2 2
1 1

Thanks!

anyone else thinking about Tetris?

@nbolton The link you provided does not work: there is 404.
I assume you meant Duplicate of #4173 from synergy-core project ?

Duplicates #4173

@nbolton according to GitHub documentation:
"For a "marked as duplicate" timeline event to appear [...] type "Duplicate of" followed by the issue or pull request number"

"Duplicate of" not "Duplicates"

P.S. I can't do it, as I don't have write access to this repo.

Duplicate of #4173

@LeadManPL Very cool! Thanks for that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xmstspider picture xmstspider  路  4Comments

nbeazy picture nbeazy  路  4Comments

xmstspider picture xmstspider  路  4Comments

jasonfisherjlf picture jasonfisherjlf  路  4Comments

jasonosei picture jasonosei  路  3Comments