1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-27 15:57:02 +00:00
Commit Graph

312 Commits

Author SHA1 Message Date
Riteo
408de3c970 Wayland: Fix window fitting in single-window mode
We disabled window fitting in multi-window mode as it was broken due to
the limited data but it should still be enabled for embedded windows.
2025-05-21 00:58:41 +02:00
Thaddeus Crews
22a0e81a69 Merge pull request #103922 from Jesusemora/Jesusemora-patch-1
Show `theme_type_variation`s in the inspector on `Control`s that inherit a theme
2025-05-13 16:22:29 -05:00
Rémi Verschelde
1f2f144ce7 Merge pull request #106298 from bruvzg/ac_win_transform
[Accessibility] Account for window scaling transform when setting node bounds.
2025-05-13 01:05:38 +02:00
Jesusemora
b22eba1285 Show theme_type_variations in the inspector on Controls that inherit a theme
`theme_type_variation`s are now shown in the children and children of children
that inherit a theme from a parent `Control` node.
2025-05-13 00:56:06 +02:00
Pāvels Nadtočajevs
870fb5f74b [Accessibility] Account for window scaling transform when setting node bounds. 2025-05-12 09:12:55 +03:00
Pāvels Nadtočajevs
5441a82cfb Do not call accessibility_set_window_rect on Wayland, fix main windows accessibility context creation. 2025-05-11 12:51:46 +03:00
Pāvels Nadtočajevs
c6e1bc6170 Fix oversampling for embedded windows using content scale. 2025-04-30 17:35:22 +03:00
lawnjelly
f8f350a32a Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
kobewi
2ed4ed8cd0 Improve Window's _validate_property() 2025-04-24 23:05:48 +02:00
Pāvels Nadtočajevs
4afeca3bcf Replace global oversampling with overrideable per-viewport oversampling. 2025-04-14 13:43:09 +03:00
Thaddeus Crews
e6a61b1ecc Merge pull request #76829 from bruvzg/ac_kit_direct
Implement screen reader support using AccessKit library.
2025-04-08 12:32:47 -05:00
Pāvels Nadtočajevs
b106dfd4f9 Base accessibility API. 2025-04-08 20:14:28 +03:00
Pāvels Nadtočajevs
f37fb49739 Add separate minimize_disabled and maximize_disabled window flags. 2025-04-07 18:58:11 +03:00
Riteo
84d3adcf2f Wayland: Implement native sub-windows
The backend is now mature enough to not explode with multiple windows
but the `DisplayServer` API still cannot meet some guarantees required
by the various Wayland protocols we use. To meet those guarantees this
patch adds three new elements to the DisplayServer API, with relative
handling logic for `Window` and `Popup` nodes:

 - `WINDOW_EVENT_FORCE_CLOSE`, which tells a window to *forcefully*
close itself and ensure a proper cleanup of its references, as Wayland
enforces this behavior;

 - `WINDOW_FLAG_POPUP_WM_HINT`, which explicitly declares a window as a
"popup", as Wayland enforces this distinction and heuristics are not
reliable enough;

 - `FEATURE_SELF_FITTING_WINDOWS`, which signals that the compositor can
fit windows to the screen automatically and that nodes should not do
that themselves.

Given the size of this feature, this patch also includes various
`WaylandThread` reworks and fixes including:

 - Improvements to frame wait logic, with fixes to various stalls and a
configurable (through a `#define`) timeout amount;

 - A proper implementation of `window_can_draw`;

 - Complete overhaul of pointer and tablet handling. Now everything is
always accumulated and handled only on each respective `frame` event.
This makes their logic simpler and more robust.

 - Better handling of pointer leaving and pointer enter/exit event
sending;

 - Keyboard focus tracking;

 - More solid window references using IDs instead of raw pointers as
windows can be deleted at any time;

 - More aggressive messaging to window nodes to enforce rects imposed by
the compositor.
2025-04-04 20:23:25 +02:00
Thaddeus Crews
8f6bb119f4 Merge pull request #100602 from KoBeWi/over_100_changes_in_50_random_files_aka_the_best_kind_of_PR
Add templated version of `ObjectDB::get_instance()`
2025-03-31 12:03:47 -05:00
kobewi
bc9d0c7835 Add templated version of ObjectDB::get_instance() 2025-03-27 15:43:23 +01:00
kobewi
75881f8322 Use initializer list in Arrays 2025-03-26 18:38:15 +01:00
Pāvels Nadtočajevs
fd98c963ba [Editor] Change global menu icons theme independently of editor theme. 2025-03-07 08:59:52 +02:00
KerekesDavid
315cc5e437 Fix wrong viewport scaling at intermediate resolutions
Fixes viewport scale being wrong at resolutions that are not
integer multiples of content_scale_factor.

