[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53618] trunk/blender/intern/ghost/intern: fix for bugs 30300, 31107: pen pressure with multiple open windows on MS Windows

Mike Erwin significant.bit at gmail.com
Mon Jan 7 02:23:10 CET 2013


Revision: 53618
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53618
Author:   merwin
Date:     2013-01-07 01:23:09 +0000 (Mon, 07 Jan 2013)
Log Message:
-----------
fix for bugs 30300, 31107: pen pressure with multiple open windows on MS Windows

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
    trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
    trunk/blender/intern/ghost/intern/GHOST_WindowWin32.h

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp	2013-01-06 23:11:12 UTC (rev 53617)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp	2013-01-07 01:23:09 UTC (rev 53618)
@@ -761,6 +761,7 @@
 
 	if (type == GHOST_kEventWindowActivate) {
 		system->getWindowManager()->setActiveWindow(window);
+		((GHOST_WindowWin32*)window)->bringTabletContextToFront();
 	}
 
 	return new GHOST_Event(system->getMilliSeconds(), type, window);

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp	2013-01-06 23:11:12 UTC (rev 53617)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp	2013-01-07 01:23:09 UTC (rev 53618)
@@ -1192,6 +1192,16 @@
 	}
 }
 
+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)
 {

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.h
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.h	2013-01-06 23:11:12 UTC (rev 53617)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.h	2013-01-07 01:23:09 UTC (rev 53618)
@@ -58,6 +58,7 @@
 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 @@
 
 	void processWin32TabletInitEvent();
 	void processWin32TabletEvent(WPARAM wParam, LPARAM lParam);
+	void bringTabletContextToFront();
 
 protected:
 	GHOST_TSuccess initMultisample(PIXELFORMATDESCRIPTOR pfd);




More information about the Bf-blender-cvs mailing list