Commit Graph

1582 Commits

Author SHA1 Message Date
Sergey Sharybin
1c5479167f Cleanup: Strict compiler warning 2020-06-05 11:59:45 +02:00
Christian Rauch
63bcee81f6 GHOST/wayland: use 'is_dialog' flag to prevent drawing into same window 2020-05-30 12:23:39 +01:00
Campbell Barton
d1f4adab24 Cleanup: spelling, correct reference to 'Mesh.mcol' 2020-05-29 12:58:29 +10:00
Campbell Barton
6c1cf395f2 Cleanup: remove unnecessary copy constructor
Caused deprecated-copy warnings as it wasn't used.
2020-05-27 11:50:54 +10:00
Christian Rauch
b87d81be96 Wayland: support key repeat 2020-05-22 18:09:17 +10:00
Christian Rauch
fe739f8c26 GHOST: fix GHOST_System::getMilliSeconds()
This wasn't returning milliseconds, causing problems with key repeat.
2020-05-22 18:08:13 +10:00
Campbell Barton
ce6fd6b6a2 Fix missing header building with wayland 2020-05-22 16:47:59 +10:00
Christian Rauch
c8060a78fd GHOST/wayland: style fix 2020-05-13 23:51:51 +01:00
Christian Rauch
a53917152e GHOST/wayland: fix cursor buffer deallocation 2020-05-13 23:13:48 +01:00
Christian Rauch
bd3c842c56 GHOST/wayland: remove unused 'registry' 2020-05-13 23:13:48 +01:00
Christian Rauch
75e989dab6 GHOST: fix cursor buffer handling when toggling visibility 2020-05-12 23:05:24 +01:00
Campbell Barton
f7715b3337 Merge branch 'blender-v2.83-release' 2020-05-12 22:10:21 +10:00
Campbell Barton
65381e220e Fix T76507: Reading clipboard blocks keyboard input on X11 2020-05-12 22:09:11 +10:00
Nicolas Fauvet
1c0e22b982 VR: Fix OpenXR state freeze on Oculus after taking off HMD
With the Oculus runtime, the VR session would freeze when taking off the HMD
and putting it back on. This was caused by the deletion of graphics resources
too early in the OpenXR state machine, at least for Oculus.
The resources will now only be freed once the session is actually destroyed.

Also fixes an issue where it wasn't possible to stop the session via the UI
when the HMD was taken off.

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D7635
2020-05-07 14:38:10 +02:00
Nicolas Fauvet
6e0540671c VR: Fix OpenXR state freeze on Oculus after taking off HMD
With the Oculus runtime, the VR session would freeze when taking off the HMD
and putting it back on. This was caused by the deletion of graphics resources
too early in the OpenXR state machine, at least for Oculus.
The resources will now only be freed once the session is actually destroyed.

Also fixes an issue where it wasn't possible to stop the session via the UI
when the HMD was taken off.

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D7635
2020-05-07 14:28:28 +02:00
Julian Eisel
45adcc51b2 macOS: Remove workaround for old quit dialog
Got added in 1a30e52142 (and tweaked in follow-ups) but shouldn't be needed
anymore with the newer popup based quit dialog.

It prevents Blender from quitting properly in case macOS closed all Blender
windows. This may happen in some corner-cases unfortunately (e.g. T74101) which
would be nice to have addressed at some point. Until then, users shouldn't have
to force-kill Blender to shut it down if they run into this.
2020-05-07 13:55:14 +02:00
Campbell Barton
8b74d6673a Fix num-pad access on wayland
Always interpret keypad keys as if numpad is enabled,
this matches other platforms.

Also add missing quote key.
2020-05-06 11:10:29 +10:00
Christian Rauch
4af9578ab7 Fix T76429: GHOST/Wayland event's don't correspond to physical keys 2020-05-06 10:20:32 +10:00
Campbell Barton
39ea222339 Cleanup: warnings 2020-05-06 08:18:00 +10:00
Campbell Barton
6a0cb48149 GHOST: cleanup platform checks, fix Wayland + X11
- Building with Wayland + X11 missed an exception include.
- Move HEADLESS check first, since it's the same on all platforms.
2020-05-03 20:24:24 +10:00
Brecht Van Lommel
83304e4c22 Merge branch 'blender-v2.83-release' 2020-05-01 23:55:13 +02:00
Nikhil Shringarpurey
51aa0ea58f Fx build error with MSBuild on Windows
Differential Revision: https://developer.blender.org/D7587
2020-05-01 22:03:26 +02:00
Campbell Barton
d7d140ec7f CMake: add WITH_GHOST_X11 option
- Support building only with Wayland.
- In this case, show useful error messages
  when Wayland fails to load.
