forked from bartvdbraak/blender
Disabling xinput wasn't done completely.
This commit is contained in:
parent
5ca36915a6
commit
d635a2b143
@ -795,6 +795,7 @@ GHOST_SystemX11::processEvent(XEvent *xe)
|
|||||||
}
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
|
#ifdef WITH_X11_XINPUT
|
||||||
if(xe->type == window->GetXTablet().MotionEvent)
|
if(xe->type == window->GetXTablet().MotionEvent)
|
||||||
{
|
{
|
||||||
XDeviceMotionEvent* data = (XDeviceMotionEvent*)xe;
|
XDeviceMotionEvent* data = (XDeviceMotionEvent*)xe;
|
||||||
@ -818,7 +819,7 @@ GHOST_SystemX11::processEvent(XEvent *xe)
|
|||||||
}
|
}
|
||||||
else if(xe->type == window->GetXTablet().ProxOutEvent)
|
else if(xe->type == window->GetXTablet().ProxOutEvent)
|
||||||
window->GetXTablet().CommonData.Active= GHOST_kTabletModeNone;
|
window->GetXTablet().CommonData.Active= GHOST_kTabletModeNone;
|
||||||
|
#endif // WITH_X11_XINPUT
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,8 +183,11 @@ GHOST_WindowX11(
|
|||||||
int natom;
|
int natom;
|
||||||
int glxVersionMajor, glxVersionMinor; // As in GLX major.minor
|
int glxVersionMajor, glxVersionMinor; // As in GLX major.minor
|
||||||
|
|
||||||
|
#ifdef WITH_X11_XINPUT
|
||||||
/* initialize incase X11 fails to load */
|
/* initialize incase X11 fails to load */
|
||||||
memset(&m_xtablet, 0, sizeof(m_xtablet));
|
memset(&m_xtablet, 0, sizeof(m_xtablet));
|
||||||
|
#endif
|
||||||
|
|
||||||
m_visual= NULL;
|
m_visual= NULL;
|
||||||
|
|
||||||
if (!glXQueryVersion(m_display, &glxVersionMajor, &glxVersionMinor)) {
|
if (!glXQueryVersion(m_display, &glxVersionMajor, &glxVersionMinor)) {
|
||||||
|
@ -38,7 +38,9 @@
|
|||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
// For tablets
|
// For tablets
|
||||||
#include <X11/extensions/XInput.h>
|
#ifdef WITH_X11_XINPUT
|
||||||
|
# include <X11/extensions/XInput.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
@ -190,7 +192,7 @@ public:
|
|||||||
Window
|
Window
|
||||||
getXWindow(
|
getXWindow(
|
||||||
);
|
);
|
||||||
|
#ifdef WITH_X11_XINPUT
|
||||||
class XTablet
|
class XTablet
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -214,6 +216,10 @@ public:
|
|||||||
|
|
||||||
const GHOST_TabletData* GetTabletData()
|
const GHOST_TabletData* GetTabletData()
|
||||||
{ return &m_xtablet.CommonData; }
|
{ return &m_xtablet.CommonData; }
|
||||||
|
#else // WITH_X11_XINPUT
|
||||||
|
const GHOST_TabletData* GetTabletData()
|
||||||
|
{ return NULL; }
|
||||||
|
#endif // WITH_X11_XINPUT
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Need this in case that we want start the window
|
* Need this in case that we want start the window
|
||||||
@ -321,7 +327,9 @@ private :
|
|||||||
getEmptyCursor(
|
getEmptyCursor(
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifdef WITH_X11_XINPUT
|
||||||
void initXInputDevices();
|
void initXInputDevices();
|
||||||
|
#endif
|
||||||
|
|
||||||
GLXContext m_context;
|
GLXContext m_context;
|
||||||
Window m_window;
|
Window m_window;
|
||||||
@ -350,8 +358,10 @@ private :
|
|||||||
/** Cache of XC_* ID's to XCursor structures */
|
/** Cache of XC_* ID's to XCursor structures */
|
||||||
std::map<unsigned int, Cursor> m_standard_cursors;
|
std::map<unsigned int, Cursor> m_standard_cursors;
|
||||||
|
|
||||||
|
#ifdef WITH_X11_XINPUT
|
||||||
/* Tablet devices */
|
/* Tablet devices */
|
||||||
XTablet m_xtablet;
|
XTablet m_xtablet;
|
||||||
|
#endif
|
||||||
|
|
||||||
void icccmSetState(int state);
|
void icccmSetState(int state);
|
||||||
int icccmGetState() const;
|
int icccmGetState() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user