Commit Graph

266 Commits

Author SHA1 Message Date
bruvzg 8b0761d1fd
Fix sub-menu keyboard navigation. 2022-04-13 09:58:38 +03:00
bruvzg 4bf99f4af2 Narrow FileAccess scope to prevent deadlocks. 2022-04-12 10:54:39 +03:00
bruvzg 9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
bruvzg f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
Rémi Verschelde b79721fede
Merge pull request #59908 from bruvzg/fix_popup_close_race
Fix a possible race condition on popup close, that might cause multiple deletions of the same list item.
2022-04-06 08:35:56 +02:00
Rémi Verschelde 77843355a0 CI: Update black formatter and apply changes 2022-04-05 17:43:12 +02:00
bruvzg daa42e0e50
Fix a possible race condition on popup close, that might cause multiple deletions of the same list item. 2022-04-05 12:44:29 +03:00
Rémi Verschelde f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
bruvzg ba0317be04
Add CI build with clang sanitizers, increase stack size to 30 MB for builds with sanitizers. 2022-04-01 13:15:35 +03:00
ConteZero 2eb36b8bdb Fix X11 is_window_maximized 2022-03-31 23:21:32 +02:00
Markus Sauermann 0494e024d8 Rename warp mouse functions to warp_mouse 2022-03-27 14:12:01 +02:00
Aaron Franke 13392a96e9
Generate export template file names instead of having a fixed set 2022-03-22 10:16:03 -05:00
Aaron Franke ac3ecec58e
Change extension for Linux 32-bit x86 exports to x86_32 2022-03-21 14:56:27 -05:00
Aaron Franke f301451fa3
Move extension logic to EditorExportPlatformLinuxBSD 2022-03-21 12:50:31 -05:00
Aaron Franke e5e697564d
Move fixup_embedded_pck to EditorExportPlatform classes 2022-03-20 21:04:22 -05:00
bruvzg f0315c28a8
[Export] Add "export console script" option for Linux, macOS, and Windows exports. 2022-03-14 17:19:18 +02:00
Rémi Verschelde 768f9422bc Convert uses of `DirAccess *` to `DirAccessRef` to prevent memleaks
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-03-11 09:13:11 +01:00
Rémi Verschelde 7866c98479
Merge pull request #58335 from maiself/fix-directory-delete-linux 2022-03-10 21:29:40 +01:00
Rémi Verschelde 3d7f155586 Remove unused Bullet module and thirdparty code
It has been disabled in `master` since one year (#45852) and our plan
is for Bullet, and possibly other thirdparty physics engines, to be
implemented via GDExtension so that they can be selected by the users
who need them.
2022-03-09 21:45:47 +01:00
MmAaXx500 eda3180395
Add missing header for headless builds 2022-03-09 09:58:20 +01:00
bruvzg 3cc37342c4
[X11] Do not try to focus unmapped window. 2022-03-08 11:46:44 +02:00
Haoyu Qiu 29e45d4fa0 Fix X11 memory leak after drag & drop file into the editor 2022-03-04 17:50:24 +08:00
bruvzg 74ff5921d6 Improve popup window handling.
Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
2022-02-25 09:33:27 +02:00
Mai Lavelle dfdc1c1642 Fix deleting of directories on Linux
Trailing slash of directories was mishandled, and incorrect derived paths
were formed. Stripping the slash fixes this.
2022-02-20 08:38:59 -05:00
Rémi Verschelde b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
Hugo Locurcio ee7cd9a3a1
Add an `OS.get_processor_name()` method
This method can be used to get the CPU model name.
It can be used in conjunction with
`RenderingServer.get_video_adapter_name()` and
`RenderingServer.get_video_adapter_vendor()` for annotating benchmarks
and automatic graphics quality configuration.
2022-02-15 20:55:53 +01:00
Hendrik Brucker b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Rémi Verschelde 1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Rémi Verschelde 90162851a7
Core: Move generated `VERSION_HASH` to a `.cpp` file
This lets us have its definition in `core/version.h` and avoid
rebuilding a handful of files every time the commit hash changes.
2022-02-09 09:20:17 +01:00
Rémi Verschelde 2a39a1c221
Merge pull request #57612 from maiself/improve-gamepad-detection 2022-02-08 15:22:31 +01:00
bruvzg 4fcc35bdfa
[X11] Fix decoration reset when returning from fullscreen mode. 2022-02-08 11:01:24 +02:00
jordi 635da44ef8 Snap refresh rate to hundreths place on X11 2022-02-06 13:24:57 +01:00
Rémi Verschelde 225a3b2545
Merge pull request #57341 from bruvzg/win_multiwin_fs 2022-02-04 13:28:56 +01:00
Rémi Verschelde 2e320dcf87
Merge pull request #57617 from bruvzg/char_cleanup 2022-02-04 13:06:38 +01:00
Rémi Verschelde d235c1bb19
Merge pull request #57335 from jordigcs/display-refresh-rate 2022-02-04 11:51:07 +01:00
bruvzg f4ea9cd9f3
[Windows] Add WS_BORDER flag to windows in WINDOW_MODE_FULLSCREEN mode to allow multi-window interface in full-screen.
[Windows] Add WINDOW_MODE_EXCLUSIVE_FULLSCREEN without WS_BORDER flag enabled (no multi-window support).
2022-02-04 12:08:46 +02:00
bruvzg 244db37508
Cleanup and move char functions to the `char_utils.h` header. 2022-02-04 11:35:01 +02:00
Mai Lavelle b966ca6167 Improve detection of gamepads on Linux
Some devices (Nintendo Switch Right Joy-Con) report only a right stick.
2022-02-03 22:56:43 -05:00
jordi 54dec44dba Add screen_get_refresh_rate to DisplayServer 2022-02-03 21:50:32 -06:00
Rémi Verschelde ea12094f19
Merge pull request #57497 from Geometror/fix-mouse-mode 2022-02-01 14:46:30 +01:00
Hendrik Brucker c058361a23 Fix captured mouse mode 2022-02-01 03:49:51 +01:00
Rémi Verschelde f14b1441e7
Merge pull request #56548 from madmiraal/fix-53894 2022-01-31 18:08:48 +01:00
Nathan Franke 8a0a3accee
simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
Rémi Verschelde 4b36b6e92a
Merge pull request #56785 from bruvzg/nat_handles_4 2022-01-27 12:12:34 +01:00
Haoyu Qiu 8be49838b3 Fix memory leak when move to trash fails on Linux 2022-01-25 18:38:13 +08:00
Rémi Verschelde 57a057f7ff
Merge pull request #56754 from madmiraal/fix-45592 2022-01-24 10:05:42 +01:00
Omar Polo bd448e5535 Rename or refactor macros to avoid leading underscores
These are not used consistently and some can conflict with
system-specific defines.  While here, also delete some unused macros.
2022-01-20 20:29:15 +01:00
bruvzg d62ca0c9c0 Window management improvements.
[macOS] Fix transient windows not working in the full-screen mode.
[macOS] Fix moving transient windows to the other screen than parent window.
[macOS] Fix popup menu switch on hover.
[macOS] Use content origin rect for windows position (to ensure `DS.mouse_get_position` is equal to `DS.window_get_position` + mouse position from the input events).
[macOS] Fix incorrect input coordinates, when external display with different scaling in connected/disconnected.
[macOS/Windows] Fix moving fullscreen windows between the screens.
Add auto refocusing of the parent window, when the focused transient window is closed.
Remove redundant `DS.mouse_get_absolute_position` function (returns mouse position in the screen coordinates, same as `DS.mouse_get_position`).
2022-01-18 11:47:03 +02:00
Marcel Admiraal f41c72c538 Fix Actions mapped to triggers not using the full range 2022-01-14 15:36:20 +00:00
bruvzg 89f37d4105
Add support for getting native display, window, and view handles. 2022-01-14 13:36:32 +02:00