summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
AgeCommit message (Collapse)Author
2019-03-12fix for access after free in OS_X11::set_context.Ibrahn Sahir
2019-03-05Disable driver fallback to GLES2 by defaultRémi Verschelde
GLES2 is not designed to be a drop-in replacement for the GLES3 backend, so the fallback mode has to be used knowingly. It *can* make sense for simple projects which make sure to handle the differences between both rendering backends, but most users should stick to one supported backend. By making it opt-in, we can now use this parameter to define whether to export ETC textures to Android and iOS when using GLES3 + Fallback. When using GLES3 without Fallback on Android, set the proper min GLES version in the AndroidManifest. Also made the option boolean and renamed it for clarity and to avoid conflict with the previous String option (which would always evaluate as "true" otherwise). Fixes #26569.
2019-03-03Add support for event accumlation (off by default, on for editor), fixes #26536Juan Linietsky
2019-02-28X11: Fix drag and drop from non-latin pathsRémi Verschelde
Fixes #25826. Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2019-02-26-Remove harcoded opengl extension testing from OS, ask rasterizer instead.Juan Linietsky
-Fixed a bug where etc textures were imported broken
2019-02-21Fix all -Wtype-limits warnings.marxin
2019-02-14Merge pull request #25879 from hpvb/fix-25629Rémi Verschelde
Detect when primusrun/optirun is in use
2019-02-14Detect when primusrun/optirun is in useHein-Pieter van Braam
It seems that bumblebee doesn't like us creating multiple GL contexts to avoid this we now detect whether we're running with this software and don't do anything.
2019-02-14Don't crash if there's no application nameHein-Pieter van Braam
This fixes #25852
2019-01-30Fix many asan and ubsan reported issuesHein-Pieter van Braam
This allows most demos to run without any ubsan or asan errors. There are still some things in thirdpart/ and some things in AudioServer that needs a look but this fixes a lot of issues. This should help debug less obvious issues, hopefully. This fixes #25217 and fixes #25218
2019-01-28Properly detect when to use DRI_PRIMEHein-Pieter van Braam
We fork off twice once with and once without DIR_PRIME=1 set. We then use the vendor string to determine what GPU to use. We prefer (in order) 1) AMDGPU/AMDGPU-PRO/NVidia non-free driver 2) Intel driver 3) Nouveau 4) Software rendering If a driver can't be detected it will default to DRI_PRIME=0
2019-01-03Merge pull request #24477 from lupoDharkael/nouveauHein-Pieter van Braam
Don't enable DRI_PRIME if nouveau is loaded
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-21Fix missed captured mouse events on x11Lee Pugh
2018-12-20Don't enable DRI_PRIME if nouveau is loadedlupoDharkael
2018-12-15switch middle and secondary mouse buttons orderMikko Mustonen
2018-12-14Use XInput2 RawMotion to generate MouseMotion eventsCosmic Chip Socket
The current system for capturing the mouse and generating motion events on X11 has issues with inaccurate and lopsided input. This is because both XQueryPointer and XWarpPointer work in terms of integer coordinates when the underlying X11 input driver may be tracking the mouse using subpixel coordinates. When warping the pointer, the fractional part of the pointer position is discarded. To work around this issue, the fix uses raw motion events from XInput 2. These events report relative motion and are not affected by pointer warping. Additionally, this means Godot is able to detect motion at a higher resolution under X11. Because this is raw mouse input, it is not affected by the user's pointer speed and acceleration settings. This is the same system as SDL2 uses for its relative motion. Multitouch input on X requires XInput 2.2. Raw motion events require XInput 2.0. Since 2.0 is old enough, this is now the minimum requirement to use Godot on X.
2018-12-14Merge pull request #20385 from moiman100/unify-double-clickingRémi Verschelde
Added double clicking to all buttons on Linux and Javascript
2018-12-14Merge pull request #20063 from moiman100/fix-button-maskRémi Verschelde
Unified button mask behavior across platforms
2018-12-07Merge pull request #22733 from guilhermefelipecgs/fix_wm_classRémi Verschelde
[x11] Use "application/config/name" for WM_CLASS
2018-11-18Fix X11 running a project with fullscreen setting on and resizable off with ↵Marcelo Fernandez
multiple screens
2018-11-06Set DRI_PRIME=1 by default on X11 if not already setHein-Pieter van Braam
This mirrors behavior on Windows and MacOSX where Godot tries to default to a dGPU if it exists. This doesn't work for Nvidia optimus yet but this can maybe be added later.
2018-11-01Fix init of VisualServerRasterRémi Verschelde
Contrarily to what #23434 assumed, this is not a memory leak, the VisualServerRaster instance is passed as a parameter to VisualServerWrapMT's constructor. Fixes #23437.
2018-11-01Fix initialization of visual server in all platformsGeorge Marques
Avoid leaking an extra instance when using threads. Also fix threaded loading issues on Android and iOS.
2018-10-25Repaired mistyped of 'its' on several files.M. Huri
2018-10-06Remove redundant "== false" codeAaron Franke
Some of this code has been re-organized. f
2018-10-06Remove redundant "== true" codeAaron Franke
If it can be compared to a boolean, it can be evaluated as one in-place.
2018-10-05[x11] Use "application/config/name" for WM_CLASSGuilherme Felipe
2018-10-01Changed the comment where reduz yells at the X11 API to a less explicitive oneLikeLakers2
2018-09-19Merge pull request #22070 from capnm/fix_Input.set_default_cursor_shape_take2Rémi Verschelde
Fix set_default_cursor_shape interaction with Control nodes
2018-09-17Fix Input::set_custom_mouse_cursor showing cursor when it's invisibleGuilherme Felipe
2018-09-15Fix set_default_cursor_shape interaction with Control nodesMartin Capitanio
Do not call `set_cursor_shape` when the cursor is inside the `Control` node. Make it work for x11 in MOUSE_MODE_CONFINED.
2018-09-13Fix set_custom_mouse_cursor changing to incorrect cursor shapeGuilherme Felipe
[Docs] Add class ref for Input::set_default_cursor_shape
2018-09-12Merge pull request #21753 from guilhermefelipecgs/fix_confined_modeRémi Verschelde
Fixes to mouse mode confined and captured
2018-09-12Merge pull request #21914 from hpvb/fix-21720Rémi Verschelde
When resizing an X11 window wait for the WM to process our request
2018-09-12Merge pull request #21910 from hpvb/fix-8145-x11Rémi Verschelde
Update X11 global mouse position at startup
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-10When resizing an X11 window wait for the WM to process our requestHein-Pieter van Braam
On X11 when we send an XResizeWindow request to the X server it is happy to say it is done when the request has been handed over to the window manager. The window manager itself may however take some time to actually do the resize. Godot expects that a resize request is immediate. To work around this issue we could implement the whole _NET_WM_SYNC_REQUEST protocol. However this protocol does not fit very well with the way we currently process X events and would when implemented in the current framework still cause a 1 frame delay between a resize request and the actual resize happening. This fixes #21720
2018-09-09Update X11 global mouse position at startupHein-Pieter van Braam
When we start the engine we haven't yet gotten any X11 motion events so we don't yet know where our mouse cursor is located. Instead we now query the X server for this information when we start and update the appropriate values. In addition when we move the window we also update the mouse position based off of X server knowledge as we will also not have received any mouse motion events. this fixes #8145 (for X11 only)
2018-09-05Fixes to mouse mode confined and capturedGuilherme Felipe
These modes will work on Linux in the same way as Windows.
2018-09-04Really fix the custom cursor hotspotMartin Capitanio
Add check for negative values. Fixes #21721
2018-09-03Fix custom cursor hotspotGuilherme Felipe
Cursor hotspot must be inside image on Linux. Adding validation for all platforms for consistency.
2018-08-27Merge pull request #21387 from hpvb/fix-15324Rémi Verschelde
Fall back to GLES2 if GLES3 is not working
2018-08-27When setting an X11 icon fails, try halving the sizeHein-Pieter van Braam
When setting an icon that is too large previously Godot would die with a X Error of failed request: BadLength error. To avoid this we install an error handler right before we set an icon. If the error handler triggers we halve the icon size until it works or until we've reached a 0 size on either width or height. We print a warning when this happens to alert developers. This fixes #19716
2018-08-26Fall back to GLES2 if GLES3 is not workingHein-Pieter van Braam
This adds a static is_viable() method to all rasterizers which has to be called before initializing the rasterizer. This allows us to check what rasterizer to use in OS::initialize together with the GL context initialization. This commit also adds a new project setting "rendering/quality/driver/driver_fallback" which allows the creator of a project to specify whether or not fallback to GLES2 is allowed. This setting is ignored for the editor so the editor will always open even if the project itself cannot run. This will hopefully reduce confusion for users downloading projects from the internet. We also no longer crash when GLES3 is not functioning on a platform. This fixes #15324
2018-08-25Support more X11 dialogs for X11::alert()Hein-Pieter van Braam
Modern distributions such as Fedora do not ship 'xdialog' with their default deployment. This commit adds support for Gnome's Zenity as well as KDE's kdialog.
2018-08-24Merge pull request #20712 from marcelofg55/midi_open_closeJuan Linietsky
Add OS::open_midi_inputs and OS::close_midi_inputs
2018-08-24Make some debug prints verbose-only, remove othersRémi Verschelde
2018-08-24Add print_verbose to print to stdout only in verbose modeRémi Verschelde
Equivalent of the cumbersome: if (OS::get_singleton()->is_stdout_verbose()) print_line(msg);
2018-08-21BPTC supportelasota