Commit graph

268 commits

Author SHA1 Message Date
rune-scape
0dde931bc9 StringName: Fix empty hash
+Fixed compat hashes
2024-09-09 13:30:02 -07: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
Alvin Wong
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
bruvzg
18393eb09a
[Window] Ignore duplicate mouse enter events. 2024-06-12 22:37:28 +03:00
bruvzg
768fd1eacb
[Window] Fix mouse hover state of the main window when mouse enter event was sent before setting callbacks. 2024-06-10 18:43:01 +03:00
bruvzg
864a93fdbf
Fix excessive canvas items updates. 2024-06-05 21:01:30 +03:00
bruvzg
9fb9660912
Force canvas item update on oversampling change. 2024-06-03 19:46:49 +03:00
bruvzg
5c433cf693
Update editor Window preview position when resizing window. 2024-05-31 07:52:46 +03:00
Rémi Verschelde
c9f249796d
Merge pull request #92317 from bruvzg/emb_decorations
Fix `get_position_with_decorations` and `get_size_with_decorations` for embedded windows.
2024-05-30 11:48:02 +02:00
bruvzg
19839d9553
Fix Window position preview in the editor. 2024-05-29 11:56:06 +03:00
bruvzg
64d789aba7
Fix get_position_with_decorations and get_size_with_decorations for embedded windows. 2024-05-24 20:10:36 +03:00
kobewi
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
kobewi
a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
A Thousand Ships
308dbb8c63
[Core] Add scalar versions of Vector* min/max/clamp/snap(ped)
Convenience for a number of cases operating on single values
2024-05-02 10:31:13 +02:00
Rémi Verschelde
c951421c99
Merge pull request #90268 from RandomShaper/wtp_servers
Use WorkerThreadPool for Server threads (enhanced)
2024-04-15 10:12:00 +02:00
aaronp64
4ed51933f9 Fix Window.hide() crash when force_native changed
Moved force_native = p_force_native assignment to after is_visible() check, to prevent value from changing after window is shown.

Fixes #90609
2024-04-13 14:03:29 -04:00
Pedro J. Estébanez
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
Markus Sauermann
945babc619 Prohibit execution of delayed input events by different means
In some cases it can happen, that the order of input events and
window events is not followed, when input buffering or input accumulation
is active.

The display server order `InputEvent` => window-event gets changed to
window-event => `InputEvent` which becomes problematic in certain
situations.

This PR makes sure, that the order is adhered to by flushing input events
before a window event is sent.
Previously this problem was mitigated by discarding these delayed events.
But this solution was problematic in the setting of android input events.
2024-03-27 20:58:15 +01:00
Rémi Verschelde
d66539e485 Merge pull request #89673 from bruvzg/f_na_ed
Do not apply `force_native` to the edited scene windows.
2024-03-25 13:16:03 +01:00
A Thousand Ships
79ba22a73f
Use Vector* component-wise min/max/clamp functions where applicable 2024-03-20 13:47:42 +01:00
bruvzg
92d69da7a6
Do not apply "force_native" to the edited scene windows. 2024-03-19 12:39:50 +02:00
bruvzg
cfdb968848
[Window] Allow to override viewport and project settings and force use of native window. 2024-03-04 23:06:27 +02:00
Rémi Verschelde
3ce9ae71fc
Merge pull request #84906 from /fix-some-defvals 2024-02-23 11:29:22 +01:00
Raul Santos
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
Michael Alexsander
584a6aeeb7
Revert "Fix NOTIFICATION_WM_SIZE_CHANGED firing if the size hasn't changed"
This reverts commit 957378a69e, reversing
changes made to 0d88840e81.
2024-02-21 15:37:53 -03:00
Rémi Verschelde
dfcecb77bd
Merge pull request #79617 from sepTN/add-screensize-check-popup
Add size check to prevent popup bigger than the screen itself
2024-02-19 00:07:01 +01:00
Septian
34210e812a Add screen size check on popup 2024-02-19 00:25:02 +07:00
Michael Alexsander
7b42c24550
Make auto translation inheritable 2024-02-15 16:51:19 -03:00
bruvzg
0d88aadd53
Automatically set viewport background to transparent when window flag is set. 2024-02-02 10:40:26 +02:00
A Thousand Ships
15369fdb1d
Remove unnecessary this-> expressions 2024-01-29 09:59:18 +01:00
Rémi Verschelde
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
Juan Linietsky
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
Jakub Marcowski
06534f8ad5 Add deprecation notice to a duplicate method of class Window 2024-01-12 18:18:28 +01:00
kobewi
0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
Rémi Verschelde
957378a69e
Merge pull request #84151 from YeldhamDev/that_was_not_a_resize_you_dunce
Fix `NOTIFICATION_WM_SIZE_CHANGED` firing if the size hasn't changed
2024-01-02 15:08:46 +01:00
Yuri Sizov
02d4579fa2 Merge pull request #85000 from bruvzg/ed_ui_direction
[Editor] Add option to override editor UI layout direction.
2023-12-19 13:01:35 +01:00
Yuri Sizov
8a9aa30348 Merge pull request #81243 from Sauermann/fix-window-events
Fix internal events not being delivered to some Window types
2023-12-19 13:01:00 +01:00
bruvzg
f9c42d9fff
Limit window size updates on title translation change. 2023-12-06 10:51:27 +02:00
Rémi Verschelde
36e033bce8
Merge pull request #85312 from YuriSizov/window-and-the-case-of-an-unexpected-shrinkage
Make sure `Window`'s title is respected before we compute the size
2023-12-05 13:05:23 +01:00
bruvzg
5dd11e8eee
Limit window size updates on title change. 2023-11-30 16:04:00 +02:00
bruvzg
bf19ced15d
Fix crash on late mouse enter/exit event arrival. 2023-11-27 08:47:43 +02:00
Yuri Sizov
d9677be0ca Make sure Window's title is respected before we compute the size
Also removes some suspicious and outdated code that forced this particular
dialog to change size when the warning message changed.
2023-11-24 16:31:41 +01:00
bruvzg
932174fedf
[Editor] Add option to override editor UI layout direction. 2023-11-17 14:56:45 +02:00
Markus Sauermann
fa02d19fd1 Fix internal events not being delivered to some Window types
`AcceptDialog`, `Popup` and `PopupMenu` no longer subscribe to
"window_input" signal, because that is only sent if it is not an
internal signal.

Instead they receive events in `_input_from_window`. They ensure that
the event is also propagated to their super-function, just like
previously the signals would be treated.
2023-11-14 20:29:17 +01:00
Michael Alexsander
62ab9bf1c4
Fix NOTIFICATION_WM_SIZE_CHANGED firing if the size hasn't changed 2023-10-31 22:58:12 -03:00
A Thousand Ships
f18aa00e85 Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-10-08 17:23:33 +02:00