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

Area selection cursor is shown in final screenshot #60

Open
diniamo opened this issue Oct 7, 2023 · 27 comments
Open

Area selection cursor is shown in final screenshot #60

diniamo opened this issue Oct 7, 2023 · 27 comments

Comments

@diniamo
Copy link

diniamo commented Oct 7, 2023

image

As you can see in the screenshot, the cursor I selected the area with is shown. I didn't pass --cursor.

@fufexan
Copy link
Member

fufexan commented Oct 7, 2023

Can you post the full command you've used to take the screenshot? Also, are you using NVidia/have the WLR_NO_HARDWARE_CURSORS=1 variable set?

@diniamo
Copy link
Author

diniamo commented Oct 7, 2023

Yes, I use nvidia, no I don't have it set, but it doesn't seem to make a difference if I do.

bind = $ctrl, Print, exec, ~/.local/bin/grimblast --notify --freeze copy area

And I also made a small modification in grimblast where slurp is called:

slurp -c ed8796 -b 00000000 -s 00000000 -B 00000000

@fufexan
Copy link
Member

fufexan commented Oct 7, 2023

Sounds like a nvidia issue, as I don't see the cursor when running the same command.
image
As can be seen, my hyprpicker is built from a commit in 2023-10-05, so check if yours might be out of date.

@diniamo
Copy link
Author

diniamo commented Oct 7, 2023

I have the latest/same commit.

@kRHYME7
Copy link

kRHYME7 commented Nov 9, 2023

We found out that grimblast captures hyprpicker cursor. Should we request a feature on hyprpicker to make cursor transparent? Or should we implement a separate package for freezing?

@fufexan
Copy link
Member

fufexan commented Nov 9, 2023

I haven't seen that, mind showing an example? Maybe record a video of it happening?

@kRHYME7
Copy link

kRHYME7 commented Nov 12, 2023

Sorry for the very late response.
Using Arch package

❯ paru -Q grimblast
grimblast-git r66.bfd3e0e-1

Here is my env also if this could cause something.

❯ cat ~/.config/hypr/userprefs.conf | grep 'env'
env = GDK_SCALE,1
env = WLR_NO_HARDWARE_CURSORS,1
env = WLR_EGL_NO_MODIFIERS,1
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = GDK_BACKEND,wayland,x11
env = QT_QPA_PLATFORM,wayland
env = SDL_VIDEODRIVER,wayland
env = CLUTTER_BACKEND,wayland
env = QT_AUTO_SCREEN_SCALE_FACTOR,2
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
❯ cat ~/.config/hypr/hyprland.conf | grep 'env'
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH
exec-once = dbus-update-activation-environment --systemd --all # for XDPH
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH
# Some default env vars.
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = GDK_BACKEND,wayland
env = QT_QPA_PLATFORM,wayland
env = QT_QPA_PLATFORMTHEME,qt5ct
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = MOZ_ENABLE_WAYLAND,1

samp
samp2

231112_15h45m08s_recording.mp4

Thanks 🙏

@fufexan
Copy link
Member

fufexan commented Nov 12, 2023

My guess is env = WLR_NO_HARDWARE_CURSORS,1 is causing the cursor to keep showing.

@diniamo
Copy link
Author

diniamo commented Nov 12, 2023

Even in non-nvidia environments, there are issues without that variable, but this should be fixable in the screenshot stack's code, right?

@fufexan
Copy link
Member

fufexan commented Nov 12, 2023

Not sure what "screenshot stack" refers to here, but it's likely a bug with either slurp or hyprpicker.

@diniamo
Copy link
Author

diniamo commented Nov 12, 2023

It refers to grim, slurp, and hyprpicker.

@vaxerski
Copy link
Member

none of these are the culprit, it's hyprland's fault. FWIW, same will happen on any wlroots compositor. We could get around it, but it would be inefficient.

@waddyhussain
Copy link

Had this issue for a while, but only just found out about the workaround of removing --freeze (or uninstalling hyprpicker if you don't use it). Had to look through one of the other threads to find it, so posting here in case anyone comes across this issue while searching.

@diniamo
Copy link
Author

diniamo commented Jan 1, 2024

Removing freeze makes it even worse for me, as now both the cursor and the box I used to select the area are present in the screenshot.

@Ilirski
Copy link

Ilirski commented Jan 16, 2024

Not sure if it's related, but I have to double click in order to finish selecting area when doingenv GRIMBLAST_EDITOR=gimp grimblast --notify --freeze edit area

Video_2024-01-16_15-06-26.mp4

Removing --freeze makes it open editor on click as expected.

@PacificViking
Copy link

I am having the same error with WLR_NO_HARDWARE_CURSORS=1 on Hyprland/Nix with both grim and grimblast.

@carschandler
Copy link

Also have this error on Hyprland/NixOS/nVidia with WLR_NO_HARDWARE_CURSORS=1

@leon-erd
Copy link

leon-erd commented May 9, 2024

For me omitting the --freeze option solves the problem of the cursor being in the image (but I'm also not using nvidia
/WLR_NO_HARDWARE_CURSORS=1).
Regarding the area selection box being visible in the image: I realized that the problem was due to the screenshot being taken before the closing layer animation of the selection was finished.
Disabling the animations for the selection in hyprland with:

layerrule=noanim, hyprpicker
layerrule=noanim, selection

Solved that for me! Maybe it helps someone :)

@diniamo
Copy link
Author

diniamo commented May 10, 2024

WLR_NO_HARDWARE_CURSORS=1 should be removed by everyone at this point, it's been fixed in git for a while, and the latest stable release has the patch too.

That also means we can solve this issue I guess.

@roastedcheese
Copy link

getting this again on -git and without WLR_NO_HARDWARE_CURSORS=1

@diniamo
Copy link
Author

diniamo commented May 26, 2024

Same, I forgot to report

@vaxerski
Copy link
Member

git ignores the env, it uses cursor:no_hardware_cursors instead

@roastedcheese
Copy link

don't have that set either

@diniamo
Copy link
Author

diniamo commented Sep 15, 2024

For anyone with this issue, cursor:allow_dumb_copy = true seems to fix it after the aq rewrite. I don't know if it has any downsides, I haven't noticed the hitch the hl wiki mentions.

@kRHYME7
Copy link

kRHYME7 commented Sep 15, 2024

Is this device dependent?

no_hardware_cursors = true

image
image
image
image

no_hardware_cursors = false

image
image

@diniamo
Copy link
Author

diniamo commented Sep 15, 2024

You should have no_hardware_cursors = false

@m2neral
Copy link

m2neral commented Oct 16, 2024

2024-10-16T22:28:19,049685288+03:00
2024-10-16T22:29:07,164581156+03:00

I tried everything on this page and it still doesn't work with or without --freeze. I'm on nvidia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests