Commit graph

236 commits

Author SHA1 Message Date
Rémi Verschelde
759309ba18
Merge pull request #77977 from zaevi/fix_windows_popup_ime
Fix IME doesn't work under Popup on Windows.
2023-06-09 11:06:02 +02:00
Rémi Verschelde
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
Zae
1b149b7440 Fix IME doesn't work under Popup on Windows. 2023-06-08 02:40:36 +08:00
bruvzg
5b9984b5a2
Add audio/general/text_to_speech project setting to enable/disable TTS. 2023-05-18 20:16:03 +03:00
bitsawer
68da61e74c Fix for Clang dev_mode Windows build 2023-05-17 19:35:37 +03:00
Rémi Verschelde
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
Hugo Locurcio
303bf247de
Add support for VRAM-compressed custom mouse cursor images
No memory is actually saved when using this, so lossless modes are
still recommended as they look better and load faster.
2023-04-21 18:01:47 +02:00
bruvzg
520a8d8ed2
Add project manager / editor initial screen settings, implement DisplayServer.get_keyboard_focus_screen method. 2023-04-19 08:54:53 +03:00
Rémi Verschelde
c2edf14faf
Merge pull request #75881 from bruvzg/win_coinit
[Windows] Cleanup COM library initialization/uninitialization.
2023-04-18 23:40:06 +02:00
Kvel2D
41f0a523db Fix custom cursor using atlas texture
Remove image.is_valid() check
There is already a fail condition and image is not used before that
Move up texture_is_valid() check
2023-04-11 19:16:24 +02:00
bruvzg
83dc545ea2 [Windows] Cleanup COM library initialization/uninitialization. 2023-04-10 10:38:25 +03:00
bruvzg
e6067a39b5
[Windows] Remove meta_mem update on keyup/keydown. 2023-03-21 09:16:10 +02:00
bruvzg
ab94024ce1
[DisplayServer] Implement screen_get_image method for LinuxBSD/X11, macOS and Windows. 2023-03-20 14:58:21 +02:00
Hugo Locurcio
ddc9cc3e49
Tweak command syntax in Vulkan renderer failure message
This quotes the executable name so that copying it always works
(even if the path contains spaces).

The command is also indented from the rest of the text and is
no longer single-quoted, as that can prevent the command from
running if the line is copied in its entirety (with the quotes).
2023-03-08 22:28:23 +01:00
Rémi Verschelde
918c910b4d
Merge pull request #73878 from RedMser/fix-clipboard-focus-windows
Fix clipboard relying on focused window
2023-03-07 12:04:26 +01:00
Rémi Verschelde
5f2137a050
Merge pull request #74087 from bruvzg/get_screen_px
[DisplayServer] Implement screen_get_pixel method for LinuxBSD/X11, macOS and Windows.
2023-03-06 21:58:58 +01:00
bruvzg
ba995c6ea1 [Windows] Update modifier key status during IME input. 2023-03-06 10:31:23 +02:00
bruvzg
e7647b5ee5
[DisplayServer] Implement screen_get_pixel method for LinuxBSD/X11, macOS and Windows. 2023-03-01 09:32:23 +02:00
RedMser
942f8b9858 Fix clipboard relying on focused window 2023-02-24 16:31:57 +01:00
bruvzg
ba7ab0e1cb [Windows] Take initial flags into account when creating main window. 2023-02-22 10:52:26 +02:00
Rémi Verschelde
4574b97752
Fix crash with bogus shape index to DisplayServer.cursor_set_custom_image()
Fixes #66605.
2023-02-17 14:17:37 +01:00
bruvzg
a322f3f578
[InputEventKey] Avoid setting both key and modifier to the same value. 2023-02-14 09:05:58 +02:00
Rémi Verschelde
d8c3fc1f56
Merge pull request #72624 from pkdawson/fix-last-focus
DisplayServerWindows: Update `last_focused_window` when the focused subwindow is deleted
2023-02-03 06:24:05 +01:00
Markus Sauermann
6165498d0e Fix windowsize for fullscreen windows on windowcreation on Windows
Fortunately the location in the codebase was easy to find because there
was a FIXME comment.
2023-02-02 22:40:03 +01:00
Patrick Dawson
cba1fd7cca DisplayServerWindows: Update last_focused_window when the focused subwindow is deleted 2023-02-02 21:41:36 +01:00
Rémi Verschelde
707ccc09ab
Merge pull request #72104 from bruvzg/popup-non-popups
Extend special popup window handling to any non-popup child of a popup.
2023-02-01 11:07:39 +01:00
Rémi Verschelde
b8ef55a427
Merge pull request #71174 from RedMser/fix-confined-mouse-mode-update
Fix confined mouse mode not updating on resize
2023-01-31 15:56:29 +01:00
Juan Linietsky
28f51ba547 Refactor high quality texture import
* Only two texture import modes for low/high quality now:
  * S3TC/BPTC
  * ETC2/ASTC
