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

Color picker eyedropper creates a black rectangle on the editor viewport #74048

Closed
MrEliptik opened this issue Feb 27, 2023 · 22 comments · Fixed by #74962
Closed

Color picker eyedropper creates a black rectangle on the editor viewport #74048

MrEliptik opened this issue Feb 27, 2023 · 22 comments · Fixed by #74962

Comments

@MrEliptik
Copy link

MrEliptik commented Feb 27, 2023

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

@akien-mga
Copy link
Member

CC @bruvzg @KoBeWi

@bruvzg
Copy link
Member

bruvzg commented Feb 27, 2023

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).

@KoBeWi
Copy link
Member

KoBeWi commented Feb 27, 2023

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.

godot.windows.editor.dev.x86_64_Qta1w8DMzN.mp4

@bruvzg
Copy link
Member

bruvzg commented Feb 27, 2023

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).

@KoBeWi
Copy link
Member

KoBeWi commented Feb 27, 2023

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.

@ababen1
Copy link

ababen1 commented Feb 27, 2023

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

@KoBeWi
Copy link
Member

KoBeWi commented Feb 27, 2023

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

@ababen1
Copy link

ababen1 commented Feb 27, 2023

I used obs yes

@ababen1
Copy link

ababen1 commented Feb 27, 2023

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

PXL_20230227_152610900.1.mp4

@couscousyeah
Copy link

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

@MrEliptik
Copy link
Author

MrEliptik commented Feb 27, 2023

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

@YuriSizov YuriSizov modified the milestones: 4.0, 4.1 Feb 27, 2023
@YuriSizov
Copy link
Contributor

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.

@Qubus0
Copy link

Qubus0 commented Mar 5, 2023

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

color.picker.window.shift.mov

@ghost
Copy link

ghost commented Mar 5, 2023

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.

@Qubus0
Copy link

Qubus0 commented Mar 5, 2023

@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

@ghost
Copy link

ghost commented Mar 5, 2023

@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).

@KoBeWi
Copy link
Member

KoBeWi commented Mar 5, 2023

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.

@Catastrphic
Copy link

i just used powertoys and copied it from there.

@joshchristiane
Copy link

Problem is still active and happening as of Godot 4.0.2

@cobrapitz
Copy link

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

image

@philoufc
Copy link

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

@KMouratidis
Copy link

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: #76551

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

Successfully merging a pull request may close this issue.