2020-05-01 20:07:01 +10:00
Campbell Barton
e28d2e5184 Cleanup: duplicate include, define from Wayland patch 2020-05-01 19:28:43 +10:00
Campbell Barton
7ded7610ce Cleanup: rename WITH_X11 to WITH_GHOST_X11
Matches WITH_GHOST_{SDL|WAYLAND}
2020-05-01 19:14:50 +10:00
Christian Rauch
47fea20dc8 GHOST: set the window state on wayland startup 2020-05-01 18:43:11 +10:00
Campbell Barton
7f4c4011ce Cleanup: replace unordered_map with switch statement
Was performing 2x look-ups, checking keys doesn't benefit noticeably
from hash look-ups.
2020-04-30 17:56:51 +10:00
Campbell Barton
070bf01d37 GHOST: fix WITH_GHOST_DEBUG option
Changing the order of include changes broke GHOST_DEBUG,
however it was using defines in a fragile way.

Fix by removing 'GHOST_DEBUG' and use 'WITH_GHOST_DEBUG' which
was already defined by CMake.
2020-04-30 17:28:28 +10:00
Campbell Barton
52186a39af Cleanup: printf warning 2020-04-30 17:28:28 +10:00
Campbell Barton
a18ad3c3b6 CMake: use system include for generated headers 2020-04-30 16:01:41 +10:00
Christian Rauch
66e70fe299 GHOST: initial Wayland support
Usable with the CMake option 'WITH_GHOST_WAYLAND'

The following functionality is working:

- Building with X11 and Wayland at the same time,
  wayland is used when available.
- Keyboard, pointer handling.
- Cursor handling.
- Dedicated off-screen windows.
- Drag & drop.
- Copy & paste.
- Pointer grabbing.

See D6567 for further details.
2020-04-30 14:21:50 +10:00
Sergey Sharybin
2c60221080 Cleanup: Missing include directories after recent cleanup 2020-04-28 13:33:18 +02:00
Brecht Van Lommel
2580fa1602 Cleanup: remove STR_String usage from GHOST 2020-04-28 12:57:39 +02:00
Ray Molenkamp
15081cf6df Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-27 13:01:24 -06:00
Ray Molenkamp
7951ec2641 Cleanup: Fix warning about initialization order with MSVC 2020-04-27 13:00:53 -06:00
Christian Rauch
54eb701978 Cleanup: add newline to ghost warning print 2020-04-27 15:27:18 +10:00
Brecht Van Lommel
7fbd9b67af Fix Windows build error introduced in Wintab commit revert 2020-04-14 17:14:56 +02:00
Brecht Van Lommel
e90d8422d0 Revert "Windows: support high resolution tablet pen events for Wintab"
This reverts commit 1a3928f33c and 1a3928f3. This is not working stable
with some Wintab implementations, so reverting for now. This leaves only
the Windows Ink changes for 2.83.
2020-04-14 18:58:37 +02:00
Nicholas Rishel
1a3928f33c Fix T75546: Solve possible endless loop in wintab initialisation
Some Wintab drivers report a zero length queue, this causes an unplanned never ending loop.

Differential Revision: https://developer.blender.org/D7392
Reviewed by: Ray Molenkamp
2020-04-09 16:43:09 -06:00
Campbell Barton
19352bca16 Cleanup: spelling 2020-04-05 22:22:21 +10:00
Brecht Van Lommel
8360bfb75c Cleanup: clang-format 2020-04-08 21:58:17 +02:00
Brecht Van Lommel
fd487b1f4e Fix build error with WITH_X11_XINPUT=OFF after recent changes 2020-04-08 14:03:54 +02:00
Nicholas Rishel
ea3e0b3e8c Windows: support high resolution tablet pen events for Wintab
Together with Windows Ink support, this should fully resolve T70765.

Differential Revision: https://developer.blender.org/D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
d571d615a5 Windows: support high resolution tablet pen events for Windows Ink
Rather than using the last state of the tablet, we now query the history of
pointer events so strokes can follow the pen even if Blender does not handle
events at the same rate.

Differential Revision: https://developer.blender.org/D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
3d8c57f4da Cleanup: minor refactoring of pointer event handling
Ref D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
4e4bf241c8 Cleanup: add utility functions for milliseconds conversion
Ref D6675
2020-04-08 12:25:40 +02:00
Brecht Van Lommel
c43473e884 Cleanup: remove GHOST API to query tablet state from Window
It's not used by Blender anymore and it's unreliable since this state really
only makes sense associated with events in a particular order.

Ref D6675
2020-04-08 12:25:40 +02:00
Campbell Barton
04fe37f931 Cleanup: quiet shadow warnings with ghost & mantaflow 2020-04-03 16:15:57 +11:00
Campbell Barton
d52326bab3 Cleanup: spelling 2020-04-03 12:38:04 +11:00
Julian Eisel
6eb409bb9c Fix warnings caused by own earlier commit
Caused by 34465a7fb0.
2020-04-02 18:46:12 +02:00