Commit Graph

57 Commits

Author SHA1 Message Date
a3d03717c0 Fix Floating Window request close when a dialog is opened 2025-02-05 20:34:32 -05:00
f7d1558bc0 Fix Embedded Game disappear when not focused on KDE 5
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-02-05 12:01:40 +01:00
47f553ae0b Delegate to the DisplayServer the task of handling mouse_mode
- Add `MOUSE_MODE_MAX` and various index checks
2025-01-28 11:22:27 -05:00
7f0b4e58b0 Implement DisplayServer.window_start_resize. 2025-01-07 07:58:02 +02:00
9d2a4c03be Embedding game process in editor 2024-12-18 17:52:42 -05:00
293be04ec8 Implement window_start_drag on Windows and Linux. 2024-12-17 16:49:27 +02:00
84650f2018 Implement DisplayServer.beep. 2024-12-03 12:43:26 +02: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
3cabf51325 [X11] Detect XWayland and disable screen capture support. 2024-06-12 10:05:17 +03:00
5168647530 Use current mouse button state instead of saved values. 2024-05-31 15:50:14 +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
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
c65a667924 Move global_menu_* methods to a separate NativeMenu class. 2024-03-04 23:41:41 +02: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
a8f521bcad [Native File Dialog] Add support for adding custom options to the dialogs.
Add support for adding custom options (checkboxes and optionboxes) to the dialogs (both native and built-in).
2024-01-24 15:00:31 +02:00
64a52e08fe [X11] Don't re-set input focus if the given window already has it 2024-01-18 08:52:03 -06:00
4aff0ab5d5 Merge pull request #86441 from dsnopek/mequam-x11-focus-grab
[X11] Fix Godot stealing focus on alternative window managers
2024-01-18 09:34:18 +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
40d69c25d5 [X11] Fix Godot stealing focus on alternative Window Managers 2024-01-09 08:58:59 -06:00
12a519bae2 Split RenderingDevice into API-agnostic and RenderingDeviceDriver parts
Credit and thanks to @bruzvg for multiple build fixes, update of 3rd-party items and MinGW support.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-12-20 19:18:08 +01:00
2f33c2b20e Merge pull request #81439 from Setadokalo/clipboard_image
Implement `clipboard_get`/`has_image` for X11
2023-10-20 15:06:42 +02:00
3b5a9e31bb Implement clipboard_get/has_image for X11 2023-10-20 02:59:10 -05:00
af00c4a54a [X11] Add support for using EGL/GLES instead of GLX. 2023-10-04 14:15:36 +03:00
6cc314e0fa [Linux/Freedesktop] Implement native file selection dialog support. 2023-08-17 10:56:16 +03:00
49f0d8cee3 Merge pull request #80279 from Sauermann/fix-x11-mouse-window-event-crash
Track hovered `Window` in `DisplayServerX11`
2023-08-10 00:43:00 +02:00
a7c5849f98 Track hovered Window in DisplayServerX11
Send mouse-entered/exited window-events only when necessary
2023-08-09 12:20:23 +02:00
acff87ffda [X11] Do not fail DisplayServer init if non-essential extensions are missing. 2023-08-04 10:58:14 +03:00
ff689003a5 Merge pull request #77993 from bruvzg/key_lbl_from_p
Implement DisplayServer.keyboard_get_label_from_physical method.
2023-07-12 21:02:37 +02:00
28db3c7158 [DisplayServer] Add method to check if native window is focused. 2023-06-16 10:27:52 +03:00
9e4315bb50 Style: Harmonize header includes in platform ports
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module should be included with relative
paths (relative to the root folder of the modular component, e.g.
`platform/linuxbsd/`), in their own section before Godot's "core" includes.

The `api` and `export` subfolders also need to be handled as self-contained
(and thus use relative paths for their "local" includes) as they are all
compiled for each editor platform, without necessarily having the api/export
matching platform folder in the include path.
E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp`
and those need to use relative includes for it to work.
2023-06-08 15:19:19 +02:00
08e8ff371d Implement keyboard_get_label_from_physical method. 2023-06-08 10:13:31 +03:00
265c70a369 Merge pull request #75142 from bruvzg/scr
[DisplayServer] Implement screen_get_image method for LinuxBSD/X11, macOS and Windows.
2023-05-16 10:48:16 +02:00
71ee65dc57 Enable shadow warnings and fix raised errors 2023-05-11 16:00:59 +02:00
ddcb2d157d Don't expose mac specific display server. 2023-05-11 11:02:08 +02:00
520a8d8ed2 Add project manager / editor initial screen settings, implement DisplayServer.get_keyboard_focus_screen method. 2023-04-19 08:54:53 +03:00
63d17df83e Merge pull request #74978 from bruvzg/linux_version_check
[Linux/BSD] Add dynamically loaded library version checks.
2023-04-18 23:38:51 +02:00
932afc3bf5 Fix the sliding window problem in linux occur due to reparenting of the window during the decoration via tracking the parent of the window 2023-04-14 00:45:34 +05:30
ab94024ce1 [DisplayServer] Implement screen_get_image method for LinuxBSD/X11, macOS and Windows. 2023-03-20 14:58:21 +02:00
bed46f723c [Linux/BSD] Add dynamically loaded library version checks. 2023-03-20 08:10:56 +02:00
e7647b5ee5 [DisplayServer] Implement screen_get_pixel method for LinuxBSD/X11, macOS and Windows. 2023-03-01 09:32:23 +02:00
dd068794c3 [Linux] Make SO wrapper usage optional. 2023-02-16 16:38:47 +02:00
4c50ac3921 [X11] Add support for dead keys without active IME. Fix IME focus and cleanup. 2023-01-30 13:31:48 +02:00
beaff2f5cb Move xkbcommon dynamic loading code into generic linuxbsd folder
Since Wayland uses it too, it only makes sense to have it in the parent
directory of both.
2023-01-25 03:28:13 +01:00
daad4aed62 Cleanup and unify keyboard input.
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.

Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-23 15:08:12 +02:00
34b34b104c Add WINDOW_FLAG_MOUSE_PASSTHROUGH flag and enabled it for tooltips. Expose window_set_mouse_passthrough to Window. 2023-01-16 11:42:49 +02:00
2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
2718a7b7d3 Add support for the custom initial screen for the main window, fix primary screen detection. 2023-01-07 11:14:35 +02:00
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00