Skip to content
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

Selection region is off on integer scaling #18

Closed
dmoebius opened this issue Mar 16, 2021 · 18 comments
Closed

Selection region is off on integer scaling #18

dmoebius opened this issue Mar 16, 2021 · 18 comments
Labels
bug Something isn't working
Milestone

Comments

@dmoebius
Copy link

dmoebius commented Mar 16, 2021

Arch Linux, using Kooha 1.0.2, installed from AUR https://aur.archlinux.org/packages/kooha

I have a Hi-DPI screen with 3840x2160 pixels, 290 dpi. GNOME display scaled to 200%.

When I record a screen region, it seems that the real coordinates of the rectangle that defines the region are off by one half. Ie. when I define to record the region from (200,200) to (500,500), Kooha really records the region from (100,100) to (250,250).

@SeaDve
Copy link
Owner

SeaDve commented Mar 16, 2021

Thanks for submitting the issue! Kooha uses a method in the dbus interface of gnome shell.
Try using the built-in screenshot tool (GNOME screenshot) if you can replicate the bug.

@dmoebius
Copy link
Author

GNOME screenshot works fine; it records exactly the region I selected.

@SeaDve SeaDve added the bug Something isn't working label Mar 16, 2021
@SeaDve
Copy link
Owner

SeaDve commented Mar 16, 2021

I'll investigate on it.

@dmoebius
Copy link
Author

Just FYI, when I set GNOME's screen scale to 100% it records the correct region.

@SeaDve
Copy link
Owner

SeaDve commented Mar 17, 2021

Not replicable on my end. I set up my display to be 175%, and it still records the correct area. It might be that you set it to 200%? I can't seem to find that option.

@SeaDve SeaDve added the Needs info Further information is requested label Mar 17, 2021
@SeaDve SeaDve changed the title Region seems to be off on hidpi screens Selection region is off on non-default scaling Mar 18, 2021
@HaasJona
Copy link

HaasJona commented Mar 18, 2021

GNOME by default only allows scaling to integers, eg 100%, 200%, 300%, you might have experimental fractional scaling enabled or an experimental/hacked version installed. I could try replicatign with a stock Fedora install with 200% scaling later.

@SeaDve
Copy link
Owner

SeaDve commented Mar 18, 2021

I cannot find the options for integer scaling, is it only available from hidpi's?

@HaasJona
Copy link

HaasJona commented Mar 19, 2021

I can confirm this issue. I use 200% scaling and the recorded coordinates are all 200% too small.

Bildschirmfoto von 2021-03-19 16-22-28
Bildschirmfoto von 2021-03-19 16-22-11

Bildschirmfoto von 2021-03-19 16-20-05

@SeaDve SeaDve removed the Needs info Further information is requested label Mar 24, 2021
@SeaDve SeaDve added this to the v2.0.0 milestone Mar 24, 2021
@SeaDve SeaDve changed the title Selection region is off on non-default scaling Selection region is off on integer scaling May 19, 2021
@SeaDve
Copy link
Owner

SeaDve commented Jun 4, 2021

Hi, I'm thinking of removing selection support, so I would like to know your opinions whether its the right choice. The reason is that it will be useless for most, since it would be possible now to select a specific monitor, or window to record.

@dodalovic
Copy link

For me, personally, it's an essential feature. This would force me to find another tool.

@dmoebius
Copy link
Author

dmoebius commented Jun 4, 2021

For me, it's an essential feature, too. I use this feature to crop off sensitive sections of my screen that I don't want to share in the recorded video.
I don't understand why you would remove such a useful feature. Besides the scaling issue it works very well.

@SeaDve
Copy link
Owner

SeaDve commented Jun 11, 2021

I'm working on it, besides maintaining the feature, I'll support other desktop environments and fix this scaling issue. Check #73

@SeaDve
Copy link
Owner

SeaDve commented Jun 11, 2021

I found the issue, it was that the original resolution should be divided by the actual resolutions of your screen then multiply back to x, y width and height

width = width * self.screen_width / 840

840 being the actual resolution, but haven't find a way for now how to get this value in GTK4

@SeaDve
Copy link
Owner

SeaDve commented Jun 13, 2021

pushed the fix in development branch :D

Feel free to test it

@SeaDve
Copy link
Owner

SeaDve commented Jun 17, 2021

fix merged to main branch

@SeaDve SeaDve closed this as completed Jun 17, 2021
@dodalovic
Copy link

@SeaDve Is there any rough estimate of when the new release will be available? Thanks for the fix!!!!

@SeaDve
Copy link
Owner

SeaDve commented Jun 17, 2021

Possibly after the release of GTK 4.3.3

Check #75 for the todo

@dmoebius
Copy link
Author

Sorry for the late response (have been very busy). I verified that the fix works. Many thanks!! 😃 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants