Age | Commit message (Collapse) | Author |
|
Fixes to mouse mode confined and captured
|
|
When resizing an X11 window wait for the WM to process our request
|
|
Update X11 global mouse position at startup
|
|
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.
|
|
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
|
|
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)
|
|
These modes will work on Linux in the same way as Windows.
|
|
Add check for negative values.
Fixes #21721
|
|
Cursor hotspot must be inside image on Linux. Adding validation for all
platforms for consistency.
|
|
Fall back to GLES2 if GLES3 is not working
|
|
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
|
|
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
|
|
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.
|
|
Add OS::open_midi_inputs and OS::close_midi_inputs
|
|
|
|
Equivalent of the cumbersome:
if (OS::get_singleton()->is_stdout_verbose())
print_line(msg);
|
|
|
|
This fixes the editor on X11 not getting put on the foreground when a
debugged project hits an error or breakpoint.
|
|
|
|
- Refactored all builder (make_*) functions into separate Python modules along to the build tree
- Introduced utility function to wrap all invocations on Windows, but does not change it elsewhere
- Introduced stub to use the builders module as a stand alone script and invoke a selected function
There is a problem with file handles related to writing generated content (*.gen.h and *.gen.cpp)
on Windows, which randomly causes a SHARING VIOLATION error to the compiler resulting in flaky
builds. Running all such content generators in a new subprocess instead of directly inside the
build script works around the issue.
Yes, I tried the multiprocessing module. It did not work due to conflict with SCons on cPickle.
Suggested workaround did not fully work either.
Using the run_in_subprocess wrapper on osx and x11 platforms as well for consistency. In case of
running a cross-compilation on Windows they would still be used, but likely it will not happen
in practice. What counts is that the build itself is running on which platform, not the target
platform.
Some generated files are written directly in an SConstruct or SCsub file, before the parallel build starts. They don't need to be written in a subprocess, apparently, so I left them as is.
|
|
This commit makes operator[] on Vector const and adds a write proxy to it. From
now on writes to Vectors need to happen through the .write proxy. So for
instance:
Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;
Failing to use the .write proxy will cause a compilation error.
In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.
_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
|
|
Added a new MIDIDriver class
|
|
Fixes #20035.
|
|
-Add extra flag optimize=[size,speed] to be able to prioritize size
|
|
|
|
Fixes #20301.
|
|
-Project/Editor settings now show tooltips properly
-Settings thar require restart now will show a restart warning
-Video driver is now visible all the time, can be changed easily
-Added function to request current video driver
|
|
|
|
|
|
|
|
bugfix: correct #ifdef for TOUCH_ENABLED and OPENGL_ENABLED
|
|
|
|
|
|
This also removes `unix_global_settings_path` from SConstruct
since it is no longer used.
|
|
|
|
|
|
Add validation in set_custom_mouse_cursor
|
|
Check if the image is valid.
|
|
|
|
[x11] Preserve window size when calling this method.
[osx] Make sure it don't make the window resizable if it's not needed.
[windows] clean up the code.
|
|
- Fix a bug when mouse is confined don't update the cursor shape.
- Don't let the mouse leave the window when resizing to a smaller
resolution when MOUSE_MODE_CONFINED.
- Fix set_borderless_window to preserve the actual video_mode.widht/height.
|
|
|
|
|
|
Experimental support for windows with per-pixel transparency.
|
|
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)
The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.
Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.
*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.
On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.
Plus: Improve/fix tracking of current mouse position.
** Summary of changes to settings: **
- `display/window/handheld/emulate_touchscreen` becomes `input/pointing_devices/emulate_touch_from_mouse`
- New setting: `input/pointing_devices/emulate_mouse_from_touch`
|
|
[Linux] Ensures that the custom cursor will be used when changing to
MOUSE_MODE_VISIBLE. Fix #3086
[Windows] Fix cursor flickering when MOUSE_MODE_HIDDEN.
[Mac] Fix possible cursor flicker when MOUSE_MODE_HIDDEN.
|
|
Added new audio device functions to set/get the audio device
|
|
Windows).
|
|
|
|
|