This is done by allowing size_2d_override to be Size2 instead of
Size2i. This change is not propagated to the exposed SubViewport
to keep compatibility for now.
2025-02-21 11:24:38 +01:00
Hilderin
05fcfede1e Fix Floating Game Window Title 2025-01-19 15:45:59 -05:00
Pāvels Nadtočajevs
8d911b2554 [Window] Expose start_drag and start_resize methods (for both native and embedded windows). 2025-01-07 23:35:14 +02:00
Thaddeus Crews
01c6e18963 Merge pull request #100745 from mdelorme/mdelorme/issue_100727
Assign the project manager title to the node instead of DisplayServer
2024-12-30 08:58:23 -06:00
A Thousand Ships
a1846b27ea Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
Maxime Delorme
e4e966b0f2 Fix #100727 by giving the project manager title to the node instead of DisplayServer 2024-12-23 19:44:18 +01:00
Anish Mishra
9f3067ef21 Fix Window size changes ignored on Android 2024-12-22 23:12:54 +05:30
Rémi Verschelde
88e6997917 Merge pull request #97745 from scgm0/Fix-blurred-content-of-embedded-windows
Improve blurred content of embedded windows
2024-12-22 00:09:55 +01:00
Rémi Verschelde
a7a2a12bfd Merge pull request #100671 from bruvzg/get_menu
[MenuBar] Use PopupMenu title property as a menu name.
2024-12-20 23:57:47 +01:00
Rémi Verschelde
a11364d1e6 Merge pull request #99010 from Hilderin/embedding-game-process
Embed game process in editor
2024-12-20 23:56:43 +01:00
Pāvels Nadtočajevs
9604e98a52 [MenuBar] Use PopupMenu title property as a menu name. 2024-12-20 23:35:07 +02:00
scgm0
0bc2c269cb Fix blurred content of embedded windows 2024-12-20 22:44:36 +08:00
Hilderin
9d2a4c03be Embedding game process in editor 2024-12-18 17:52:42 -05:00
Markus Sauermann
0eff41d045 Fix displaying of embedded Window
Fix Rect of texture to take window and stretch transform into account.

There is no need for `viewport_attach_to_screen` for embedded windows,
since their display is handled via `Viewport::_sub_window_update`.
2024-12-17 08:38:14 +01:00
bruvzg
9fece033ab [macOS, Windows] Add support for excluding windows from a screenshot. 2024-12-10 11:00:13 +02:00
Rémi Verschelde
302da3d9a4 Merge pull request #99669 from syntaxerror247/root_window_issues
Fix root window size bug on `Android`
2024-12-02 15:51:16 +01:00
Anish Mishra
c699d5bada Fix root window size bug on Android 2024-12-02 19:00:28 +05:30
kobewi
e0304a7d00 Add helper method to get Window from ID 2024-11-29 21:15:23 +01:00
Pāvels Nadtočajevs
932b2269f8 Fix missing native file dialog title translation. 2024-11-14 14:48:52 +02:00
Fabio Alessandrelli
7cd850b909 [Debugger] Move quit shortcut configuration to the SceneDebugger 2024-11-07 15:03:17 +01:00
Thaddeus Crews
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
Thaddeus Crews
f8c4a683d7 Core: Add DisplayServer flag for sharp corners 2024-10-18 11:20:21 -05:00
Haoyu Qiu
009446a277 Add System Locale layout direction for Control and Window 2024-10-17 07:52:07 +08:00
Markus Sauermann
60aaa017ff Enable Drag and Drop for SubViewports and Windows
Make Drag and Drop an application-wide operation.
This allows do drop on Controls in other Viewports/Windows.

In order to achieve this, `Viewport::_update_mouse_over` is adjusted to
remember the Control, that the mouse is over (possibly within nested
viewports). This Control is used as a basis for the Drop-operation, which
replaces the previous algorithm, which was only aware of the topmost
Viewport.

Also now all nodes in the SceneTree are notified about the Drag and Drop
operation, with the exception of SubViewports that are not children of
SubViewportContainers.
2024-09-15 01:06:02 +02:00
Rémi Verschelde
83d54ab2ad Merge pull request #96708 from bruvzg/lbl3d_os
[Label3D] Fix updating labels in subvieports on oversampling change.
2024-09-12 10:28:52 +02:00
rune-scape
0dde931bc9 StringName: Fix empty hash
+Fixed compat hashes
2024-09-09 13:30:02 -07:00
bruvzg
bdd5117086 [Label3D] Fix updating labels in subvieports on oversampling change. 2024-09-08 15:11:13 +03:00
Rémi Verschelde
091212b4f1 Merge pull request #93602 from aaronp64/inspector_latency
Improve Editor Inspector/Theme item lookup performance
2024-08-22 00:10:26 +02:00
aaronp64
7593e55527 Improve Editor Inspector/Theme item lookup performance
Changes to reduce the latency between changing node selection in the editor and seeing the new node reflected in the Inspector tab

- Use Vector instead of List for ThemeOwner::get_theme_type_dependencies and related functions
- Use Vector instead of List for ThemeContext::themes, set_themes(), and get_themes()
- Add ClassDB:get_inheritance_chain_nocheck to get all parent/ancestor classes at once, to avoid repeated ClassDB locking overhead
- Update BIND_THEME_ITEM macros and ThemeDB::update_class_instance_items to use provided StringNames for call to ThemeItemSetter, instead of creating a new StringName in each call

These changes reduce the time taken by EditorInspector::update_tree by around 30-35%
2024-08-20 13:39:40 -04:00
DE-YU
46abbae2b0 Fix Window.wrap_controls does not account for the content_scale_factor 2024-08-19 14:48:43 +02:00
Haoyu Qiu
7343dc3a5d Split TranslationServer into its own file 2024-08-15 15:00:47 +08:00
kit
fce60c2b3f Fix update mouse cursor state wrong mouse position 2024-07-31 14:10:40 -04:00