summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Fixes for windows in X11 tiling WMs"Juan Linietsky2020-08-192-11/+2
|
* Port ClassDB tests to use doctestAndrii Doroshenko (Xrayez)2020-08-162-2/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
* Remove obsolete GLES2 backend codeRémi Verschelde2020-08-132-6/+0
| | | | | | | | | | | 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.
* Fix losing X11 window normal size hint propertiesopl-2020-07-312-154/+61
| | | | | | 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.
* Merge pull request #40591 from madmiraal/fix-24526Rémi Verschelde2020-07-311-9/+2
|\ | | | | Update Linux gamepad detection to match SDL.
| * Update Linux gamepad detection to match SDL.Marcel Admiraal2020-07-221-9/+2
| |
* | Merge pull request #38727 from Riteo/tiling-wm-issues-testsRémi Verschelde2020-07-262-2/+11
|\ \ | | | | | | Fixes for windows in X11 tiling WMs
| * | DisplayServer: separate window showing into another functionLorenzo Cerqua2020-07-232-2/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | 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
* | t Add unit testing to Godot using DocTest and added to GitHub Actions CIRevoluPowered2020-07-241-0/+3
| | | | | | | | | | | | | | | | | | | | 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.
* | SCons: Remove unused DEBUG_MEMORY_ENABLED defineRémi Verschelde2020-07-231-1/+1
|/ | | | | | | 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?
* Fix spelling & grammar in comments, docs, and messagesAndy Maloney2020-07-211-2/+2
|
* Add error messages if Vulkan init failed, prevent Vulkan context freeing ↵bruvzg2020-07-131-1/+7
| | | | uninitialized device and instance.
* Merge pull request #40105 from Logharaa/masterRémi Verschelde2020-07-041-0/+1
|\ | | | | Stop looping as soon as the first window that has focus is found
| * Break loop when the first focused window is foundGaël2020-07-041-0/+1
| |
* | Improve the situation of DND on X11Juan Linietsky2020-07-031-1/+20
|/
* Add a focus out timeout for X11 to less events of this type are receivedJuan Linietsky2020-07-012-4/+11
|
* Ensure embedded mode works againJuan Linietsky2020-07-012-14/+37
| | | | Also implemented application in/out notifications in X11.
* X11: Ensure XGetWindowProperty data gets freedRémi Verschelde2020-06-293-92/+34
| | | | And cleanup includes a bit.
* Add keyboard layout enumeration / set / get functions (macOS, Windows, ↵bruvzg2020-06-132-26/+99
| | | | Linux/X11), remove latin variant function.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-146-86/+162
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-142-0/+20
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-1412-206/+0
| | | | | | | | | | | | | | 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.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-1/+1
| | | | | | | | | | 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.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-103-6/+12
| | | | | | | 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.
* [Linux/Windows] Set pressure to 1.0f when primary button is pressed and ↵bruvzg2020-05-032-2/+10
| | | | device is not pressure sensitive.
* Merge pull request #37756 from madmiraal/fix-x11-pressure-tiltRémi Verschelde2020-05-032-34/+55
|\ | | | | Fix X11 pressure and tilt values.
| * Fix X11 pressure and tilt values.Marcel Admiraal2020-04-102-34/+55
| |
* | Merge pull request #37802 from ThakeeNathees/window-position-bug-osx-x11Rémi Verschelde2020-04-291-2/+4
|\ \ | | | | | | display server window position bug fix
| * | display server window position bug fix (#37323)Thakee Nathees2020-04-111-2/+4
| | |
* | | Rename InputFilter back to InputRémi Verschelde2020-04-286-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Update to bullet master (2.90)PouleyKetchoupp2020-04-271-3/+5
| | |
* | | Fixes leaks in ResourceCache, Vulkan and X11qarmin2020-04-151-1/+4
| |/ |/|
* | Fix loss of precision in X11 device info.Marcel Admiraal2020-04-101-4/+4
|/
* Replace NULL with nullptrlupoDharkael2020-04-027-70/+70
|
* Merge pull request #37504 from qarmin/out_of_bound_cursorRémi Verschelde2020-04-021-8/+9
|\ | | | | Fix array out of bounds access caused by uninitialised variables
| * Fix out of bound array access caused by unassigned variableRafał Mikrut2020-04-011-8/+9
| |
* | Fix Clang warnings on WindowsRémi Verschelde2020-04-011-1/+0
| | | | | | | | Fixes #37490.
* | SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-303-192/+200
|/ | | | | | | | | | | | | | | | | | | | | 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.
* Renaming of servers for coherency.Juan Linietsky2020-03-273-7/+7
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Add macOS DisplayServer implementation.bruvzg2020-03-262-0/+19
| | | | Change global menu to use Callable, add support for check items and submenus.
* Fixes to X11, still pretty brokenJuan Linietsky2020-03-262-27/+111
|
* Multiple changes to DisplayServerX11Mateo Kuruk Miccino2020-03-262-43/+131
| | | | | | | | | | | | | | | | - 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.
* Implemented drag and drop across windows, both OS and embedded.Juan Linietsky2020-03-262-1/+28
|
* Popups have also been converted to windowsJuan Linietsky2020-03-262-4/+10
| | | | Controls using the old modal API have been replaced to use popups.
* Fixes to window style flagsJuan Linietsky2020-03-262-4/+4
|
* Open sub-windows as embedded if the OS does not support themJuan Linietsky2020-03-262-8/+8
|
* Make DisplayServerX11 thread safeJuan Linietsky2020-03-262-3/+127
|
* Working multiple window support, including editorJuan Linietsky2020-03-262-16/+50
|
* Support for transient windowsJuan Linietsky2020-03-262-0/+48
|
* Refactored input, goes all via windows now.Juan Linietsky2020-03-266-43/+131
| | | | Also renamed Input to InputFilter because all it does is filter events.