forked from bartvdbraak/blender
fix for bugs 30300, 31107: pen pressure with multiple open windows on MS Windows
This commit is contained in:
parent
6a7a144f50
commit
eca21a2532
@ -761,6 +761,7 @@ GHOST_Event *GHOST_SystemWin32::processWindowEvent(GHOST_TEventType type, GHOST_
|
||||
|
||||
if (type == GHOST_kEventWindowActivate) {
|
||||
system->getWindowManager()->setActiveWindow(window);
|
||||
((GHOST_WindowWin32*)window)->bringTabletContextToFront();
|
||||
}
|
||||
|
||||
return new GHOST_Event(system->getMilliSeconds(), type, window);
|
||||
|
@ -1192,6 +1192,16 @@ void GHOST_WindowWin32::processWin32TabletEvent(WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
}
|
||||
|
||||
void GHOST_WindowWin32::bringTabletContextToFront()
|
||||
{
|
||||
if (m_wintab) {
|
||||
GHOST_WIN32_WTOverlap fpWTOverlap = (GHOST_WIN32_WTOverlap) ::GetProcAddress(m_wintab, "WTOverlap");
|
||||
if (fpWTOverlap) {
|
||||
fpWTOverlap(m_tablet, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Reverse the bits in a GHOST_TUns8 */
|
||||
static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
|
||||
{
|
||||
|
@ -58,6 +58,7 @@ typedef UINT (API * GHOST_WIN32_WTInfo)(UINT, UINT, LPVOID);
|
||||
typedef HCTX (API * GHOST_WIN32_WTOpen)(HWND, LPLOGCONTEXTA, BOOL);
|
||||
typedef BOOL (API * GHOST_WIN32_WTClose)(HCTX);
|
||||
typedef BOOL (API * GHOST_WIN32_WTPacket)(HCTX, UINT, LPVOID);
|
||||
typedef BOOL (API * GHOST_WIN32_WTOverlap)(HCTX, BOOL);
|
||||
|
||||
/**
|
||||
* GHOST window on M$ Windows OSs.
|
||||
@ -273,6 +274,7 @@ public:
|
||||
|
||||
void processWin32TabletInitEvent();
|
||||
void processWin32TabletEvent(WPARAM wParam, LPARAM lParam);
|
||||
void bringTabletContextToFront();
|
||||
|
||||
protected:
|
||||
GHOST_TSuccess initMultisample(PIXELFORMATDESCRIPTOR pfd);
|
||||
|
Loading…
Reference in New Issue
Block a user