Commit graph

34 commits

Author SHA1 Message Date
bruvzg
fc1d1c3557
[Windows] Prevent overwriting old cursor handle on multiple mouse_mode changes, ensure mouse_mode is set before cursor_set_shape is called to restore cursor. 2020-06-22 13:05:18 +03:00
Rémi Verschelde
3e07080942
Merge pull request #39427 from hcmlax/shortcut_issue_39351
fixed issue where shortcut doesn't work if alt is pressed before shift
2020-06-19 23:47:49 +02:00
unknown
d191a8b9f8 adding check for syskeydown on control and alt 2020-06-18 14:36:22 -07:00
bruvzg
92352b1c23
Add keyboard layout enumeration / set / get functions (macOS, Windows, Linux/X11), remove latin variant function. 2020-06-13 11:02:00 +03:00
Rémi Verschelde
3be9c74d8b
Merge pull request #38951 from bruvzg/win_ink_block_mm_4
Block WM_MOUSEMOVE during Windows Ink pen handling.
2020-05-22 14:34:20 +02:00
bruvzg
b08b027a9a
Block WM_MOUSEMOVE during Windows Ink pen handling. 2020-05-22 10:44:47 +03:00
GuidoRevers
cf20c0343f Fix segmentation fault when using context_vulkan after memdelete context_vulkan 2020-05-21 20:38:58 +02:00
bruvzg
d0b5174b6a
[Windows] Add tablet driver selection. 2020-05-20 09:37:32 +03:00
Eric Rybicki
e460456e60
Fix certain characters being recognized as special keys in Windows when using the us international layout 2020-05-18 14:47:54 +02:00
HaSa1002
434bf0572c Fix input event being dispatched multiple times on Windows 2020-05-16 16:17:50 +02:00
Rémi Verschelde
07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde
69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
Rémi Verschelde
e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
bruvzg
78c80de738
WinTab: Adds extra "mouse move" events to make movement smoother and correctly handle pressure/tilt change when cursor is not moving. 2020-05-08 10:56:42 +03:00
bruvzg
ba85db5a79
Remove WinTab error message. 2020-05-07 15:51:19 +03:00
bruvzg
d978658f81
[Windows] Add support for the WinTab API for pen input. 2020-05-05 14:16:02 +03:00
bruvzg
0128947894
[Linux/Windows] Set pressure to 1.0f when primary button is pressed and device is not pressure sensitive. 2020-05-03 20:13:01 +03:00
Rémi Verschelde
7e1e0f496b
Merge pull request #37802 from ThakeeNathees/window-position-bug-osx-x11
display server window position bug fix
2020-04-29 09:04:53 +02:00
Rémi Verschelde
fdf58a5858 Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring
in #37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes #37319.
Fixes #37690.
2020-04-28 15:19:49 +02:00
Thakee Nathees
63a00aec68 display server window position bug fix (#37323) 2020-04-11 20:13:12 +05:30
Rémi Verschelde
312bbb9600
Merge pull request #37525 from lupoDharkael/replace-0L
Replace 0L with a casted nullptr
2020-04-02 21:22:45 +02:00
lupoDharkael
6324f578bd Replace 0L with a casted nullptr 2020-04-02 17:33:46 +02:00
Rémi Verschelde
ea7b497065 Replace more occurrences of NULL with nullptr 2020-04-02 14:56:01 +02:00
lupoDharkael
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Rémi Verschelde
516b3bb88f Fix Clang warnings on Windows
Fixes #37490.
2020-04-01 16:28:20 +02:00
Rémi Verschelde
60d486acc8 Fix copyright headers for recently added files 2020-03-28 13:29:29 +01:00
Juan Linietsky
9a5d15a2dc Implemented drag and drop across windows, both OS and embedded. 2020-03-26 15:49:46 +01:00
Juan Linietsky
047e0b7de5 Reworked tooltips to use the popup system. 2020-03-26 15:49:45 +01:00
Juan Linietsky
b3080bc2f4 Popups have also been converted to windows
Controls using the old modal API have been replaced to use popups.
2020-03-26 15:49:44 +01:00
Juan Linietsky
09ba290364 Fixes to window style flags 2020-03-26 15:49:44 +01:00
Juan Linietsky
c7b4dcae2f Open sub-windows as embedded if the OS does not support them 2020-03-26 15:49:43 +01:00
Juan Linietsky
441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky
543fb1c4da Separate DisplayServer from OS on Windows 2020-03-26 15:49:41 +01:00