Commit Graph

151 Commits

Author SHA1 Message Date
49fcd4ce46 Merge pull request #101546 from bruvzg/portal_color_picker
[Linux] Implement native color picker.
2025-03-17 10:52:29 -05:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
3e4e6e6c0c Improve native file dialog parent window selection. 2025-03-06 17:15:39 +02:00
ab717497ef [Windows] Offload RenderingDevice creation test to subprocess. 2025-02-24 19:40:10 +02:00
a3d03717c0 Fix Floating Window request close when a dialog is opened 2025-02-05 20:34:32 -05:00
05ca80632d [Linux] Implement native color picker. 2025-02-03 16:30:44 +02:00
47f553ae0b Delegate to the DisplayServer the task of handling mouse_mode
- Add `MOUSE_MODE_MAX` and various index checks
2025-01-28 11:22:27 -05:00
b252867145 [macOS/Windows] Add Emoji & Symbols context menu item to LineEdit/TextEdit to show system character picker. 2025-01-10 09:25:34 +02:00
f134769506 Fix various typos
* Add TODO notes for typos that should be fixed for 5.0

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-08 14:47:42 +02:00
7f0b4e58b0 Implement DisplayServer.window_start_resize. 2025-01-07 07:58:02 +02:00
e1f129cb52 Support MIME types in file dialog filters on macOS and Linux. 2025-01-04 22:05:35 +02:00
9d2a4c03be Embedding game process in editor 2024-12-18 17:52:42 -05:00
9fece033ab [macOS, Windows] Add support for excluding windows from a screenshot. 2024-12-10 11:00:13 +02:00
84650f2018 Implement DisplayServer.beep. 2024-12-03 12:43:26 +02:00
b248d66265 [macOS] Use native window drag for the custom editor title bars. 2024-12-02 17:40:27 +02:00
2b49543478 Merge pull request #98709 from darksylinc/matias-upsidedown-splash
Fix splash screen upside down on Android
2024-11-04 21:52:01 -06:00
b9a2f108fc Fix splash screen upside down on Android
Fixes an issue introduced in #96439 (see
https://github.com/godotengine/godot/pull/96439#issuecomment-2447288702)

Godot was relying on Java's
activity.getWindowManager().getDefaultDisplay().getRotation(); to apply
pre-rotation but this is wrong.

First, getRotation() may temporarily return a different value from the
correct one; which is what was causing the splash screen to be upside
down. It would return -90 instead of 90 for the first rendered frame.

But unfortunately, the splash screen is just one frame rendered for a
very long time, so the error lingered for a long time for everyone to
see.

Second, to determine what rotation to use, we should be looking at what
Vulkan told us, which is the value we pass to
VkSurfaceTransformFlagBitsKHR::preTransform.

