ScreenAreaShare icon indicating copy to clipboard operation
ScreenAreaShare copied to clipboard

multi screen support

Open CeesvEgmond opened this issue 4 years ago • 10 comments

I'm using the app with a wide screen (1) and an 4K HDMI dummy dongle (2). Screens are arranged as per below: image

The resolution of the main screen is 3440x1440 and the dummy dongle is set to 1720x1166, exactly the area I want to share.

Once I use below command line, the rendering window is pushed to the dongle screen, but remains white. screen-area-share.exe --cw=1720 --ch=1166 --cx=1720 --cy=0 --rw=1720 --rh=1166 --rx=3440 --ry=0

With below command line, the rendering window will be on the main screen and working. But once moved to the dongle screen, it shows the whole content of the main screen squeezed together. screen-area-share.exe --cw=1720 --ch=1166 --cx=1720 --cy=0 --rw=1720 --rh=1166 --rx=0 --ry=0

It seems that multi screens are not supported, could you check?

CeesvEgmond avatar Jan 04 '22 14:01 CeesvEgmond

To be fair, I haven't really tested with multiple monitors. But since you say the content gets squeezed, I think it has something to do with scale. could you try passing --consider-scale as another parameter?

mPyKen avatar Jan 11 '22 15:01 mPyKen

I've tried that, but no success.

this is what is looks like, white screen on the right top" image

and squeezed screen: image

CeesvEgmond avatar Jan 11 '22 16:01 CeesvEgmond

Hmm, sorry, I need to get hands on another monitor in order to debug this. Maybe end of this month. In the meantime, could you run the program from source npm start? It should show some information on detected monitors.

mPyKen avatar Jan 12 '22 08:01 mPyKen

Notice I'm using my private pc (win 11) to test, with the same result. Screen order is different: image

npm start provides below and its working, how do I start with arguments?

[ { name: 'Screen 1', id: 'screen:1:0', thumbnail: NativeImage { toPNG: [Function: toPNG], toJPEG: [Function: toJPEG], toBitmap: [Function: toBitmap], getBitmap: [Function: getBitmap], getScaleFactors: [Function: getScaleFactors], getNativeHandle: [Function: getNativeHandle], toDataURL: [Function: toDataURL], isEmpty: [Function: isEmpty], getSize: [Function: getSize], setTemplateImage: [Function: setTemplateImage], isTemplateImage: [Function: isTemplateImage], isMacTemplateImage: [Getter/Setter], resize: [Function: resize], crop: [Function: crop], getAspectRatio: [Function: getAspectRatio], addRepresentation: [Function: addRepresentation] }, display_id: '2779098405', appIcon: null }, { name: 'Screen 2', id: 'screen:0:0', thumbnail: NativeImage { toPNG: [Function: toPNG], toJPEG: [Function: toJPEG], toBitmap: [Function: toBitmap], getBitmap: [Function: getBitmap], getScaleFactors: [Function: getScaleFactors], getNativeHandle: [Function: getNativeHandle], toDataURL: [Function: toDataURL], isEmpty: [Function: isEmpty], getSize: [Function: getSize], setTemplateImage: [Function: setTemplateImage], isTemplateImage: [Function: isTemplateImage], isMacTemplateImage: [Getter/Setter], resize: [Function: resize], crop: [Function: crop], getAspectRatio: [Function: getAspectRatio], addRepresentation: [Function: addRepresentation] }, display_id: '2528732444', appIcon: null } ]

CeesvEgmond avatar Jan 17 '22 20:01 CeesvEgmond

npm start provides below and its working, how do I start with arguments?

Running electron apps with arguments is a little bit tricky, you need two dashes twice: npm start -- -- --cx=0

When running without any arguments, does the content get scaled if you move the rendering window to the dongle screen?

mPyKen avatar Jan 18 '22 15:01 mPyKen

npm start and moving the window to the second screen: image

npm start -- -- --cw=1720 --ch=1166 --cx=1720 --cy=0 --rw=1720 --rh=1166 --rx=3440 --ry=0 image

npm start -- -- --cw=1720 --ch=1166 --cx=1720 --cy=0 --rw=1720 --rh=1166 --rx=0 --ry=0 image

removing the --rx= and --ry=0 will sometimes have a proper rendering window, while it also produces: image

CeesvEgmond avatar Jan 18 '22 18:01 CeesvEgmond

I have added initial support for multiple monitors with v1.3.0. There should be no more blank screens. I haven't encountered any scaling issues with v1.2.0 as you, though.

mPyKen avatar Feb 01 '22 02:02 mPyKen

Thanks for the effort! Blank screen are indeed gone, still my scaling issue from normal scaling to fit whole screen still appears. That happens when I move the window more than half way to the second screen, just before half way the scaling is normal. This has to do with the custom resolution I'm using for the dummy screen. With native resolutions I don't have the same behavior.

I prefer to have the custom resolution because:

  • I'm using a tool to snap windows to a grid, that grid that grid results in a non native resolution
  • Sharing the second screen is easier than finding the Main Window in a list of programs.

As intermediate solution I set the screen to a native resulution and tried to use parameters to scale the rendering window to this resolution, but that does not work.

CeesvEgmond avatar Feb 01 '22 07:02 CeesvEgmond

Hmm I have tried changing resolutions on one display and moved over one of the windows, but I see no scaling issues... I guess its due to the dongle which I do not have. Sorry but I have no idea where the issue could be.

mPyKen avatar Feb 02 '22 06:02 mPyKen

In Windows Scale is defined per Monitor.

image

Probably the 2 screens has different Scale Set.

I keep my laptop at 100% and my 4K External monitor at 125 and moving apps between monitors such as Excel, performs content scaling.

webartoli avatar Feb 28 '23 11:02 webartoli