summaryrefslogtreecommitdiff
path: root/platform/linuxbsd
AgeCommit message (Collapse)Author
2020-08-19Revert "Fixes for windows in X11 tiling WMs"Juan Linietsky
2020-08-16Port ClassDB tests to use doctestAndrii Doroshenko (Xrayez)
Extracted the most minimal core initialization functionality from `setup()` and `setup2()` so that `ClassDB` could be tested properly (input, audio, rendering, physics etc, are excluded). Display and rendering servers/singletons are not initialized at all. Due to the fact that most subsystems are disabled, fixed various crashes in the process (in order): - `AcceptDialog` OK/cancel swap behavior (used `DisplayServer` while `register_scene_types()`); - `make_default_theme` which depends on `RenderingServer`; - `XRServer` singleton access while calling `register_modules_types()`; - hidden bug in a way joypads are cleaned up (MacOS and Linux only). Removed manual `ClassDB` init/cleanup calls from `test_validate_testing.h`. ClassDB tests: Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
2020-08-13Remove obsolete GLES2 backend codeRémi Verschelde
This code currently isn't compiled (and cannot compile). We plan to re-add OpenGL ES-based renderer(s) in Godot 4.0 alongside Vulkan (probably ES 3.0, possibly also a low-end ES 2.0), but the code will be quite different so it's not relevant to keep this old Godot 3.2 code. The `drivers/gles2` code from the `3.2` branch can be used as a reference for a potential new implementation.
2020-07-31Fix losing X11 window normal size hint propertiesopl-
This was caused by `XSetWMNormalHints` being called multiple times, each time with different values. Calling the method replaces the old data completely, resulting in some of the settings being lost. Since the method was called 3 times before the window was mapped, this resulted in the position hint being lost and the window always getting opened at a position determined by the WM.
2020-07-31Merge pull request #40591 from madmiraal/fix-24526Rémi Verschelde
Update Linux gamepad detection to match SDL.
2020-07-26Merge pull request #38727 from Riteo/tiling-wm-issues-testsRémi Verschelde
Fixes for windows in X11 tiling WMs
2020-07-24t Add unit testing to Godot using DocTest and added to GitHub Actions CIRevoluPowered
Implements exit codes into the engine so tests can return their statuses. Ideally we don't do this, and we use FIXUP logic to 'begin' and 'end' the engine execution for tests specifically. Since realistically we're initialising the engine here we don't want to do that, since String should not require an engine startup to test a single header. This lowers the complexity of running the unit tests and even for physics should be possible to implement such a fix.
2020-07-23SCons: Remove unused DEBUG_MEMORY_ENABLED defineRémi Verschelde
Its last use was removed in Godot 3.0, so it no longer makes sense to define. Also removed `D3D_DEBUG_INFO` for Windows as it's likely a left over from a long time ago pre-opensourcing when Godot had some form of Direct3D 9 support?
2020-07-23DisplayServer: separate window showing into another functionLorenzo Cerqua
When creating a window, Godot would first register it to the WM(show it) and then set its flags. This works fine on a floating WM, but on tiling WMs as soon as a window gets registered the WM immediately acts on the window by scaling it up and treating it as a generic window, being registered without any special flags. This commit separates the showing of the window into another function and calls it after the most important flags are set, making windows with special flags(eg. all popups) work again on tiling WMs. Fixes #37930
2020-07-22Update Linux gamepad detection to match SDL.Marcel Admiraal
2020-07-21Fix spelling & grammar in comments, docs, and messagesAndy Maloney
2020-07-13Add error messages if Vulkan init failed, prevent Vulkan context freeing ↵bruvzg
uninitialized device and instance.
2020-07-04Merge pull request #40105 from Logharaa/masterRémi Verschelde
Stop looping as soon as the first window that has focus is found
2020-07-04Break loop when the first focused window is foundGaël
2020-07-03Improve the situation of DND on X11Juan Linietsky
2020-07-01Add a focus out timeout for X11 to less events of this type are receivedJuan Linietsky
2020-07-01Ensure embedded mode works againJuan Linietsky
Also implemented application in/out notifications in X11.
2020-06-29X11: Ensure XGetWindowProperty data gets freedRémi Verschelde
And cleanup includes a bit.
2020-06-13Add keyboard layout enumeration / set / get functions (macOS, Windows, ↵bruvzg
Linux/X11), remove latin variant function.
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-14Port member initialization from constructor to declaration (C++11)Rémi Verschelde
Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
2020-05-03[Linux/Windows] Set pressure to 1.0f when primary button is pressed and ↵bruvzg
device is not pressure sensitive.
2020-05-03Merge pull request #37756 from madmiraal/fix-x11-pressure-tiltRémi Verschelde
Fix X11 pressure and tilt values.
2020-04-29Merge pull request #37802 from ThakeeNathees/window-position-bug-osx-x11Rémi Verschelde
display server window position bug fix
2020-04-28Rename InputFilter back to InputRémi Verschelde
It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
2020-04-27Update to bullet master (2.90)PouleyKetchoupp
2020-04-15Fixes leaks in ResourceCache, Vulkan and X11qarmin
2020-04-11display server window position bug fix (#37323)Thakee Nathees
2020-04-10Fix X11 pressure and tilt values.Marcel Admiraal
2020-04-10Fix loss of precision in X11 device info.Marcel Admiraal
2020-04-02Replace NULL with nullptrlupoDharkael
2020-04-02Merge pull request #37504 from qarmin/out_of_bound_cursorRémi Verschelde
Fix array out of bounds access caused by uninitialised variables
2020-04-01Fix out of bound array access caused by unassigned variableRafał Mikrut
2020-04-01Fix Clang warnings on WindowsRémi Verschelde
Fixes #37490.
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-26Add macOS DisplayServer implementation.bruvzg
Change global menu to use Callable, add support for check items and submenus.
2020-03-26Fixes to X11, still pretty brokenJuan Linietsky
2020-03-26Multiple changes to DisplayServerX11Mateo Kuruk Miccino
- Travis: Change x11 to linuxbsd - SCons: Change x11 plataform to linuxbsd - Plugins: Remove ; to avoid fallthrough warning - DisplayServerX11: Implement set_icon - DisplayServerX11: Fix X11 bug when a window was erased from windows map, all the changes from that erased windows are sending to the main window - DisplayServerX11: Reorder create_window commands - DisplayServerX11: Change every Size2 to Size2i and Rect2 to Rect2i where it belongs + More X11 fixes which have been integrated directly back into reduz's original commits while rebasing the branch.
2020-03-26Implemented drag and drop across windows, both OS and embedded.Juan Linietsky
2020-03-26Popups have also been converted to windowsJuan Linietsky
Controls using the old modal API have been replaced to use popups.
2020-03-26Fixes to window style flagsJuan Linietsky
2020-03-26Open sub-windows as embedded if the OS does not support themJuan Linietsky
2020-03-26Make DisplayServerX11 thread safeJuan Linietsky
2020-03-26Working multiple window support, including editorJuan Linietsky
2020-03-26Support for transient windowsJuan Linietsky
2020-03-26Refactored input, goes all via windows now.Juan Linietsky
Also renamed Input to InputFilter because all it does is filter events.