Skip to content

Commit 42224bb

Browse files
committed
Merge pull request #109694 from bruvzg/old_win_cap
[Windows] Fix color picker on old versions of Windows 10.
2 parents 40c96b8 + 274f88c commit 42224bb

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

doc/classes/DisplayServer.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,10 +2592,10 @@
25922592
The display server supports initiating window drag and resize operations on demand. See [method window_start_drag] and [method window_start_resize].
25932593
</constant>
25942594
<constant name="FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE" value="28" enum="Feature">
2595-
Display server supports [constant WINDOW_FLAG_EXCLUDE_FROM_CAPTURE] window flag.
2595+
Display server supports [constant WINDOW_FLAG_EXCLUDE_FROM_CAPTURE] window flag. [b]Windows, macOS[/b]
25962596
</constant>
25972597
<constant name="FEATURE_WINDOW_EMBEDDING" value="29" enum="Feature">
2598-
Display server supports embedding a window from another process. [b]Windows, Linux (X11)[/b]
2598+
Display server supports embedding a window from another process. [b]Windows, Linux (X11), macOS[/b]
25992599
</constant>
26002600
<constant name="FEATURE_NATIVE_DIALOG_FILE_MIME" value="30" enum="Feature">
26012601
Native file selection dialog supports MIME types as filters.
@@ -3123,7 +3123,7 @@
31233123
</constant>
31243124
<constant name="WINDOW_FLAG_EXCLUDE_FROM_CAPTURE" value="9" enum="WindowFlags">
31253125
Window is excluded from screenshots taken by [method screen_get_image], [method screen_get_image_rect], and [method screen_get_pixel].
3126-
[b]Note:[/b] This flag is implemented on macOS and Windows.
3126+
[b]Note:[/b] This flag is implemented on macOS and Windows (10, 20H1).
31273127
[b]Note:[/b] Setting this flag will prevent standard screenshot methods from capturing a window image, but does [b]NOT[/b] guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.
31283128
</constant>
31293129
<constant name="WINDOW_FLAG_POPUP_WM_HINT" value="10" enum="WindowFlags">

doc/classes/Window.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@
904904
</constant>
905905
<constant name="FLAG_EXCLUDE_FROM_CAPTURE" value="9" enum="Flags">
906906
Windows is excluded from screenshots taken by [method DisplayServer.screen_get_image], [method DisplayServer.screen_get_image_rect], and [method DisplayServer.screen_get_pixel].
907-
[b]Note:[/b] This flag is implemented on macOS and Windows.
907+
[b]Note:[/b] This flag is implemented on macOS and Windows (10, 20H1).
908908
[b]Note:[/b] Setting this flag will prevent standard screenshot methods from capturing a window image, but does [b]NOT[/b] guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.
909909
</constant>
910910
<constant name="FLAG_POPUP_WM_HINT" value="10" enum="Flags">

platform/windows/display_server_windows.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ bool DisplayServerWindows::has_feature(Feature p_feature) const {
149149
case FEATURE_STATUS_INDICATOR:
150150
case FEATURE_WINDOW_EMBEDDING:
151151
case FEATURE_WINDOW_DRAG:
152-
case FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE:
153152
return true;
153+
case FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE:
154+
return (os_ver.dwBuildNumber >= 19041); // Fully supported on Windows 10 Vibranium R1 (2004)+ only, captured as black rect on older versions.
154155
case FEATURE_EMOJI_AND_SYMBOL_PICKER:
155156
return (os_ver.dwBuildNumber >= 17134); // Windows 10 Redstone 4 (1803)+ only.
156157
#ifdef ACCESSKIT_ENABLED

platform/windows/os_windows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ String OS_Windows::get_version_alias() const {
639639
} else {
640640
windows_string += "Unknown";
641641
}
642-
// Windows versions older than 7 cannot run Godot.
642+
// Windows versions older than 10 cannot run Godot.
643643

644644
return vformat("%s (build %d)", windows_string, (int64_t)fow.dwBuildNumber);
645645
}

0 commit comments

Comments
 (0)