Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 246486 Details for
Bug 296084
x11-drivers/xf86-input-synaptics : allow rotation using xrandr
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch that adds support for rotating mouse, modified for 1.3.0
synaptics-1.3.0-xrandr.patch (text/plain), 3.92 KB, created by
Scott Logan
on 2010-09-08 20:07:25 UTC
(
hide
)
Description:
Patch that adds support for rotating mouse, modified for 1.3.0
Filename:
MIME Type:
Creator:
Scott Logan
Created:
2010-09-08 20:07:25 UTC
Size:
3.92 KB
patch
obsolete
>--- old/include/synaptics.h 2010-07-11 23:24:29.000000000 -0500 >+++ new/include/synaptics.h 2010-09-08 12:32:43.765666630 -0500 >@@ -52,6 +52,7 @@ > typedef struct _SynapticsSHM > { > int version; /* Driver version */ >+ int xrandr; > > /* Current device state */ > int x, y; /* actual x, y coordinates */ >--- old/src/synapticsstr.h 2010-08-19 20:11:04.000000000 -0500 >+++ new/src/synapticsstr.h 2010-09-08 14:08:38.503227365 -0500 >@@ -100,6 +100,7 @@ > typedef struct _SynapticsParameters > { > /* Parameter data */ >+ int xrandr; > int left_edge, right_edge, top_edge, bottom_edge; /* edge coordinates absolute */ > int finger_low, finger_high, finger_press; /* finger detection values in Z-values */ > int tap_time; >--- old/src/eventcomm.c 2010-08-16 20:33:41.000000000 -0500 >+++ new/src/eventcomm.c 2010-09-08 12:36:51.121623303 -0500 >@@ -393,10 +393,24 @@ > case EV_ABS: > switch (ev.code) { > case ABS_X: >- hw->x = ev.value; >+ if (para->xrandr==0) >+ hw->x = ev.value; >+ if (para->xrandr==1) >+ hw->y = ev.value; >+ if (para->xrandr==2) >+ hw->x = -ev.value; >+ if (para->xrandr==3) >+ hw->y = -ev.value; > break; > case ABS_Y: >- hw->y = ev.value; >+ if (para->xrandr==0) >+ hw->y = ev.value; >+ if (para->xrandr==1) >+ hw->x = -ev.value; >+ if (para->xrandr==2) >+ hw->y = -ev.value; >+ if (para->xrandr==3) >+ hw->x = ev.value; > break; > case ABS_PRESSURE: > hw->z = ev.value; >--- old/src/synaptics.c 2010-08-19 20:11:24.000000000 -0500 >+++ new/src/synaptics.c 2010-09-08 12:39:23.350872595 -0500 >@@ -428,8 +428,10 @@ > int width, height, diag, range; > > /* read the parameters */ >- if (priv->synshm) >+ if (priv->synshm) { > priv->synshm->version = (PACKAGE_VERSION_MAJOR*10000+PACKAGE_VERSION_MINOR*100+PACKAGE_VERSION_PATCHLEVEL); >+ priv->synshm->xrandr = xf86SetIntOption(opts, "Xrandr", 0); >+ } > > /* The synaptics specs specify typical edge widths of 4% on x, and 5.4% on > * y (page 7) [Synaptics TouchPad Interfacing Guide, 510-000080 - A >--- old/tools/synclient.c 2010-08-19 20:11:04.000000000 -0500 >+++ new/tools/synclient.c 2010-09-08 12:47:35.850785873 -0500 >@@ -74,6 +74,7 @@ > }; > > static struct Parameter params[] = { >+ {"Xrandr", PT_INT, 0, 3, SYNAPTICS_PROP_XRANDR, 32, 0}, > {"LeftEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 0}, > {"RightEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 1}, > {"TopEdge", PT_INT, 0, 10000, SYNAPTICS_PROP_EDGES, 32, 2}, >--- old/src/properties.c 2010-08-19 20:11:04.000000000 -0500 >+++ new/src/properties.c 2010-09-08 12:51:08.085623327 -0500 >@@ -44,6 +44,7 @@ > #endif > static Atom float_type; > >+Atom prop_xrandr = 0; > Atom prop_edges = 0; > Atom prop_finger = 0; > Atom prop_tap_time = 0; >@@ -151,6 +152,10 @@ > } > } > >+ values[0] = para->xrandr; >+ >+ prop_xrandr = InitAtom(local->dev, SYNAPTICS_PROP_XRANDR, 32, 1, values); >+ > values[0] = para->left_edge; > values[1] = para->right_edge; > values[2] = para->top_edge; >@@ -297,7 +302,15 @@ > para = &tmp; > } > >- if (property == prop_edges) >+ >+ if (property == prop_xrandr) >+ { >+ if (prop->size != 1 || prop->format != 32 || prop->type != XA_INTEGER) >+ return BadMatch; >+ >+ para->xrandr = *(INT32*)prop->data; >+ >+ } else if (property == prop_edges) > { > INT32 *edges; > if (prop->size != 4 || prop->format != 32 || prop->type != XA_INTEGER) >--- old/include/synaptics-properties.h 2010-08-19 20:11:04.000000000 -0500 >+++ new/include/synaptics-properties.h 2010-09-08 14:14:13.078227395 -0500 >@@ -32,6 +32,9 @@ > * For a description of what each property does, see synaptics.h. > */ > >+/* 32 bit */ >+#define SYNAPTICS_PROP_XRANDR "Synaptics Xrandr" >+ > /* 32 bit, 4 values, left, right, top, bottom */ > #define SYNAPTICS_PROP_EDGES "Synaptics Edges" >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 296084
:
212350
| 246486 |
246865
|
246866