diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-12-05 16:41:00 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-12-05 16:41:00 +0300 |
commit | fb3f1a35676e830358ec68ae8153e076253930b4 (patch) | |
tree | 41f8d33b916dcbe0cd54e87b4335cd26ae8da896 | |
parent | be359fc6e51a98143961cb01901761d059aaacfd (diff) | |
parent | c9344d6c5b0533629966c6baa853591f345af00a (diff) |
Merge branch 'master' into blender2.8
-rwxr-xr-x | build_files/build_environment/install_deps.sh | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemX11.cpp | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 6ce5fd9a8fb..b480f4a9c4e 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -378,7 +378,7 @@ ALEMBIC_FORCE_BUILD=false ALEMBIC_FORCE_REBUILD=false ALEMBIC_SKIP=false -OPENCOLLADA_VERSION="1.6.63" +OPENCOLLADA_VERSION="1.6.68" OPENCOLLADA_FORCE_BUILD=false OPENCOLLADA_FORCE_REBUILD=false OPENCOLLADA_SKIP=false diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index e228a11dac2..ce056ef2c62 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -2367,6 +2367,8 @@ void GHOST_SystemX11::refreshXInputDevices() if (m_xtablet.StylusDevice != NULL) { /* Find how many pressure levels tablet has */ XAnyClassPtr ici = device_info[i].inputclassinfo; + bool found_valuator_class = false; + for (int j = 0; j < m_xtablet.StylusDevice->num_classes; ++j) { if (ici->c_class == ValuatorClass) { // printf("\t\tfound ValuatorClass\n"); @@ -2384,11 +2386,23 @@ void GHOST_SystemX11::refreshXInputDevices() m_xtablet.YtiltLevels = 0; } + found_valuator_class = true; + break; } ici = (XAnyClassPtr)(((char *)ici) + ici->length); } + + if (!found_valuator_class) { + /* In case our name matching detects a device that + * isn't actually a stylus. For example there can + * be "XPPEN Tablet" and "XPPEN Tablet Pen", but + * only the latter is a stylus. */ + XCloseDevice(m_display, m_xtablet.StylusDevice); + m_xtablet.StylusDevice = NULL; + m_xtablet.StylusID = 0; + } } else { m_xtablet.StylusID = 0; |