Commit Graph

80 Commits

Author SHA1 Message Date
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
b252867145 [macOS/Windows] Add Emoji & Symbols context menu item to LineEdit/TextEdit to show system character picker. 2025-01-10 09:25:34 +02: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
4a1a7addd1 Merge pull request #100179 from zaevi/fix_transient_topmost
[Windows & macOS] Fix popup window shows behind `always_on_top` parent.
2024-12-11 17:35:53 -06:00
9fece033ab [macOS, Windows] Add support for excluding windows from a screenshot. 2024-12-10 11:00:13 +02:00
Zae
2211b1bf91 Fix popup shows behind always_on_top parent. 2024-12-10 01:35:25 +08:00
84650f2018 Implement DisplayServer.beep. 2024-12-03 12:43:26 +02:00
b248d66265 [macOS] Use native window drag for the custom editor title bars. 2024-12-02 17:40:27 +02:00
d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
2d0165574d Add Metal support for macOS (arm64) and iOS 2024-08-20 12:11:06 +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
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
e5205e589f [StatusIndicator] Add method to get indicator icon screen rect. 2024-05-02 14:39:33 +03:00
85062e37ef Merge pull request #89588 from bruvzg/status_ind_menu_direct
[StatusIndicator] Switch API to use Texture2D instead of Image, improve handling on macOS, add method to set native popup menu directly.
2024-05-01 09:54:44 +02: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
37e0be37d8 [macOS] Fix non-global native menu shortcuts. 2024-03-27 22:26:44 +02:00
0587a1d217 [StatusIndicator] Switch API to use Texture2D instead of Image, improve handling on macOS, add method to set native popup menu directly. 2024-03-20 11:56:07 +02:00
c65a667924 Move global_menu_* methods to a separate NativeMenu class. 2024-03-04 23:41:41 +02:00
b6dee8850b Merge pull request #87384 from bruvzg/sys_base_color
Add method to get "base" system UI color and system theme change callback.
2024-02-13 23:43:21 +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
deffe6a3be [macOS] Add support for native help menu search callbacks, integrate editor help. 2024-02-13 18:37:37 +02:00
8da36031e4 Implement support for application status indicators (tray icons). 2024-02-13 15:59:35 +02:00
73eff10c76 Finish splitting functionality of the Vulkan and D3D12 backends into RenderingDeviceDriver. 2024-02-12 10:02:18 -03:00
f220d46cdc Merge pull request #80231 from romlok/input-key-location
Support detecting and mapping ctrl/alt/shift/meta by their left/right physical location
2024-01-29 13:15:42 +01:00
8406e60522 Add InputEventKey.location to tell left from right
This adds a new enum `KeyLocation` and associated property
`InputEventKey.location`, which indicates the left/right location of key
events which may come from one of two physical keys, eg. Shift, Ctrl.

It also adds simulation of missing Shift KEYUP events for Windows.
When multiple Shifts are held down at the same time, Windows natively
only sends a KEYUP for the last one to be released.
2024-01-26 14:42:28 +01: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
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
3a8524dd92 Merge pull request #83452 from RandomShaper/rd_common
Split `RenderingDevice` into API-agnostic and `RenderingDeviceDriver` parts
2023-12-20 20:09:18 +01: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
0d44b50520 [macOS] Add default Window and Help menus, allow special menu customization. 2023-12-13 23:20:05 +02:00
6b25204575 [macOS] Fix transparent and borderless flags interaction with full-screen mode. 2023-11-14 08:36:32 +02:00
3620d612ba [macOS] Use occlusionState instead of isOnActiveSpace to determine when window is drawable. 2023-10-10 12:20:06 +03:00
d1aaa914f3 [macOS] Add about_to_open and popup_hide callback for the global menus, move part of logic to the PopupMenu to allow live menu modification. 2023-10-04 09:49:51 +03:00
be6a09b6ec Merge pull request #82423 from bruvzg/mac_ex_fs
[macOS] Check all exclusive fullscreen windows before setting presentation mode.
2023-10-03 17:23:18 +02:00
72e2e47059 [DisplayServer] Add method to estimate window title bar size. 2023-10-03 16:13:52 +03:00
b7b5fbe7aa [macOS] Check all exclusive fullscreen windows before setting presentation mode. 2023-09-27 09:01:52 +03:00
1887a9df19 [macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
2023-09-21 14:21:00 +03:00
78caaf3717 [macOS] Fix missing mouse exit events on window close. 2023-08-09 10:23:57 +03:00
0c2399d6ec Merge pull request #63826 from deakcor/dev_clipboard
Add `clipboard_has/get_image` methods to DisplayServer
2023-07-27 15:22:16 +02:00
c13e3a9fb0 add clipboard get image methods for windows and macos
Co-Authored-By: RedworkDE <10944644+RedworkDE@users.noreply.github.com>
Co-Authored-By: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-07-17 23:47:27 +02:00
4790da7900 [macOS] Implement optional native file selection dialog support for sandboxed apps. 2023-07-12 22:36:24 +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
ddcb2d157d Don't expose mac specific display server. 2023-05-11 11:02:08 +02:00