[maemo-commits] [maemo-commits] r18759 - in projects/haf/tags/gtk+/2.14.3-1maemo5: . debian gdk/x11

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Jun 18 17:05:37 EEST 2009
Author: csaavedra
Date: 2009-06-18 17:05:18 +0300 (Thu, 18 Jun 2009)
New Revision: 18759

Modified:
   projects/haf/tags/gtk+/2.14.3-1maemo5/ChangeLog
   projects/haf/tags/gtk+/2.14.3-1maemo5/configure.in
   projects/haf/tags/gtk+/2.14.3-1maemo5/debian/changelog
   projects/haf/tags/gtk+/2.14.3-1maemo5/gdk/x11/gdkinput-x11.c
   projects/haf/tags/gtk+/2.14.3-1maemo5/gdk/x11/gdkinput-xfree.c
Log:
Revert garnacho patches until the X breakage is fixed.

Modified: projects/haf/tags/gtk+/2.14.3-1maemo5/ChangeLog
===================================================================
--- projects/haf/tags/gtk+/2.14.3-1maemo5/ChangeLog	2009-06-18 13:18:55 UTC (rev 18758)
+++ projects/haf/tags/gtk+/2.14.3-1maemo5/ChangeLog	2009-06-18 14:05:18 UTC (rev 18759)
@@ -4,13 +4,6 @@
 
 	* debian/changelog: Updates.
 
-2009-06-17  Christian Dywan  <christian at lanedo.com>
-
-	* gdk/x11/gdkinput-x11.c (gdk_input_device_new): Move back to core
-	events and do not enable the touchscreen slave device by default.
-	Patch by Carlos Garnacho.
-	Fixes: NB#122714 Unable to select a particular word or character
-
 2009-06-16  Kristian Rietveld  <kris at lanedo.com>
 
 	Fixes: NB#121544 - Memory leaks found when trying to delete contact(s)
@@ -52,18 +45,6 @@
 
 	* debian/changelog: Updates.
 
-2009-06-05  Carlos Garnacho  <carlos at lanedo.com>
-
-	Fixes: NB#95806 - Pressure data not received from motion events.
-
-	* configure.in: Detect XInput >= 1.1.99.
-	* gdk/x11/gdkinput-xfree.c (gdk_input_init):
-	* gdk/x11/gdkinput-x11.c (_gdk_input_common_init)
-	(gdk_input_translate_coordinates) (gdk_input_device_new)
-	(_gdk_input_common_other_event): Use XInput 2 features if available,
-	initialize correctly all devices in this case, and also translate
-	axis/coordinates from the extended events.
-
 2009-06-05  Kristian Rietveld  <kris at lanedo.com>
 
 	Fixes: NB#114454 - Not possible to set hildon icon size to toolbar

Modified: projects/haf/tags/gtk+/2.14.3-1maemo5/configure.in
===================================================================
--- projects/haf/tags/gtk+/2.14.3-1maemo5/configure.in	2009-06-18 13:18:55 UTC (rev 18758)
+++ projects/haf/tags/gtk+/2.14.3-1maemo5/configure.in	2009-06-18 14:05:18 UTC (rev 18759)
@@ -1531,10 +1531,6 @@
     
     if $PKG_CONFIG --exists xi ; then
       X_PACKAGES="$X_PACKAGES xi"
-
-      if $PKG_CONFIG --exists "xi >= 1.1.99" ; then
-        AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available])
-      fi
     else
       GTK_ADD_LIB(x_extra_libs, Xi)
     fi

Modified: projects/haf/tags/gtk+/2.14.3-1maemo5/debian/changelog
===================================================================
--- projects/haf/tags/gtk+/2.14.3-1maemo5/debian/changelog	2009-06-18 13:18:55 UTC (rev 18758)
+++ projects/haf/tags/gtk+/2.14.3-1maemo5/debian/changelog	2009-06-18 14:05:18 UTC (rev 18759)
@@ -1,6 +1,5 @@
 gtk+2.0 (2:2.14.3-1maemo5) unstable; urgency=low
 
-  * Fixes: NB#122714 - Unable to select a particular word or character
   * Fixes: NB#98617  - Make dialogs use proper border margins
   * Fixes: NB#121544 - Memory leaks found when trying to delete contact(s)
   * Fixes: NB#116326 - gtk_window_new() is slow due to
@@ -23,7 +22,6 @@
   * Update debian dependencies after the upgrade to 2.14.3.
   * Increase compat level to 5.
   * libgail18-dbg replaces, conflicts, and provides libgail-dbg.
-  * Fixes: NB#95806 - Pressure data not received from motion events.
   * Fixes: NB#114454 - Not possible to set hildon icon size to toolbar
     resulting in different sizes of thumbnails.
   * Addresses: NB#106177 - No API to enable alphanumeric input mode

Modified: projects/haf/tags/gtk+/2.14.3-1maemo5/gdk/x11/gdkinput-x11.c
===================================================================
--- projects/haf/tags/gtk+/2.14.3-1maemo5/gdk/x11/gdkinput-x11.c	2009-06-18 13:18:55 UTC (rev 18758)
+++ projects/haf/tags/gtk+/2.14.3-1maemo5/gdk/x11/gdkinput-x11.c	2009-06-18 14:05:18 UTC (rev 18759)
@@ -122,11 +122,7 @@
 
   tmp_name = g_ascii_strdown (gdkdev->info.name, -1);
   
-#ifdef MAEMO_CHANGES
-  if (g_str_has_suffix (tmp_name, "pointer"))
-#else
   if (!strcmp (tmp_name, "pointer"))
