Commit Graph

131 Commits

Author SHA1 Message Date
101fbbbd1f [Window] Add unfiltered input handler signal for custom decorations. 2025-10-12 21:15:46 +03:00
dd6099617a Clarify that EXCLUDE_FROM_CAPTURE only works with native windows. 2025-08-21 00:14:58 +03:00
274f88c5b8 [Windows] Fix color picker on old versions of Windows 10. 2025-08-18 09:23:31 +03:00
f54b314ae3 [Docs] Add few notes about screen capture. 2025-06-13 10:51:01 +03:00
41009718d2 Fix outdated MODE_FULLSCREEN description 2025-06-12 11:58:47 +02:00
4e20e33e21 Expose Node.can_auto_translate() 2025-06-11 11:26:43 +08:00
4e6f5f31dc Merge pull request #107305 from timothyqiu/single-window-title
Fix window title drawn outside the title bar
2025-06-09 12:31:34 -05: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
f028bc93db Fix window title drawn outside the title bar 2025-06-09 16:20:26 +08: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
13f642d959 Replace XML codeblock spaces with tabs 2025-06-06 14:35:38 +02:00
1e82bafa3a Remove redundant info on the enum types used 2025-06-04 08:21:47 +08: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
95dc68c8c6 Merge pull request #105107 from bruvzg/min-max-flag
Add separate `minimize_disabled` and `maximize_disabled` window flags.
2025-04-08 12:32:44 -05:00
d98c3f5ffe Merge pull request #104333 from Mickeon/documentation-even-more-miscellaneous-oddities
Fix *even* more miscellaneous oddities around the class reference
2025-04-08 12:32:41 -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
7603945d14 Fix *even* more miscellaneous oddities around the class reference 2025-04-07 17:37:08 +02:00
f60c98f4e4 Fix typo in Window's exclude_from_capture 2025-04-05 14:22:36 +02: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
179ce63dbf Update class docs: dpi_changed signal is supported on Linux (Wayland) 2025-04-01 19:40:36 +02:00
8d911b2554 [Window] Expose start_drag and start_resize methods (for both native and embedded windows). 2025-01-07 23:35:14 +02:00
7b42fb969e Merge pull request #100685 from raulsntos/dotnet/collection-expressions
[.NET] Use collection expressions in docs
2024-12-23 11:15:15 -06:00
072ff85f82 [.NET] Use collection expressions in docs
As of C# 12 we can now use collection expressions to reduce some boilerplate when initializing collections.
2024-12-21 02:28:59 +01:00
9604e98a52 [MenuBar] Use PopupMenu title property as a menu name. 2024-12-20 23:35:07 +02:00
9fece033ab [macOS, Windows] Add support for excluding windows from a screenshot. 2024-12-10 11:00:13 +02:00
1745fe15a4 Merge pull request #99837 from thiagola92/docs_window_files_dropped
Docs: update example from Window signal files_dropped
2024-11-29 22:51:38 +01:00
e30da67ce9 Docs: update example from Window signal files_dropped 2024-11-29 11:38:04 -03:00
88e81ee730 Fix various typos and code style issues 2024-11-28 17:40:42 +01:00
9c300a6c05 Merge pull request #80965 from Calinou/viewport-add-get-stretch-scale-factor
Add a Viewport method to get automatically computed 2D stretch transform
2024-11-27 10:47:12 -06:00
0cf99cf95d Add a Viewport method to get automatically computed 2D stretch transform
`Viewport.get_stretch_transform()` returns the automatically computed
2D stretch transform. Combined with `Transform2D.get_scale()`, this is
useful when using the `canvas_items` stretch mode in a project.

There are many situations where knowing this factor is useful:

- Divide Camera2D zoom to keep the size of the 2D game world identical
  regardless of the 2D scale factor (so that UI elements can still be scaled).
- Make certain controls always drawn at 1:1 scale
  (e.g. for the crosshair in a FPS). This is done by dividing the Control
  node's scale by the scale factor.
2024-11-19 23:11:13 +01:00
2c31bd767c Merge pull request #99020 from Mickeon/documentation-example-pruning-2
Clean up more `[b]Example:[/b]` lines from the class reference
2024-11-12 09:28:02 -06:00
932b1c434c Clean up more [b]Example:[/b] lines from the class reference 2024-11-11 12:05:34 +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
2ed679eb87 Document expected coordinates in PopupMenu.popup()
- Improve documentation related to embedded subwindows and single-window mode.
- Add `minsize` keyword aliases for `popup_centered_clamped()` methods
  to ease migration to Godot 4.x (this was Godot 3.x terminology).
2024-08-05 16:45:33 +02:00
64d789aba7 Fix get_position_with_decorations and get_size_with_decorations for embedded windows. 2024-05-24 20:10:36 +03:00
cfdb968848 [Window] Allow to override viewport and project settings and force use of native window. 2024-03-04 23:06:27 +02:00
c9b531c613 Merge pull request #88920 from AThousandShips/group_doc_fix
[Doc] Fix some incorrect uses of "children"
2024-02-29 13:54:18 +01:00
9b5cd8e240 [Doc] Fix some incorrect uses of "children" 2024-02-29 11:52:55 +01:00
3fe01226b7 Use black for font outlines by default instead of white
This makes font outlines more usable out of the box, as black
is one of the most commonly used colors for font outlines.
2024-02-28 20:25:15 +01:00
5ba92e5a57 Fix some DEFVALs to use the right type
- Use `StringName()` in DEFVAL for StringNames.
- Use `Variant()` in DEFVAL for Variants.
2024-02-23 01:50:18 +01:00
f9a758772a Update many Deprecated/Experimental descriptions for consistency 2024-02-17 21:33:12 +01:00
7b42c24550 Make auto translation inheritable 2024-02-15 16:51:19 -03:00
af28f87791 Documentation: Add support for deprecated/experimental messages 2024-02-15 15:59:50 +03:00
0d88aadd53 Automatically set viewport background to transparent when window flag is set. 2024-02-02 10:40:26 +02:00
03767fbf3b Merge pull request #86446 from reduz/transient-to-focused
Implement a `transient_to_focused` Window mode
2024-01-15 13:25:00 +01: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