* Makes sense given this is the general preferred and most compatible combination in most platforms.
* Removed lossy_quality from VRAM texture compression options. It was unused everywhere.
* Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA).
* Changed MacOS export settings so required texture formats depend on the architecture selected.

This solves the following problems:

* Makes it simpler to import textures as high quality, without having to worry about the specific format used.
* As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
2023-01-30 15:53:23 +01:00
bruvzg
700d85bd19
Extend special popup window handling to any non-popup child of a popup. 2023-01-26 12:38:53 +02:00
bruvzg
e08a6e692d
[Windows] Fix committing IME text without IME deactivation. 2023-01-26 09:24:12 +02:00
bruvzg
c1c6ce9001 [Windows] Fix candidate window position with some third party IME engines. 2023-01-25 15:29:08 +02:00
bruvzg
8d51af1c8d [Windows] Fix ToUnicodeEx resetting some dead key states. 2023-01-25 09:49:14 +02:00
bruvzg
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
Juan Linietsky
e01452adb0 Fix AltGR getting stuck on Windows right alt-tab
Fixes #28511.
2023-01-20 14:04:55 +01:00
bruvzg
2529ab332c [Windows] Fix sub-window initial transparency and always-on-top state. 2023-01-19 09:21:36 +02:00
Rémi Verschelde
68d71f88f5
Improve DisplayServer message for video card drivers failure
And remove leftover duplicated message on Android.
2023-01-17 15:41:54 +01:00
bruvzg
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
bruvzg
7fc8716aac [Windows] Fix incorrect full-screen mode applied on start. 2023-01-16 09:17:20 +02:00
Pedro J. Estébanez
03b96c1c4b Implement color flash avoidance for Windows 2023-01-12 21:42:51 +01:00
RedMser
951349c481 Fix confined mouse mode not updating on resize 2023-01-10 20:00:52 +01:00
Juan Linietsky
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
bruvzg
9dc4f4096c [Windows] Fix primary screen detection. 2023-01-07 15:41:06 +02:00
bruvzg
2718a7b7d3
Add support for the custom initial screen for the main window, fix primary screen detection. 2023-01-07 11:14:35 +02:00
Rémi Verschelde
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
Rémi Verschelde
8791e333da
Merge pull request #70624 from bruvzg/cur_sc
Improve `window_set_current_screen` and fix secondary window initial mode and positions.
2023-01-03 15:56:05 +01:00
bruvzg
f7955633de
Improve window_set_current_screen and fix secondary window initial mode and positions. 2022-12-29 09:43:39 +02:00
floppyhammer
c186b511c3 Fix dark title bar 2022-12-27 14:54:38 +08:00
Rémi Verschelde
0a3f66471e
Merge pull request #69712 from bruvzg/real_size
Rename `window_get_real_size`, add position counterpart.
2022-12-07 14:29:46 +01:00
bruvzg
edf13eb5a6
Rename window_get_real_size to window_get_size_with_decorations, add window_get_position_with_decorations. 2022-12-07 11:07:30 +02:00
bruvzg
e1cff4be9b [Windows] Window management fixes.
Fix popup menus having incorrect scale when main window is in full-screen mode and multiple monitors with different DPI are used.
Prevent mouse move code from accessing deleted window data (and creating zombie records in the windows map).
2022-12-06 23:56:21 +02:00