[maemo-commits] [maemo-commits] r14775 - projects/haf/trunk/gtk+/gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Nov 13 15:20:14 EET 2007
- Previous message: [maemo-commits] r14773 - in projects/haf/trunk/hildon-theme-layout-4: . debian
- Next message: [maemo-commits] r14776 - projects/haf/trunk/gtk+
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: xan Date: 2007-11-13 15:20:08 +0200 (Tue, 13 Nov 2007) New Revision: 14775 Modified: projects/haf/trunk/gtk+/gtk/gtkrange.c Log: Ignore N810 motion noise in GtkRange. Modified: projects/haf/trunk/gtk+/gtk/gtkrange.c =================================================================== --- projects/haf/trunk/gtk+/gtk/gtkrange.c 2007-11-13 12:59:36 UTC (rev 14774) +++ projects/haf/trunk/gtk+/gtk/gtkrange.c 2007-11-13 13:20:08 UTC (rev 14775) @@ -2170,6 +2170,21 @@ range = GTK_RANGE (widget); gdk_window_get_pointer (range->event_window, &x, &y, NULL); + +#if defined(MAEMO_CHANGES) + +#define N810_MOTION_NOISE 3 + + /* N810 HW can create phantom up to 3px motion notify events, + ignore them */ + if (range->orientation == GTK_ORIENTATION_VERTICAL && + (ABS (range->layout->mouse_y - y) <= N810_MOTION_NOISE)) + return FALSE; + else if (range->orientation == GTK_ORIENTATION_HORIZONTAL && + (ABS (range->layout->mouse_x - x) <= N810_MOTION_NOISE)) + return FALSE; + +#endif range->layout->mouse_x = x; range->layout->mouse_y = y;
- Previous message: [maemo-commits] r14773 - in projects/haf/trunk/hildon-theme-layout-4: . debian
- Next message: [maemo-commits] r14776 - projects/haf/trunk/gtk+
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]