Commit Graph

360 Commits

Author SHA1 Message Date
1815a90796 Merge pull request #42466 from nekomatata/x11-events-mutex-leak
[3.2] Fix leak with events mutex in OS_X11
2020-10-01 19:10:30 +02:00
936c701838 Fix leak with events mutex in x11 Display Server 2020-10-01 16:16:23 +02:00
4ad74609ce Merge pull request #40205 from bruvzg/click-through-3
[3.2] Add mouse event pass-through support for window.
2020-10-01 13:58:24 +02:00
904773149d Merge pull request #42341 from nekomatata/x11-events-thread-3.2
[3.2] Fix issues related to delay when processing events on Linux
2020-09-30 16:39:55 +02:00
f725d9cb73 Fix issues related to delay when processing events on Linux
3.2 backport of PR #41910:
Fix general keyboard input lag on X11 display server
Fix delay to process clipboard content from Godot in other programs
2020-09-26 15:32:40 +02:00
8b5061aae7 X11: Try to load libXrandr.so.3 if libXrandr.so.2 isn't found
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.

(cherry picked from commit 413ff7938d)
2020-09-18 11:56:42 +02:00
e51fed9d1b [3.2] Add window click-through support. 2020-09-17 12:36:01 +03:00
08ee1de535 X11: Ensure XGetWindowProperty data gets freed
Fixes a small memory leak reported by lsan:
```
Direct leak of 73 byte(s) in 1 object(s) allocated from:
    #0 0x7f29825f3e70 in malloc (/lib64/liblsan.so.0+0xee70)
    #1 0x7f29824a5729 in XGetWindowProperty (/lib64/libX11.so.6+0x29729)
```
2020-06-29 13:05:24 +02:00
2256946f79 [3.2] Add keyboard layout enumeration / set / get functions (macOS, Windows, Linux/X11). 2020-06-13 11:01:49 +03:00
0456311be3 Don't force borderless mode when using per-pixel transparency 2020-05-10 21:05:37 +05:30
da2ca9e22a [Linux/Windows] Set pressure to 1.0f when primary button is pressed and device is not pressure sensitive.
(cherry picked from commit 0128947894)
2020-05-05 13:41:29 +02:00
a286edb821 Fix X11 pressure and tilt values.
(cherry picked from commit a2ad0878ed)
2020-05-05 13:41:29 +02:00
b4ab045444 Fix loss of precision in X11 device info.
(cherry picked from commit 9369b37f1f)
2020-04-16 12:47:19 +02:00
a7ff22ea6d Fix pressure / tilt ranges on Linux.
(cherry picked from commit d552f93f8b)
2020-02-14 15:58:15 +01:00
e8474435e5 Restores correct window position after fullscreen toggling off on Linux
(cherry picked from commit 90f00c0813)
2020-02-06 13:02:07 +01:00
8c689f7d4a Fix restoring window from fullscreen to normal on Linux
(cherry picked from commit 8737269275)
2020-02-06 13:02:07 +01:00
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