This commit removes the now-unnecessary
screen_get_internal_current_rotation() function (which was introduced by
#96439) and now saves the preTransform value in the swapchain.
2024-10-31 16:52:26 -03:00
0dfd18c84b [DisplayServer] Add feature flag for native file dialog access to user/res and options 2024-10-30 14:13:43 +05:30
748f4079e3 Merge pull request #96439 from darksylinc/matias-TheForge-pr03-rebased
Add Swappy & Pre-Transformed Swapchain
2024-10-29 12:34:40 -07:00
aaa0e2fddf Add Swappy & Pre-Transformed Swapchain
- Adds Swappy for Android for stable frame pacing
- Implements pre-transformed Swapchain so that Godot's compositor is in
charge of rotating the screen instead of Android's compositor
(performance optimization for phones that don't have HW rotator)

============================

The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.

Changes from original PR:

- Removed "display/window/frame_pacing/android/target_frame_rate" option
to use Engine::get_max_fps instead.
- Target framerate can be changed at runtime using Engine::set_max_fps.
- Swappy is enabled by default.
- Added documentation.
- enable_auto_swap setting is replaced with swappy_mode.
2024-10-28 18:55:37 -03:00
07e759b74a Merge pull request #97771 from dsnopek/openxr-linux-egl
OpenXR: Add support for Wayland on Linux
2024-10-25 13:04:08 -05:00
7dbea98c49 Merge pull request #97005 from Repiteo/core/window-corner-style
Core: Add `DisplayServer` flag for sharp corners
2024-10-21 16:39:25 -05:00
f8c4a683d7 Core: Add DisplayServer flag for sharp corners 2024-10-18 11:20:21 -05:00
af6d260c17 Don't include core/io/image.h in core/os/os.h
`core/os/os.h` doesn't use `core/io/image.h`. It just brings
transitive dependencies. Lots of dependencies because `core/os/os.h`
is transitively included in almost every file of godot

Also added `core/io/image.h` into files^1 where `Ref<Image>` and `core/os/os.h`
were used to prevent obscure errors involving `Ref<Image>`

^1 except those which include `core/io/image_loader.h` or `core/io/image.h` by
corresponding .h file with the same name

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-10-18 19:04:19 +03:00
256699ee31 OpenXR: Add support for Wayland on Linux 2024-10-04 11:44:05 -05:00
25f439c573 [DisplayServer] Implement has_hardware_keyboard method for Android and iOS. 2024-10-02 20:09:48 +03:00
62753701fd Add caching to DisplayServer::can_create_rendering_device()
This greatly speeds up the method when using the Compatibility rendering
method, where this method is not guaranteed to return `true` in that case.
2024-10-01 19:43:46 +02:00
04d0e7f7a4 Check if RD is supported in the ProjectManager and disable creating RD projects if not supported. 2024-08-02 12:36:45 -07:00
97aa278edb Pass window exclusive and transient properties for subwindow creation
On Windows this allows to avoid having to change the owner of the window
after it has been created, which in rare circumstances may cause the
window to bug out.
2024-07-25 00:27:27 +08:00
7a5a8597eb Always render when XR is enabled, even if no OS windows can draw 2024-07-17 08:19:21 -05:00
91e995e704 Fix creating cursor image from AtlasTexture 2024-06-05 01:44:05 +02:00
628c81d2d9 [DisplayServer] Add method to check if window transparency is supported and enabled. 2024-05-23 15:23:18 +03:00
a3769c0edc Properly set window class in Wayland 2024-05-22 10:42:12 -03:00
e5205e589f [StatusIndicator] Add method to get indicator icon screen rect. 2024-05-02 14:39:33 +03:00
85062e37ef Merge pull request #89588 from bruvzg/status_ind_menu_direct
[StatusIndicator] Switch API to use Texture2D instead of Image, improve handling on macOS, add method to set native popup menu directly.
2024-05-01 09:54:44 +02:00
c28f5901c7 Polish interaction between windowing, input and rendering
- Adapt GL make/release API to the current architecture.
- Fix DisplayServer being locked while dispatching input (prevent deadlocks).
2024-04-10 18:47:42 +02:00
dc01658ee9 [DisplayServer] Add separate feature flags for different native dialog types. 2024-03-26 15:18:06 +02:00
399899a095 [NativeMenu] Move files to the display subfolder. 2024-03-26 10:18:08 +02:00
0587a1d217 [StatusIndicator] Switch API to use Texture2D instead of Image, improve handling on macOS, add method to set native popup menu directly. 2024-03-20 11:56:07 +02:00
c65a667924 Move global_menu_* methods to a separate NativeMenu class. 2024-03-04 23:41:41 +02:00
3aeb4a5542 Improve cursor_set_custom_image() method 2024-02-28 20:32:25 +01:00
b6dee8850b Merge pull request #87384 from bruvzg/sys_base_color
Add method to get "base" system UI color and system theme change callback.
2024-02-13 23:43:21 +01:00
ee53ae28df Add method to get "base" system UI color (macOS/Windows) and system theme change callback. 2024-02-13 18:38:53 +02:00
deffe6a3be [macOS] Add support for native help menu search callbacks, integrate editor help. 2024-02-13 18:37:37 +02:00
8da36031e4 Implement support for application status indicators (tray icons). 2024-02-13 15:59:35 +02:00
a8f521bcad [Native File Dialog] Add support for adding custom options to the dialogs.
Add support for adding custom options (checkboxes and optionboxes) to the dialogs (both native and built-in).
2024-01-24 15:00:31 +02:00
15144c24bd Implement a transient_to_focused mode
This intends to be the correct way to handle non-child windows becoming covered by the current window when becoming focused.
Enabling this property on select windows, they will become transient to the currently focused one when becoming visible.

This deprecates the "unparent_when_invisible" function introduced by #76025.
2024-01-14 18:51:44 +01:00
0d44b50520 [macOS] Add default Window and Help menus, allow special menu customization. 2023-12-13 23:20:05 +02:00
d5db0e5032 Merge pull request #81218 from bruvzg/_temp_fs
[Native File Dialogs] Improve filter list handling, add selected filter to the callback.
2023-10-04 15:34:16 +02:00
d1aaa914f3 [macOS] Add about_to_open and popup_hide callback for the global menus, move part of logic to the PopupMenu to allow live menu modification. 2023-10-04 09:49:51 +03:00