Kap: Recording with Kap on one display and recording frame on another captures with undesired vertical offset

Created on 9 May 2017  路  3Comments  路  Source: wulkano/Kap

Platform: Darwin mybox.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
Kap Version: Version 1.0.1 (1.0.1.170)

Steps to reproduce

Set up your displays with one display having its top edge higher than another.

screen shot 2017-05-09 at 3 06 48 pm

screen shot 2017-05-09 at 3 12 37 pm

Open Kap's main window, so it's attached to the menu bar, on the screen with the lower top edge.
Set the recording frame to record something on the other monitor.

screen shot 2017-05-09 at 3 21 24 pm 2
screen shot 2017-05-09 at 3 21 24 pm

Current behaviour

The screen recording's captured frame will be vertically offset from the intended frame in such a way that the vertical offset will be the vertical offset of the two monitors

Here is a gif that was supposed to be of the finder window shown in previous screenshots.

offset capture

Expected behaviour

Captured recording frame should match desired area as drawn by selection area.

Workaround

Detach Kap from menubar and bring to same display as recording frame. Not necessarily desirable if you wish to record a full screen.

Help Wanted High Bug

Most helpful comment

Seems to work fine now, though I don't have exactly the same set up as before. Good work people!

All 3 comments

Most likely there's something wrong with the math in https://github.com/wulkano/kap/blob/8a4530b8dfe8ab6d48fe6c332ebb809c5dfd413f/app/src/renderer/js/main.js#L162-L175, but I don't have multiple monitors, so I can't really debug this.

One suspectful thing there is the use of Math.abs(). I don't think that accounts for the fact that the bounds could be negative.

For example:

image

@matheuss Any thoughts? Maybe we should request Electron add something like NSWindow.convertFromScreen, so we can use the system API to convert it?

Could you see if you're able to reproduce this issues on the latest beta release @Glutnix?

Seems to work fine now, though I don't have exactly the same set up as before. Good work people!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sorodrigo picture sorodrigo  路  3Comments

amirrajan picture amirrajan  路  4Comments

xenio picture xenio  路  4Comments

pedromassango picture pedromassango  路  3Comments

deadcoder0904 picture deadcoder0904  路  3Comments