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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-01-16 16:28:25 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-01-16 16:28:25 +0400
commit2095b2cddba2bdad057ceef54a1046c522389ff5 (patch)
tree9834f8c2cc3a70922133d61b1e572064983e4c6a /intern/ghost/intern/GHOST_SystemX11.h
parentfe83dc68828b70b0f7feeb82f341c505ac6d7c73 (diff)
Fix #33877: Pressure Sensitivity stop after opening User Preferences Window
Issue was caused by opening the same device id twice and closing one of descriptors on closing window. This used to close device used by other windows. Now moved all device-specific code to SystemX11, so opening and closing happens only once.
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemX11.h')
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index 02c0109085a..e49d6280b9c 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -39,6 +39,11 @@
#include "GHOST_System.h"
#include "../GHOST_Types.h"
+// For tablets
+#ifdef WITH_X11_XINPUT
+# include <X11/extensions/XInput.h>
+#endif
+
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
# define GHOST_X11_RES_NAME "Blender" /* res_name */
# define GHOST_X11_RES_CLASS "Blender" /* res_class */
@@ -284,6 +289,27 @@ public:
Atom m_incr;
Atom m_utf8_string;
+#ifdef WITH_X11_XINPUT
+ typedef struct GHOST_TabletX11 {
+ XDevice *StylusDevice;
+ XDevice *EraserDevice;
+
+ XID StylusID, EraserID;
+
+ int MotionEvent;
+ int ProxInEvent;
+ int ProxOutEvent;
+
+ int PressureLevels;
+ int XtiltLevels, YtiltLevels;
+ } GHOST_TabletX11;
+
+ GHOST_TabletX11 &GetXTablet()
+ {
+ return m_xtablet;
+ }
+#endif // WITH_X11_XINPUT
+
private:
Display *m_display;
@@ -291,6 +317,11 @@ private:
XIM m_xim;
#endif
+#ifdef WITH_X11_XINPUT
+ /* Tablet devices */
+ GHOST_TabletX11 m_xtablet;
+#endif
+
/// The vector of windows that need to be updated.
std::vector<GHOST_WindowX11 *> m_dirty_windows;
@@ -313,6 +344,10 @@ private:
bool openX11_IM();
#endif
+#ifdef WITH_X11_XINPUT
+ void initXInputDevices();
+#endif
+
GHOST_WindowX11 *
findGhostWindow(
Window xwind