godot icon indicating copy to clipboard operation
godot copied to clipboard

Color picker eyedropper creates a black rectangle on the editor viewport

Open MrEliptik opened this issue 2 years ago • 17 comments

Godot version

4.0.rc6

System information

Windows 10, Forward+, GTX 1070 driver 528.49

Issue description

As you can see on the screenshot, a black square appears with the message "Color Picking active" at the top. color_picker_eyedropper_bug The screenshot has been taken on my ultrawide monitor but it does the same on every monitor I have. Also, if I open up the eyedropper again, the black square takes the whole screen instead of a smaller part.

From there, pressing escape or clicking anywhere ON the rectangle closes the color picker and removes the black square and the selected color is black. If I click on the editor outside of the black rectangle, the color picker is closed but it doesn't select any color.

I've tested this issue on Windows with RC3, 4 5 and 6 and also with the three renderer available: Forward+, Compatibility and Mobile and the results are the same.

Someone else tried on Linux and had the same problem on the three renderer avaialble: Forward+, Compatibility and Mobile. Linux config in case it's important: Ubuntu 22.10 - KDE (X11) 3060 RTX mobile, driver: 525.78.01

I've seen this issue that seems somewhat related but they're not decribing the black square that I see.

Steps to reproduce

In an empty Godot 4 project, try to use the color picker eydropper tool to get a color on the screen

Minimal reproduction project

N/A

MrEliptik avatar Feb 27 '23 13:02 MrEliptik

CC @bruvzg @KoBeWi

akien-mga avatar Feb 27 '23 13:02 akien-mga

I can reproduce it on macOS as well (but black rect is covering the top quarter of the window).

I have never looked at the color picker code, but seems like color picker is trying to cover the parent window with a popup and draw copies of the other windows on it, which is a really strange way to do it and will never work (it at least should have a separate window for each screen, but it still won't since itš not taking screen safe rect into account).

bruvzg avatar Feb 27 '23 14:02 bruvzg

I think #72764 last touched this functionality. I can't reproduce this issue, for me it works without problems. Tested on Windows 10 on master.

https://user-images.githubusercontent.com/2223172/221585440-d2cc755b-ac5b-4318-9fc5-35d7520f88b9.mp4

KoBeWi avatar Feb 27 '23 14:02 KoBeWi

I can't reproduce this issue, for me it works without problems. Tested on Windows 10 on master.

Try in on the second display or with non-maximized window. It only works if main window is at (0,0) position and on the display which is at (0,0).

bruvzg avatar Feb 27 '23 14:02 bruvzg

Ah right 🤔 Although for me only the background is black, the Godot window is intact and picking is still working. It's weird that everything becomes black, but at least it's functional, idk.

I think the problem is that the picking window does not fit the parent.

KoBeWi avatar Feb 27 '23 14:02 KoBeWi

I get quick flashes of black on my screen. I tried to capture it on video but the recording program just blacked out until i stopped the color picking

ababen1 avatar Feb 27 '23 14:02 ababen1

What program did you use? I think OBS should be able to handle it.

KoBeWi avatar Feb 27 '23 15:02 KoBeWi

I used obs yes

ababen1 avatar Feb 27 '23 15:02 ababen1

I managed to record it using the age old method of recording your screen with a phone camera

https://user-images.githubusercontent.com/80917990/221607771-2205809a-d12c-461b-bad2-fb70bc9b95a7.mp4

ababen1 avatar Feb 27 '23 15:02 ababen1

I'm the Linux user MrEliptik mentioned, and i tried it without external monitor connected : no black screen anymore, it works as intended.

couscousyeah avatar Feb 27 '23 15:02 couscousyeah

I confirm that disconnecting all my other monitors to keep only one fixes the problem. I see a small rectangle with the color being picked instead of the big black rectangle. Same thing with my laptop with no external screens, it works as intended.

On the laptop I see a black screen for a very short amount of time when I click on the eyedropper. Probably the rectangle displaying the color before it gets resized and placed at the top of the screen?

image

MrEliptik avatar Feb 27 '23 16:02 MrEliptik

So this seems pretty bad. But I'm also kind of surprised it's only reported now for how bad it is. Let's aim to fix it soon and include in a 4.0.x release.

YuriSizov avatar Feb 27 '23 19:02 YuriSizov

It's not only windows (as the tags would suggest). The behaviour is bad in a slightly different way on Mac, so I'm not quite sure that it qualifies as the same bug. Anyway - v4.0.stable. Color picking shifts the whole window area down

also related issue

  • #73935

https://user-images.githubusercontent.com/51323316/222938906-43dce778-c7c4-406a-854b-a90f5c086e5c.mov

Qubus0 avatar Mar 05 '23 02:03 Qubus0

I'd like to add that it's not very user friendly that you can't pick colors outside Godot's windows. Everything else turns black even on a single-monitor system, and it doesn't look very good.

ghost avatar Mar 05 '23 03:03 ghost

@dame-ng color picking the whole monitor is a whole different beast that requires screen recording to be allowed afaik. Applications can not view outside their windows by design. You will notice The same behaviour in many other applications as well. As much as I would like it too, I think It would be best in a feature request

Qubus0 avatar Mar 05 '23 03:03 Qubus0

@Qubus0 I'm not sure about macOS, but I've done it on Windows without any problems.

demo

I also use apps that allow to do it, and likely on macOS too (Clip Studio Paint, for example).

ghost avatar Mar 05 '23 03:03 ghost

AFAIK there are some system-specific methods to allow that. GIMP supports it and it works very well, even taking the screen color calibration into account.

KoBeWi avatar Mar 05 '23 04:03 KoBeWi

i just used powertoys and copied it from there.

Catastrphic avatar Mar 05 '23 20:03 Catastrphic

Problem is still active and happening as of Godot 4.0.2

joshchristiane avatar May 14 '23 16:05 joshchristiane

Can confirm for 4.0.2 stable Win10 | AMD Ryzen 7 3700X | RTX 3060 Ti and 6600XT | Forward+

image

cobrapitz avatar May 14 '23 17:05 cobrapitz

4.0.2 stable, under Debian 11, with dual monitors with the primary display set as the one on the right.

it's as if godot is momentarily calculating the 0,0 position from both screens, which is on 2nd monitor and is outside of the engine, which would explain why it turns all black? otherwise, if i have godot on that (left-most) screen, it works properly, as shown below:

Screencast 2023-05-17 18:04:19.webm

philoufc avatar May 17 '23 22:05 philoufc

Experienced this on 4.0.3 and can confirm it's also not an issue for me if I use a different monitor. This also looks similar to my other issue: https://github.com/godotengine/godot/issues/76551

KMouratidis avatar May 21 '23 17:05 KMouratidis