Commit Graph

344 Commits

Author SHA1 Message Date
67261b1e87 Remove buggy check if key was already released for accumulated input
Fixes #27104
2020-01-22 17:03:33 +01:00
8454804972 Merge pull request #33967 from Calinou/add-os-is-window-focused
Add an `OS.is_window_focused()` getter
2020-01-06 11:39:18 +01:00
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
2ef8c5fac5 iOS modular build and export implementation. 2019-12-01 21:57:18 +02:00
21a3923410 Add an OS.is_window_focused() getter
This makes it possible to know whether the window is focused
at a given time, without having to track the focus state manually
using `NOTIFICATION_WM_FOCUS_IN` and `NOTIFICATION_WM_FOCUS_OUT`.

This partially addresses #33928.
2019-11-28 16:42:51 +01:00
d191ffb47d X11: Fix memory leak in handle_key_event
Extracted from #27189.
2019-11-12 07:51:51 +01:00
f675621725 [macOS, Windows, X11] Add graphic tablet pen pressure and tilt support to InputEventMouseMotion event. 2019-10-30 14:42:21 +02:00
2a76fba1f6 Fix X11 modifier keys. 2019-10-12 00:09:14 +03:00
5bfe32eaa4 Properly revert cursor when using set_custom_mouse_cursor with null
Fixes #32486
2019-10-03 13:02:11 +02:00
50be65bf43 Changed some code found by Clang Tidy and Coverity 2019-09-22 18:45:08 +02:00
4553935f27 [X11] set PID as window attribute
This allows other programs to find out the PID of a Godot instance just
by the X11 window ID.
2019-09-11 10:13:48 +02:00
bd63d3e1ec Fix modifier keys causing key-code mismatch on Linux/X11. 2019-08-28 13:27:13 +03:00
deb73001ab OS_X11::set_window_maximized gives up after 0.5s
Spinning forever is clearly worse, especially since this happens on at
least FVWM even though the window actually is maximized.
2019-08-10 21:29:45 +02:00
7de2c70e11 Turn OS.set_min/max_window_size() warnings into errors
Since invalid values will cause the setting to be discarded,
it makes more sense to display an error message instead of a
warning message.
2019-07-30 14:50:52 +02:00
c3f69c6c76 Fix crash caused by a9a0d0fb15 2019-07-24 15:01:28 -03:00
a9a0d0fb15 Fix cursor blinking in integrated GPUs
Optimization for Input::set_custom_mouse_cursor when used inside
_process function. (Avoids cursor blinking in low end devices)
2019-07-09 19:38:25 -03:00
d17eac735c Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
2019-07-01 12:06:35 +02:00
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
d2833d4f4d Replace + "/" + with String::file_add() 2019-06-23 13:33:50 +01:00
0d61fc2c0f Merge pull request #29752 from bruvzg/window_size_limits
Add ability to limit maximum/minimum window size.
2019-06-17 11:58:00 +02:00
02ea99129e Adding a new Camera Server implementation to Godot.
This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server.
Other parts of Godot can interact with this to obtain images from the camera as textures.
This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
2019-06-15 21:30:32 +10:00
b924fb97d6 Add ability to limit maximum/minimum window size. 2019-06-15 09:49:11 +03:00
0e6cac8ab8 Merge pull request #29465 from bruvzg/per_pixel_transp_impr
Removes redundant "splash" setting, improves per pixel transparency documentation.
2019-06-12 12:50:17 +02:00
2a950f3a7c [X11] Add window borderless state detection, fix borderless state restoration after exiting fullscreen. 2019-06-11 12:07:48 +03:00
54863b20e6 Removes redundant "display/window/per_pixel_transparency/splash" setting, improves per pixel transparency documentation. 2019-06-04 11:21:29 +03:00
af2c742f53 Fix and expose String::strip_escapes(), use it in LineEdit paste
Supersedes #27736.
2019-05-31 15:49:14 +02:00
b660247216 Fixed uninitialised variable in x11 null cursor creation
Fully initialised color var.
Clarified intent a little with comments/layout.
2019-05-23 11:47:28 +01:00
f78baa5f93 added a const keyword for a methods that return constant literal... 2019-05-21 02:16:30 -04:00
5714a5f4ea X11: Check if "_NET_FRAME_EXTENTS" atom is supported. 2019-05-09 19:12:31 +03:00
2684e81682 Fixed game crash, regression of #26977
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2019-05-01 09:55:17 +02:00
ae41e35191 Merge pull request #27676 from qarmin/small_fixes_2
Small fixes to static analyzer bugs
2019-05-01 08:19:04 +02:00
419022ea89 Merge pull request #26977 from bruvzg/fix_x11_window_pos
Fix get_window_position / set_window_position on Linux
2019-04-30 12:07:09 +02:00
c709dfdf06 [Input] Release keys/actions pressed if window loses focus
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Co-authored-by: Marcelo Fernandez <marcelofg55@gmail.com>
2019-04-27 12:05:12 -03:00
9d0b3b300c fixed an access after free in OS_X11::set_context.
Added constructor and assignment operator for CharString
from const char* to simplify memory management when working with
utf8/ascii strings for APIs taking char*.
Reworked OS_X11::set_context to use CharString and avoid some manual
memory management.
2019-04-22 13:34:17 +01:00
a342131eba Merge pull request #27673 from qarmin/small_fixes
Small fixes, mostly duplicated code
2019-04-22 12:00:34 +02:00
1bae73d7d0 Add Input::get_current_cursor_shape
[Clean up] Removed unused/unnecessary methods.
2019-04-15 15:22:09 -03:00
0bcf0314f7 Fix jump over uninitialized value in OS Unix/X11 2019-04-09 15:12:55 +02:00
856a8226a5 Small fixes, mostly dupicated code 2019-04-08 11:03:37 +02:00
8460d0678c Small fixes to static analyzer bugs 2019-04-04 22:00:16 +02:00
85cc435103 [X11] Fix get_window_position to return absolute coordinates, change set_window_position to take window decorations into account. 2019-03-12 19:09:16 +02:00
7822cc9329 fix for access after free in OS_X11::set_context. 2019-03-12 13:41:02 +00:00
b0f782a0e3 Disable driver fallback to GLES2 by default
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-05 16:36:46 +01:00
a1e73dcc94 Add support for event accumlation (off by default, on for editor), fixes #26536 2019-03-03 19:53:13 -03:00
1e266d874d X11: Fix drag and drop from non-latin paths
Fixes #25826.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2019-02-28 12:32:39 +01:00
5eeb06ffd1 -Remove harcoded opengl extension testing from OS, ask rasterizer instead.
-Fixed a bug where etc textures were imported broken
2019-02-26 11:58:47 -03:00
7de7f0ef17 Fix all -Wtype-limits warnings. 2019-02-21 19:34:35 +01:00
89eb79aef1 Merge pull request #25879 from hpvb/fix-25629
Detect when primusrun/optirun is in use
2019-02-14 17:06:20 +01:00
84627140d7 Detect when primusrun/optirun is in use
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-14 15:50:47 +00:00
e3aa67792c Don't crash if there's no application name
This fixes #25852
2019-02-14 14:55:51 +00:00
d308eb091a Fix many asan and ubsan reported issues
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-30 06:43:56 +01:00