Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 212350 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
synaptics_xrandr.diff (text/plain), 2.58 KB, created by
niogic
on 2009-12-07 15:32:12 UTC
(
hide
)
Description:
Patch that adds support for rotating mouse
Filename:
MIME Type:
Creator:
niogic
Created:
2009-12-07 15:32:12 UTC
Size:
2.58 KB
patch
obsolete
>diff -ur old/include/synaptics.h new/include/synaptics.h >--- old/include/synaptics.h 2008-11-26 11:40:08.000000000 +0200 >+++ new/include/synaptics.h 2008-11-26 11:42:21.000000000 +0200 >@@ -61,6 +61,7 @@ > typedef struct _SynapticsSHM > { > int version; /* Driver version */ >+ int xrandr; > > /* Current device state */ > int x, y; /* actual x, y coordinates */ >diff -ur old/src/eventcomm.c new/src/eventcomm.c >--- old/src/eventcomm.c 2008-11-26 10:49:01.000000000 +0200 >+++ new/src/eventcomm.c 2008-11-26 11:58:49.000000000 +0200 >@@ -192,6 +192,8 @@ > struct input_event ev; > Bool v; > struct SynapticsHwState *hw = &(comm->hwState); >+ SynapticsPrivate *priv = (SynapticsPrivate *) (local->private); >+ SynapticsSHM *para = priv->synpara; > > while (SynapticsReadEvent(comm, &ev)) { > switch (ev.type) { >@@ -272,10 +274,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->y = ev.value; >+ if (para->xrandr==3) >+ hw->x = -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->x = -ev.value; >+ if (para->xrandr==3) >+ hw->y = -ev.value; > break; > case ABS_PRESSURE: > hw->z = ev.value; >diff -ur old/src/synaptics.c new/src/synaptics.c >--- old/src/synaptics.c 2008-11-26 10:49:01.000000000 +0200 >+++ new/src/synaptics.c 2008-11-26 11:41:12.000000000 +0200 >@@ -384,6 +384,7 @@ > /* read the parameters */ > pars = &priv->synpara_default; > pars->version = (PACKAGE_VERSION_MAJOR*10000+PACKAGE_VERSION_MINOR*100+PACKAGE_VERSION_PATCHLEVEL); >+ pars->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 >diff -ur old/tools/synclient.c new/tools/synclient.c >--- old/tools/synclient.c 2008-11-26 11:01:47.000000000 +0200 >+++ new/tools/synclient.c 2008-11-26 11:03:37.000000000 +0200 >@@ -60,6 +60,7 @@ > { name, offsetof(SynapticsSHM, memb), (type), (min_val), (max_val) } > > static struct Parameter params[] = { >+ DEFINE_PAR("Xrandr", xrandr, PT_INT, 0, 3), > DEFINE_PAR("LeftEdge", left_edge, PT_INT, 0, 10000), > DEFINE_PAR("RightEdge", right_edge, PT_INT, 0, 10000), > DEFINE_PAR("TopEdge", top_edge, PT_INT, 0, 10000), >
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