summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd
Commit message (Collapse)AuthorAgeFilesLines
* Fix named anonymous struct warningMarcel Admiraal2020-12-162-9/+9
|
* Merge pull request #43742 from qarmin/editor_modules_default_valuesRémi Verschelde2020-12-084-32/+22
|\ | | | | Initialize class/struct variables with default values in platform/ and editor/
| * Initialize class/struct variables with default values in platform/ and editor/Rafał Mikrut2020-12-024-32/+22
| |
* | Merge pull request #44021 from dakennedyd/personalRémi Verschelde2020-12-071-32/+114
|\ \ | | | | | | Fix implementation of move_to_trash() on Linux
| * | Fixes move_to_trash() on LinuxDavid Kennedy2020-12-071-32/+114
| |/ | | | | | | Fixes #42840 OS move_to_trash() on Linux is not compliant with the Freedesktop specification
* | RenderingServer reorganizationreduz2020-12-043-4/+4
| |
* | Reorganize rendering server.reduz2020-12-031-1/+1
| | | | | | | | | | -Made RenderingServerScene abstract, allowing reimplementation -RenderingServerRaster -> RenderingServerDefault, but this class is going away soon.
* | X11: Include limits.h for LONG_MAXRémi Verschelde2020-12-021-0/+1
|/ | | | Fixes #44030.
* Merge pull request #41100 from bruvzg/ctl_text_server_interfaceRémi Verschelde2020-11-281-1/+18
|\ | | | | [Complex Text Layouts] Implement TextServer interface.
| * [Complex Text Layouts] Add third-party TextServer dependencies (ICU, ↵bruvzg2020-11-261-1/+18
| | | | | | | | HarfBuzz, Graphite).
* | Implement INCR mechanism for Linux clipboardPouleyKetchoupp2020-11-272-25/+105
|/ | | | | Allows pasting from x11 clipboard to receive data incrementally, which is required when handling data size > 256KB.
* Merge pull request #42652 from nekomatata/x11-clipboard-save-targetsRémi Verschelde2020-11-262-50/+177
|\ | | | | Implement SAVE_TARGETS mechanism for Linux clipboard
| * Implement SAVE_TARGETS mechanism for Linux clipboardPouleyKetchoupp2020-10-092-50/+177
| | | | | | | | | | | | | | | | | | | | | | | | Allows sending the clipboard content to the clipboard manager on exit to keep the content when using a clipboard manager that doesn't automatically makes a backup when copying. MULTIPLE selection mechanism also had to be implemented, because in this case, the clipboard manager might request multiple selection targets at once. Known use case: Ubuntu with XFCE4
* | SCons: Do not define TYPED_METHOD_BIND on Linux/clangRémi Verschelde2020-11-251-1/+0
| | | | | | | | It's now only needed for MSVC.
* | SCons: Remove unnecessary $LINK overridesRémi Verschelde2020-11-191-1/+0
| | | | | | | | | | | | | | | | | | | | As of SCons 4.0.1, the default value for $LINK is $SMARTLINK, which itself is a function that will use $CXX as linker for C++: https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L327-L328 https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L54-L76 So we don't need to manually specify the same value as $CXX for $LINK.
* | Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-3/+0
| |
* | Merge pull request #43461 from ccl2of4/fix-linux-joypad-dpad-zeroingRémi Verschelde2020-11-161-4/+4
|\ \ | | | | | | Fix for linux joypad D-pad zeroing
| * | Fix for linux joypad D-pad zeroingConnor Lirot2020-11-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some controllers (notably those made by 8bitdo) do not always emit an event to zero out a D-pad axis before flipping direction. For example, when rolling around aggressively the D-pad of an 8bitdo SN30 Pro/Pro+, the following may be observed: ``` ABS_HAT0X : -1 ABS_HAT0Y : -1 ABS_HAT0Y : 0 ABS_HAT0Y : 1 ABS_HAT0X : 1 ``` Notable here is that no event for `ABS_HAT0X: 0` is emitted between the events for `ABS_HAT0X: -1` and `ABS_HAT0X: 1`. Consequently, the game engine believes that both the negative _and_ positive x-axis directions of the D-pad are activated simultaneously (i.e `is_joy_button_pressed()` returns `true` for both `JOY_BUTTON_DPAD_LEFT` and `JOY_BUTTON_DPAD_RIGHT`), which should be impossible. This issue is _not_ reproducible on all controllers. The Xbox One controller in particular will not exhibit this problem (it always emits zeroing out events for an axis before flipping direction). The fix is to always zero out the opposite direction on the D-pad axis in question when processing an event with a nonzero value. This unfortunately wastes a small number of CPU cycles on controllers that behave nicely. **I have verified this issue is also reproducible in the stable 3.2 branch**
* | | Add XChangeProperty Atoms validity checks.bruvzg2020-11-151-12/+33
| | |
* | | Fixes crash if Vulkan presentation surface is not available.bruvzg2020-11-141-0/+4
| | |
* | | Add X11 Atom validity checks.bruvzg2020-11-121-15/+24
|/ /
* | Remove `debug_symbols=full` in favor of `debug_symbols=yes`Hugo Locurcio2020-11-092-6/+2
| | | | | | | | | | | | | | | | `debug_symbols=yes` will now behave like `debug_symbols=full` did before. The difference in compressed file sizes is not that large, which means there isn't much point in having two different values. This helps make the buildsystem easier to understand.
* | Reorganized core/ directory, it was too fatty alreadyreduz2020-11-074-6/+6
| | | | | | | | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* | Changed shell_open behaviourEv1lbl0w2020-10-261-6/+27
|/
* Fix x11 display server crash when deleting popup window when unfocusedPouleyKetchoupp2020-10-081-16/+21
| | | | | | | | | | | | | | | On FocusOut events, the window could be destroyed while propagating WINDOW_EVENT_FOCUS_OUT event, which causes the WindowData to be invalidated, and still used for calls to XUnsetICFocus. This change moves calls to XUnsetICFocus, and also XSetICFocus in FocusIn events, before propagating the change of focus event to the engine, to be safe in any case. Also setting xic member to nullptr after all calls to XDestroyIC to keep things clean and consistent. Fixes #42645
* Fix delay to process clipboard content from Godot in other programsPouleyKetchoupp2020-09-252-65/+80
| | | | | | | | | | | | | | | | When pasting clipboard content from Godot to other applications, multiple SelectionRequest events are sent to Godot in order to access the data. It could take a long time before the data is ready for the other app because events were processed one by one on the main thread, especially when Godot is unfocused and runs at low frequency. With this change, SelectionRequest events are directly handled on the separate event polling thread to minimize this delay. This change also replaces clipboard_get() calls in SelectionRequest with a direct access to internal_clipboard, since in this case we know Godot is the owner of the clipboard content and it's not necessary to query the x server for it.
* Fix general keyboard input lag on X11 display serverPouleyKetchoupp2020-09-242-61/+165
| | | | | | | | | | | | | | | | | | | | | | This change makes keyboard inputs more responsive on Linux, especially when the FPS is lower on slower configurations. Polling events from the x server is done on a separate thread to avoid a frame delay with inputs, due to first sending the event to the input manager with XFilterEvent then processing the new event only on the next frame. Calls to Input Manager functions like XSetICFocus, XUnsetICFocus and XSetICValues use a mutex, because they are polling events internally and would otherwise interfere with our own thread process for polling events which can cause a deadlock in some cases. XUnsetICFocus is called instead of XSetICFocus on FocusOut events, so the input manager can be properly notified of focus changes. clipboard_get now uses a blocking call to poll for a specific event type when waiting for a SelectionNotify event, instead of polling all events and filtering them afterwards.
* X11: Try to load libXrandr.so.3 if libXrandr.so.2 isn't foundRémi Verschelde2020-09-181-1/+6
| | | | | All Linux distros, and FreeBSD and OpenBSD seem to have libXrandr.so.2, but for some reason recent NetBSD versions seem to have libXrandr.so.3 now.
* Linux/BSD: Fix support for NetBSDRémi Verschelde2020-09-181-2/+10
| | | | | | | | | Add __NetBSD__ to `platform_config.h` so that it can find `alloca` and use the proper `pthread_setname_np` format. Rename RANDOM_MAX to avoid conflict with NetBSD stdlib. Fixes #42145.
* Add window click-through support.bruvzg2020-09-173-0/+41
|
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-2/+2
|
* Fix drag and drop between windows in X11 display serverPouleyKetchoupp2020-09-032-15/+86
| | | | | | | | | | Proper implementation for get_window_at_screen_position: Now getting the topmost last active window when overlapping. Mouse drag & release events: They are now propagated through the current focused window, in order to make it consistent with the engine expectations and the Windows display server implementation.
* Fix menu popups delay and focus in X11 display serverPouleyKetchoupp2020-08-262-80/+162
| | | | | | Now using override_redirect for menu & tooltip popups to prevent the WM from interfering with them, so we have more control over focus management and avoid a delay before they show up.
* Re-apply "Fixes for windows in X11 tiling WMs"PouleyKetchoupp2020-08-222-2/+11
| | | | | | | From PR #38727 which was reverted in #41373 because of regressions in Ubuntu with Gnome. Co-authored-by: Lorenzo Cerqua <lorenzocerqua@tutanota.com>
* 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
|