Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-10-31 17:56:56 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-21 14:24:01 +0300
commit2e9d5ba2115ceabdc0e8cb2eaa148c81d7b04667 (patch)
treead594381af9eb2697351729f2840f9b34dd2d74b /intern/ghost/GHOST_Types.h
parentc58cc8aeda8799aef1a8c4ff4a8def3f64219bdf (diff)
GHOST: bundle tablet data with GHOST event
Previously the window manager would receive the GHOST event and then query the latest tablet data from the window to go along with it. If multiple events were queued, it would then use too new tablet data for handling older events. Fixes T62565: tablet pressure not working on macOS with some devices
Diffstat (limited to 'intern/ghost/GHOST_Types.h')
-rw-r--r--intern/ghost/GHOST_Types.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index fab315e5f13..c7c9f91a361 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -101,6 +101,12 @@ typedef struct GHOST_TabletData {
float Ytilt; /* as above */
} GHOST_TabletData;
+static const GHOST_TabletData GHOST_TABLET_DATA_DEFAULT = {
+ GHOST_kTabletModeNone, /* No tablet connected. */
+ 1.0f, /* Pressure */
+ 0.0f, /* Xtilt */
+ 0.0f}; /* Ytilt */
+
typedef enum {
GHOST_kNotVisible = 0,
GHOST_kPartiallyVisible,
@@ -409,11 +415,15 @@ typedef struct {
GHOST_TInt32 x;
/** The y-coordinate of the cursor position. */
GHOST_TInt32 y;
+ /** Associated tablet data. */
+ GHOST_TabletData tablet;
} GHOST_TEventCursorData;
typedef struct {
/** The mask of the mouse button. */
GHOST_TButtonMask button;
+ /** Associated tablet data. */
+ GHOST_TabletData tablet;
} GHOST_TEventButtonData;
typedef struct {