Commit Graph

317 Commits

Author SHA1 Message Date
07ee1331e8 Merge pull request #106952 from bruvzg/fna_emb_fx
Fix window embedding for windows with `force_native` enabled.
2025-06-10 12:30:11 +02:00
6427343ec8 Merge pull request #106660 from bruvzg/ac_node_to_ctl
Move some accessibility properties from Node to Control
2025-06-09 12:31:32 -05:00
3886ee84e6 Don't store deprecated auto_translate property 2025-06-08 21:53:28 +08:00
aff5b413aa Move some accessibility properties from Node to Control 2025-06-08 16:25:28 +03:00
4877a964e4 Fix window embedding for windows with force_native enabled. 2025-05-30 08:31:17 +03:00
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
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
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
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
870fb5f74b [Accessibility] Account for window scaling transform when setting node bounds. 2025-05-12 09:12:55 +03:00
5441a82cfb Do not call accessibility_set_window_rect on Wayland, fix main windows accessibility context creation. 2025-05-11 12:51:46 +03:00
c6e1bc6170 Fix oversampling for embedded windows using content scale. 2025-04-30 17:35:22 +03:00
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
2ed4ed8cd0 Improve Window's _validate_property() 2025-04-24 23:05:48 +02:00
4afeca3bcf Replace global oversampling with overrideable per-viewport oversampling. 2025-04-14 13:43:09 +03:00
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
b106dfd4f9 Base accessibility API. 2025-04-08 20:14:28 +03:00
f37fb49739 Add separate minimize_disabled and maximize_disabled window flags. 2025-04-07 18:58:11 +03:00
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
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
bc9d0c7835 Add templated version of ObjectDB::get_instance() 2025-03-27 15:43:23 +01:00
75881f8322 Use initializer list in Arrays 2025-03-26 18:38:15 +01:00
fd98c963ba [Editor] Change global menu icons theme independently of editor theme. 2025-03-07 08:59:52 +02:00
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
05fcfede1e Fix Floating Game Window Title 2025-01-19 15:45:59 -05:00
8d911b2554 [Window] Expose start_drag and start_resize methods (for both native and embedded windows). 2025-01-07 23:35:14 +02:00
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
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
e4e966b0f2 Fix #100727 by giving the project manager title to the node instead of DisplayServer 2024-12-23 19:44:18 +01:00
9f3067ef21 Fix Window size changes ignored on Android 2024-12-22 23:12:54 +05:30
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
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
a11364d1e6 Merge pull request #99010 from Hilderin/embedding-game-process
Embed game process in editor
2024-12-20 23:56:43 +01:00
9604e98a52 [MenuBar] Use PopupMenu title property as a menu name. 2024-12-20 23:35:07 +02:00
0bc2c269cb Fix blurred content of embedded windows 2024-12-20 22:44:36 +08:00
9d2a4c03be Embedding game process in editor 2024-12-18 17:52:42 -05:00
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
9fece033ab [macOS, Windows] Add support for excluding windows from a screenshot. 2024-12-10 11:00:13 +02:00
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
c699d5bada Fix root window size bug on Android 2024-12-02 19:00:28 +05:30
e0304a7d00 Add helper method to get Window from ID 2024-11-29 21:15:23 +01:00
932b2269f8 Fix missing native file dialog title translation. 2024-11-14 14:48:52 +02:00
7cd850b909 [Debugger] Move quit shortcut configuration to the SceneDebugger 2024-11-07 15:03:17 +01: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
009446a277 Add System Locale layout direction for Control and Window 2024-10-17 07:52:07 +08:00
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
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
0dde931bc9 StringName: Fix empty hash
+Fixed compat hashes
2024-09-09 13:30:02 -07:00
bdd5117086 [Label3D] Fix updating labels in subvieports on oversampling change. 2024-09-08 15:11:13 +03:00