Index: src/win32/run.cxx
===================================================================
--- src/win32/run.cxx	(revision 6063)
+++ src/win32/run.cxx	(working copy)
@@ -681,7 +681,7 @@
 ////////////////////////////////////////////////////////////////
 // Tablet initialisation and event handling
 #include "wintab.h"
-#define PACKETDATA (PK_NORMAL_PRESSURE|PK_ORIENTATION|PK_CURSOR)
+#define PACKETDATA (PK_X|PK_Y|PK_NORMAL_PRESSURE|PK_ORIENTATION|PK_CURSOR)
 #define PACKETMODE 0
 #include "pktdef.h"
 
@@ -769,11 +769,11 @@
   lcMine.lcInExtX = TabletX.axMax;
   lcMine.lcInExtY = TabletY.axMax;
 
-  /* output the data in screen coords */
+  /* output the data in tablet coords */
   lcMine.lcOutOrgX = lcMine.lcOutOrgY = 0;
-  lcMine.lcOutExtX = GetSystemMetrics(SM_CXSCREEN);
+  lcMine.lcOutExtX = TabletX.axMax;
   /* move origin to upper left */
-  lcMine.lcOutExtY = -GetSystemMetrics(SM_CYSCREEN);
+  lcMine.lcOutExtY = -TabletY.axMax;
   /* open the region */
   wintab_ctx = wtOpen(hWnd, &lcMine, TRUE);
   if (!wintab_ctx) {
@@ -782,6 +782,10 @@
 #endif
       return;
   }
+  /* store constant parameters */
+  tablet_x_max_ = TabletX.axMax;
+  tablet_y_max_ = TabletY.axMax;
+
   if (wintab_ctx) wintab_hwnd = hWnd;
 }
 
@@ -1311,6 +1315,7 @@
   if (!stylus_data_valid) {
     e_pressure = e_state&BUTTON1 ? 1.0f : 0.0f;
     e_x_tilt = e_y_tilt = 0.0f;
+    e_x_tablet = e_y_tablet = 0;
     e_device = DEVICE_MOUSE;
   }
 
@@ -1790,6 +1795,8 @@
     //if (wtPacket((HCTX)lParam, wParam, &pkt)) {
     if (wtPacket(wintab_ctx, wParam, &pkt)) {
       e_pressure = (((float)pkt.pkNormalPressure)+pressure_add)*pressure_mul;
+      e_x_tablet = pkt.pkX;
+      e_y_tablet = pkt.pkY;
       float a = pkt.pkOrientation.orAzimuth / 1800.0f * 3.141592654f;
       float b = (900-pkt.pkOrientation.orAltitude) / 900.0f;
       e_x_tilt = sinf(a) * b;
@@ -1798,6 +1805,7 @@
       //++ however, this code must be updated for other devices to function properly
       e_device = pkt.pkCursor;
     } }
+    handle(TABLET_SPECIAL, xmousewin);
     return 1;
 
   case WT_PROXIMITY: // stylus proximity packet
Index: src/run.cxx
===================================================================
--- src/run.cxx	(revision 6063)
+++ src/run.cxx	(working copy)
@@ -78,6 +78,10 @@
 	  fltk::e_is_click,
 	  fltk::e_length,
 	  fltk::e_key_repeated;
+int       fltk::e_x_tablet,
+	  fltk::e_y_tablet,
+	  fltk::tablet_x_max_,
+	  fltk::tablet_y_max_;
 float     fltk::e_pressure,
           fltk::e_x_tilt,
           fltk::e_y_tilt;
Index: src/x11/run.cxx
===================================================================
--- src/x11/run.cxx	(revision 6063)
+++ src/x11/run.cxx	(working copy)
@@ -923,6 +923,8 @@
 static float x_tilt_add, x_tilt_mul;
 static float y_tilt_add, y_tilt_mul;
 
+const int tablet_x_ix = 0;
+const int tablet_y_ix = 1;
 const int tablet_pressure_ix = 2;
 const int tablet_x_tilt_ix = 3;
 const int tablet_y_tilt_ix = 4;