-#endif
     gdkdev->info.source = GDK_SOURCE_MOUSE;
   else if (!strcmp (tmp_name, "wacom") ||
 	   !strcmp (tmp_name, "pen"))
@@ -226,10 +222,8 @@
       (!include_core && device->use == IsXPointer))
     goto error;
 
-#if !defined (MAEMO_CHANGES) || !defined (XINPUT_2)
   if (device->use != IsXPointer)
     {
-#endif
       gdk_error_trap_push ();
       gdkdev->xdevice = XOpenDevice (GDK_DISPLAY_XDISPLAY (display),
 				     gdkdev->deviceid);
@@ -237,9 +231,7 @@
       /* return NULL if device is not ready */
       if (gdk_error_trap_pop ())
 	goto error;
-#if !defined (MAEMO_CHANGES) || !defined (XINPUT_2)
     }
-#endif
 
   gdkdev->buttonpress_type = 0;
   gdkdev->buttonrelease_type = 0;
@@ -250,6 +242,15 @@
   gdkdev->proximityout_type = 0;
   gdkdev->changenotify_type = 0;
 
+#ifdef MAEMO_CHANGES
+  /* always enable extension events to get touchscreen pressure */
+  if (gdkdev->info.source == GDK_SOURCE_PEN)
+    {
+      if (!gdk_device_set_mode (&gdkdev->info, GDK_MODE_SCREEN))
+        g_warning ("Failed to enable pressure on `%s'", gdkdev->info.name);
+    }
+#endif /* MAEMO_CHANGES */
+
   return gdkdev;
 
  error:
@@ -399,10 +400,6 @@
   if (XQueryExtension (display_x11->xdisplay, "XInputExtension",
 		       &ignore, &event_base, &ignore))
     {
-#if defined (MAEMO_CHANGES) && defined (XINPUT_2)
-      XQueryInputVersion(display_x11->xdisplay, XI_2_Major, XI_2_Minor);
-#endif
-
       gdk_x11_register_standard_event_type (display,
 					    event_base, 15 /* Number of events */);
 
@@ -597,24 +594,11 @@
       event->button.time = xdbe->time;
 
       event->button.axes = g_new (gdouble, gdkdev->info.num_axes);
-
-#if !defined (MAEMO_CHANGES) || !defined (XINPUT_2)
-      gdk_input_translate_coordinates (gdkdev, input_window, xdbe->axis_data,
-                                       event->button.axes,
-                                       &event->button.x, &event->button.y);
+      gdk_input_translate_coordinates (gdkdev,input_window, xdbe->axis_data,
+				       event->button.axes, 
+				       &event->button.x,&event->button.y);
       event->button.x_root = event->button.x + input_window->root_x;
       event->button.y_root = event->button.y + input_window->root_y;
-#else
-      gdk_input_translate_coordinates (gdkdev, input_window, xdbe->axis_data,
-                                       event->button.axes,
-                                       NULL, NULL);
-
-      event->button.x = (gdouble) xdbe->x;
-      event->button.y = (gdouble) xdbe->y;
-      event->button.x_root = (gdouble) xdbe->x_root;
-      event->button.y_root = (gdouble) xdbe->y_root;
-#endif
-
       event->button.state = gdk_input_translate_state(xdbe->state,xdbe->device_state);
       event->button.button = xdbe->button;
 
@@ -712,24 +696,12 @@
       event->motion.device = &gdkdev->info;
       
       event->motion.axes = g_new (gdouble, gdkdev->info.num_axes);
-
-#if !defined (MAEMO_CHANGES) || !defined (XINPUT_2)
-      gdk_input_translate_coordinates (gdkdev, input_window, xdme->axis_data,
-                                       event->motion.axes,
-                                       &event->motion.x, &event->motion.y);
+      gdk_input_translate_coordinates(gdkdev,input_window,xdme->axis_data,
+				      event->motion.axes,
+				      &event->motion.x,&event->motion.y);
       event->motion.x_root = event->motion.x + input_window->root_x;
       event->motion.y_root = event->motion.y + input_window->root_y;
-#else
-      gdk_input_translate_coordinates (gdkdev, input_window, xdme->axis_data,
-                                       event->motion.axes,
-                                       NULL, NULL);
 
-      event->motion.x = (gdouble) xdme->x;
-      event->motion.y = (gdouble) xdme->y;
-      event->motion.x_root = (gdouble) xdme->x_root;
-      event->motion.y_root = (gdouble) xdme->y_root;
-#endif
-
       event->motion.type = GDK_MOTION_NOTIFY;
       event->motion.window = input_window->window;
       event->motion.time = xdme->time;

Modified: projects/haf/tags/gtk+/2.14.3-1maemo5/gdk/x11/gdkinput-xfree.c
===================================================================
--- projects/haf/tags/gtk+/2.14.3-1maemo5/gdk/x11/gdkinput-xfree.c	2009-06-18 13:18:55 UTC (rev 18758)
+++ projects/haf/tags/gtk+/2.14.3-1maemo5/gdk/x11/gdkinput-xfree.c	2009-06-18 14:05:18 UTC (rev 18759)
@@ -38,11 +38,7 @@
 {
   _gdk_init_input_core (display);
   GDK_DISPLAY_X11 (display)->input_ignore_core = FALSE;
-#ifdef MAEMO_CHANGES
-  _gdk_input_common_init (display, TRUE);
-#else
   _gdk_input_common_init (display, FALSE);
-#endif
 }
 
 gboolean

More information about the maemo-commits mailing list