Commit Graph

224 Commits

Author SHA1 Message Date
bruvzg e6067a39b5
[Windows] Remove meta_mem update on keyup/keydown. 2023-03-21 09:16:10 +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
Markus Sauermann 79401f8dc2 Fix incorrect mouse event position while hovering different window 2022-11-30 13:39:31 +01:00
Patrick Dawson 1aa4959381 [Windows] Fix joypad crash 2022-11-28 03:38:47 +01:00
clayjohn 58a9cfee80 Set vsync on window creation when using GLES3.
Add vsync to Windows platform
2022-11-15 14:14:21 -08:00
Patrick Dawson ffa39db847 Fix ICONDIR buffer overflow 2022-11-14 00:47:14 +01:00
David Snopek 4c8409c0fe Added missing null checks for gl_manager in MacOS and Windows display servers 2022-11-13 07:06:26 -06:00
David Snopek 23603e409c Add support for OpenGL to OpenXR 2022-11-08 18:47:11 -06:00
Markus Sauermann 9cea653457 Fix mouseleave event after drag and drop in different Windows
When dropping in a different window, it is necessary to start tracking
the WM_MOUSELEAVE event again.
2022-11-01 18:58:46 +01:00
Markus Sauermann 88feacdad5 Fix mouse offset for unfocused popups
On Windows, the mouse was offset, when unfocused popups were used,
like the Editor menu.
2022-11-01 00:04:14 +01:00
Clay John 04ac91f786
Merge pull request #67790 from kdada/fix-flash-window
Make creating window do not flicker when specify custom position
2022-10-28 13:02:58 -07:00
Markus Sauermann 4bd601d82a Fix differences between Windows and linuxbsd Display Server
Fix that Windows receive WINDOW_EVENT_MOUSE_EXIT on startup.

When moving the mouse cursor from one window to a different one, make sure that the first window receives the WINDOW_EVENT_MOUSE_EXIT event before the second window receives the WINDOW_EVENT_MOUSE_ENTER event.

Send Mouse-Move events also for Windows, that are currently not focused.

For determining the currently hovered window, consider not just the currently focused window, but also other windows.

Send mouse move events to focused window instead of hovered window.
2022-10-28 09:32:25 +02:00
Wei Guo d7e39e313b Make window creation with custom position do not flash 2022-10-24 13:50:25 +08:00
Clay John 021f524dfd
Merge pull request #67546 from clayjohn/DS-msg
Update the DisplayServer video driver error message to be more accurate and friendly
2022-10-21 16:57:35 -07:00