@@ -939,7 +941,13 @@
       XAxisInfoPtr a = (XAxisInfoPtr)((char *)v+sizeof(XValuatorInfo));
       int k; for (k=0; k<v->num_axes; k++, a++) {
 	switch (k) {
-	  case tablet_pressure_ix: // pressure
+          case tablet_x_ix: // native stylus x position
+            tablet_x_max_ = a->max_value;
+            break;
+          case tablet_y_ix: // native stylus y position
+            tablet_y_max_ = a->max_value;
+            break;
+          case tablet_pressure_ix: // pressure
 	    pressure_mul[n] = 1.0f/a->max_value;
 	    break;
 	  case tablet_x_tilt_ix: // x-tilt
@@ -1249,6 +1257,7 @@
   if (e_device==0) {
     e_pressure = e_state&BUTTON(1) ? 1.0f : 0.0f;
     e_x_tilt = e_y_tilt = 0.0f;
+    e_x_tablet = e_y_tablet = 0;
   }
 }
 
@@ -1923,20 +1932,36 @@
       e_device = 0;
       return true;
     }
-    // get pressure and tilt data
+    // get pressure, position and tilt data
     axis = me->first_axis;
     if (axis <= tablet_pressure_ix && axis+me->axes_count >= tablet_pressure_ix) {
       float v = (float)me->axis_data[tablet_pressure_ix-me->first_axis];
       e_pressure = v*pressure_mul[n];
     }
+    if (axis <= tablet_x_ix && axis+me->axes_count >= tablet_x_ix)
+    {
+      e_x_tablet = me->axis_data[tablet_x_ix-me->first_axis];
+    }
+    if (axis <= tablet_y_ix && axis+me->axes_count >= tablet_y_ix)
+    {
+      e_y_tablet = me->axis_data[tablet_y_ix-me->first_axis];
+    }
+
     if (axis <= tablet_x_tilt_ix && axis+me->axes_count >= tablet_x_tilt_ix) {
-      float v = (float)me->axis_data[tablet_x_tilt_ix-me->first_axis];
+//    during linuxwacom 0.7.2 - 0.7.6 tilt valuator was changed (only low bytes contains tilt value)
+      short val = (short)(me->axis_data[tablet_x_tilt_ix-me->first_axis]&0xffff);
+      float v = (float)val;
+//      float v = (float)me->axis_data[tablet_x_tilt_ix-me->first_axis];
       e_x_tilt = (v+x_tilt_add)*x_tilt_mul;
     }
     if (axis <= tablet_y_tilt_ix && axis+me->axes_count >= tablet_y_tilt_ix) {
-      float v = (float)me->axis_data[tablet_y_tilt_ix-me->first_axis];
+//    during linuxwacom 0.7.2 - 0.7.6 tilt valuator was changed (only low bytes contains tilt value)
+      short val = (short)(me->axis_data[tablet_y_tilt_ix-me->first_axis]&0xffff);
+      float v = (float)(val);
+//      float v = (float)me->axis_data[tablet_y_tilt_ix-me->first_axis];
       e_y_tilt = (v+y_tilt_add)*y_tilt_mul;
     }
+    handle(TABLET_SPECIAL, xmousewin);
     return true;
     // should we send some kind of PEN_DOWN/ERASER_DOWN events?
   }
Index: fltk/events.h
===================================================================
--- fltk/events.h	(revision 6063)
+++ fltk/events.h	(working copy)
@@ -55,7 +55,8 @@
   DND_DRAG	= 21,
   DND_LEAVE	= 22,
   DND_RELEASE	= 23,
-  TOOLTIP	= 24
+  TOOLTIP	= 24,
+  TABLET_SPECIAL = 25
 };
 
 /*! Values returned by event_key(), passed to event_key_state() and
@@ -227,6 +228,10 @@
 extern FL_API unsigned e_length;
 extern FL_API const char* e_text;
 extern FL_API unsigned e_key_repeated;
+extern FL_API int e_x_tablet;
+extern FL_API int e_y_tablet;
+extern FL_API int tablet_x_max_;
+extern FL_API int tablet_y_max_;
 extern FL_API float e_pressure;
 extern FL_API float e_x_tilt;
 extern FL_API float e_y_tilt;
@@ -262,6 +267,8 @@
 inline unsigned event_length() 		{return e_length;}
 inline unsigned event_key_repeated()	{return e_key_repeated;}
 inline float event_pressure()	 	{return e_pressure;}
+inline int event_x_tablet()     	{return e_x_tablet;}
+inline int event_y_tablet()     	{return e_y_tablet;}
 inline float event_x_tilt()     	{return e_x_tilt;}
 inline float event_y_tilt()     	{return e_y_tilt;}
 inline int  event_device()      	{return e_device;}
@@ -286,6 +293,8 @@
 FL_API bool get_key_state(unsigned);
 FL_API void get_mouse(int &,int &);
 FL_API bool warp_mouse(int, int);
+inline int tablet_x_max() { return tablet_x_max_; }
+inline int tablet_y_max() { return tablet_y_max_; }
 
 // event destinations:
 FL_API bool handle(int, Window*);
