Commit Graph

166 Commits

Author SHA1 Message Date
0dfd18c84b [DisplayServer] Add feature flag for native file dialog access to user/res and options 2024-10-30 14:13:43 +05:30
6d14cd6ff9 Fix fallbacks to OpenGL 2024-10-28 22:57:19 +07: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
256699ee31 OpenXR: Add support for Wayland on Linux 2024-10-04 11:44:05 -05:00
d2f3725120 Fix window_set_current_screen for maximized windows. 2024-10-03 10:38:32 +03:00
36293a2dbf Fix renaming nodes on X11 2024-09-25 09:05:51 -05:00
3b839347df Added fallback_to_opengl3 2024-09-20 06:10:05 +08:00
b1871cdabf Fix project manager stealing focus on i3 2024-09-16 16:55:57 -05: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
8eff04192b Merge pull request #91780 from Riteo/falling-with-style
Improve UX when falling back between Display Servers
2024-09-04 11:16:08 +02:00
c273786758 Update rendering driver name on fallbacks. Fix rendering driver/method in the editor system info. 2024-09-01 18:22:40 +03:00
c01f9361b1 X11: Alert only when video drivers fail initialization
Before, they would always complain even if there was no attempt at
initializing them (e.g. because there's no X11 display).

While we're at it, this patch also adds a specific message for OpenGL ES
and rewords "OpenGLES" to "OpenGL ES" in an error, for consistency
(AFAIK we either say "GLES" or "OpenGL ES").
2024-08-21 06:31:19 +02:00
99b0100a06 [X11] Use motion event button state instead of async state. 2024-08-01 10:07:07 +03:00
24e02d56cb Remove unneeded call in DisplayServerX11
X11 does not need setting exclusive flag (it is not implemented).

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2024-07-25 17:11:15 +08: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
3636d9dafc Linux/X11: Fix memory leak from created screen images
Allocated XImages are improperly free'd with XFree.
The X11 documentation says that XImage should use
XDestroyImage to free both the image structure and
the data pointed to by the image structure.

Also fix a potential use-after-free bug.
2024-07-18 09:45:44 +02:00
25de53e147 X11: Fix creating RenderingDevice after #93706
The line was removed by mistake.
2024-06-29 14:03:29 +02:00
32d9c93af3 Improve handling of rendering startup errors 2024-06-28 19:31:50 +02:00
1289298b5e Fix text editor stealing focus from "Find in Files" dialog on X11 2024-06-27 17:27:21 -05:00
3cabf51325 [X11] Detect XWayland and disable screen capture support. 2024-06-12 10:05:17 +03:00
b80e591448 Merge pull request #92843 from anniryynanen/tooltip-in-popup
Stop color picker tooltip from stealing input events
2024-06-10 16:11:52 +02:00
e52658643d Merge pull request #92702 from kleonc/cursor_image_from_atlas_texture_fix
Fix creating cursor image from `AtlasTexture`
2024-06-07 23:29:57 +02:00
ae1e2182ec Stop color picker tooltip from stealing input events
Input events go to the tooltip because it's added to `popup_list` in
DisplayServer `popup_open`. I think there's no harm in tooltips being omitted
from the list, so this commit blocks non-popup windows from being added if they
have `FLAG_NO_FOCUS` and `FLAG_MOUSE_PASSTHROUGH`.

I'm not happy with this way of detecting tooltips. It'll also catch other
windows where this behavior may or may not be wanted.

I thought about adding `FLAG_TOOLTIP`, but went with the smaller change for
now.

Fixes #79500.
2024-06-06 20:00:05 +03:00
91e995e704 Fix creating cursor image from AtlasTexture 2024-06-05 01:44:05 +02:00
5168647530 Use current mouse button state instead of saved values. 2024-05-31 15:50:14 +03:00
1dab521f2d Merge pull request #92208 from Calinou/linuxbsd-use-nanosleep
Use `OS::delay_usec()` to avoid using deprecated `usleep()` on Linux
2024-05-30 11:47:51 +02:00
c98fef08bf Merge pull request #89033 from bruvzg/doc_end_err
[DisplayServer] Add error messages and descriptions to callbacks.
2024-05-28 17:48:42 +02:00
714effdf07 [DisplayServer] Add error messages and descriptions to callbacks. 2024-05-28 17:36:54 +03:00
1a40cda95e [macOS, X11] Fix duplicate close requests. 2024-05-28 09:41:04 +03:00
fc89a0c118 Fix build with vuklan=no and d3d12=no after #91505. 2024-05-25 21:08:50 +03: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
a008896f70 Use OS::delay_usec() to avoid using deprecated usleep() on Linux
usleep(3) was declared obsolete in POSIX.1-2001 and removed in POSIX.1-2008.
nanosleep(2) was recommended to be used instead.

`OS::delay_usec()` internally uses `nanosleep()`.

This also uses large number separators for improved readability.
2024-05-21 17:32:40 +02:00
1f8e69ddec [X11] Fallback to root window size, when Xinerama extension is available, but return zero screens. 2024-05-14 11:08:10 +03:00
fc08eca524 DisplayServer: Avoid deadlocks while issuing input events and recursive main loop iterations 2024-05-08 17:41:40 +02:00
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
31e7ee63f2 Fix unsafe uses of Callable.is_null()
`Callable.is_null()` is not equivalent to `!Callable.is_valid()` and
doesn't guarantee the call is valid.
2024-04-27 16:22:57 +02:00
67d6be30a0 [DBus] Process file dialog callback in the main event loop instead of using deferred call. 2024-04-23 19:32:35 +03: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
7092230df6 Merge pull request #89907 from bruvzg/nat_dlg_ftr_flags
[DisplayServer] Add separate feature flags for different native dialog types.
2024-03-28 10:47:15 +01:00
d28fb26ab0 Merge pull request #89716 from theromis/master
[X11] Add more details to large icon size warning
2024-03-28 10:47:08 +01:00
dc01658ee9 [DisplayServer] Add separate feature flags for different native dialog types. 2024-03-26 15:18:06 +02:00
ece8685b3b Add icon source size to warning about "too large icon dimensions" to help faster find it 2024-03-22 12:53:57 -07:00
79ba22a73f Use Vector* component-wise min/max/clamp functions where applicable 2024-03-20 13:47:42 +01:00
058202e960 Merge pull request #86101 from GrammAcc/partial-fix-68305
[X11] Partial fix for Editor and Project Manager stealing focus on some window managers
2024-03-11 23:48:07 +01: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
ee53ae28df Add method to get "base" system UI color (macOS/Windows) and system theme change callback. 2024-02-13 18:38:53 +02:00
73eff10c76 Finish splitting functionality of the Vulkan and D3D12 backends into RenderingDeviceDriver. 2024-02-12 10:02:18 -03:00
74b03edf1e Merge pull request #82800 from Sauermann/fix-screen-mousemotion
Add screen-related attributes to mouse input events
2024-02-09 18:08:58 +01:00