xserver: Branch 'master' - 7 commits
Peter Hutterer
whot at kemper.freedesktop.org
Tue Sep 8 19:21:53 PDT 2009
dix/devices.c | 44 ++++++---------
hw/kdrive/sdl/sdl.c | 119 ------------------------------------------
hw/kdrive/src/kdrive.h | 1
hw/kdrive/src/kinput.c | 9 ++-
hw/xfree86/modes/xf86Rotate.c | 31 ----------
hw/xnest/Pointer.c | 4 +
6 files changed, 29 insertions(+), 179 deletions(-)
New commits:
commit 72f6be540840b46aa4b158b98fac11a6f90dc9d1
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Fri Sep 4 11:13:55 2009 +1000
xfree86: remove now unused xf86CrtcShadowClear
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index d9face1..9e65c99 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -145,37 +145,6 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
}
static void
-xf86CrtcShadowClear (xf86CrtcPtr crtc)
-{
- PixmapPtr dst_pixmap = crtc->rotatedPixmap;
- ScrnInfoPtr scrn = crtc->scrn;
- ScreenPtr screen = scrn->pScreen;
- PicturePtr dst;
- PictFormatPtr format = compWindowFormat (WindowTable[screen->myNum]);
- static xRenderColor black = { 0, 0, 0, 0 };
- xRectangle rect;
- int error;
-
- if (!dst_pixmap)
- return;
- dst = CreatePicture (None,
- &dst_pixmap->drawable,
- format,
- 0L,
- NULL,
- serverClient,
- &error);
- if (!dst)
- return;
- rect.x = 0;
- rect.y = 0;
- rect.width = dst_pixmap->drawable.width;
- rect.height = dst_pixmap->drawable.height;
- CompositeRects (PictOpSrc, dst, &black, 1, &rect);
- FreePicture (dst, None);
-}
-
-static void
xf86CrtcDamageShadow (xf86CrtcPtr crtc)
{
ScrnInfoPtr pScrn = crtc->scrn;
commit 1f24638985ce053b696ca3359cc50b5bc26ccb03
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed Sep 9 09:28:46 2009 +1000
kdrive: output meaningful error message for HAL devices.
kdrive ignores all devices from hal as they don't have the 'type' option
set. Instead of "Unrecognised device identifier!" print out "Ignoring
device from HAL." to indicate that the errors surrounding the device don't
really matter.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 832b09c..fb8ebd0 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -2272,6 +2272,14 @@ NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev)
return BadValue;
}
}
+#ifdef CONFIG_HAL
+ else if (strcmp(option->key, "_source") == 0 &&
+ strcmp(option->value, "server/hal") == 0)
+ {
+ ErrorF("Ignoring device from HAL.\n");
+ return BadValue;
+ }
+#endif
}
if (!ki && !pi) {
commit ae812bb79668e59cda1f851fb1fabe9db9ea705f
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Sep 8 13:53:26 2009 +1000
Xnest: set the default pointer accel to the host's values (#10013)
The defaultPointerControl holds compile-time defaults for pointer
acceleration. If an Xnest instance is started, it resets the hosts pointer
accel values to these built-in defaults instead of using the host values.
This patch queries the host for the values before initializing the device,
thus leaving the host values untouched.
X.Org Bug 10013 <http://bugs.freedesktop.org/show_bug.cgi?id=10013>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/xnest/Pointer.c b/hw/xnest/Pointer.c
index 4de4673..fdc6181 100644
--- a/hw/xnest/Pointer.c
+++ b/hw/xnest/Pointer.c
@@ -72,6 +72,10 @@ xnestPointerProc(DeviceIntPtr pDev, int onoff)
axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
+ XGetPointerControl(xnestDisplay,
+ &defaultPointerControl.num,
+ &defaultPointerControl.den,
+ &defaultPointerControl.threshold);
InitPointerDeviceStruct(&pDev->public, map, nmap, btn_labels,
xnestChangePointerControl,
GetMotionHistorySize(), 2, axes_labels);
commit 97e3f4316b1c917f93d324f05d3a4551c1d051a3
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Sep 8 09:55:22 2009 +1000
dix: auto-float SD's with SendCoreEvents "false"
AlwaysCore and SendCoreEvents specify whether a device is to send core
events. A device that has either disabled is not supposed to send core
events.
With MPX/XI2, a device that is attached automatically sends core events when
the event is routed through the master device. Floating a slave device
disables core events by breaking the route.
This patch automatically floats devices that have coreEvents disabled in the
xorg.conf/HAL. This replicates the behaviour of a SendCoreEvents "false"
device in server 1.6 and earlier.
The devices may still be reattached to a master at runtime.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/dix/devices.c b/dix/devices.c
index 97bb7df..dbd1b4e 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -312,8 +312,11 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
PairDevices(NULL, other, dev);
} else
{
- other = (IsPointerDevice(dev)) ? inputInfo.pointer :
- inputInfo.keyboard;
+ if (dev->coreEvents)
+ other = (IsPointerDevice(dev)) ? inputInfo.pointer :
+ inputInfo.keyboard;
+ else
+ other = NULL; /* auto-float non-core devices */
AttachDevice(NULL, dev, other);
}
}
@@ -2335,7 +2338,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
return BadDevice;
/* set from floating to floating? */
- if (!dev->u.master && !master)
+ if (!dev->u.master && !master && dev->enabled)
return Success;
/* free the existing sprite. */
@@ -2357,7 +2360,13 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
*/
if (!master)
{
- WindowPtr currentRoot = dev->spriteInfo->sprite->spriteTrace[0];
+ WindowPtr currentRoot;
+
+ if (dev->spriteInfo->sprite)
+ currentRoot = dev->spriteInfo->sprite->spriteTrace[0];
+ else /* new device auto-set to floating */
+ currentRoot = WindowTable[0];
+
/* we need to init a fake sprite */
screen = currentRoot->drawable.pScreen;
screen->DeviceCursorInitialize(dev, screen);
commit 447bd4ce90113037a489ce55d9878523fe5294c7
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon Sep 7 16:02:50 2009 +1000
kdrive: fix sdl build by removing old keySymsRec references.
These are set in kinput now through InitKeyboardDeviceStruct.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/kdrive/sdl/sdl.c b/hw/kdrive/sdl/sdl.c
index 411b5d4..a83c84a 100644
--- a/hw/kdrive/sdl/sdl.c
+++ b/hw/kdrive/sdl/sdl.c
@@ -49,121 +49,6 @@ void sdlTimer(void);
KdKeyboardInfo *sdlKeyboard = NULL;
KdPointerInfo *sdlPointer = NULL;
-KeySym sdlKeymap[]={
- 0, /* 8 */
- 0,
- XK_Escape, NoSymbol, /* escape */
- XK_1, XK_exclam,
- XK_2, XK_at,
- XK_3, XK_numbersign,
- XK_4, XK_dollar,
- XK_5, XK_percent,
- XK_6, XK_asciicircum,
- XK_7, XK_ampersand,
- XK_8, XK_asterisk,
- XK_9, XK_parenleft,
- XK_0, XK_parenright,
- XK_minus, XK_underscore,
- XK_equal, XK_plus,
- XK_BackSpace, NoSymbol, /* backspace */
- XK_Tab, NoSymbol,
- XK_q, XK_Q,
- XK_w, XK_W,
- XK_e, XK_E,
- XK_r, XK_R,
- XK_t, XK_T,
- XK_y, XK_Y,
- XK_u, XK_U,
- XK_i, XK_I,
- XK_o, XK_O,
- XK_p, XK_P,
- XK_bracketleft, XK_braceleft, /* [, { */
- XK_bracketright, XK_braceright, /* ]. } */
- XK_Return, NoSymbol,
- XK_Control_L, NoSymbol,
- XK_a, XK_A,
- XK_s, XK_S,
- XK_d, XK_D,
- XK_f, XK_F,
- XK_g, XK_G,
- XK_h, XK_H,
- XK_j, XK_J,
- XK_k, XK_K,
- XK_l, XK_L,
- XK_semicolon, XK_colon,
- XK_apostrophe, XK_quotedbl,
- XK_grave, XK_asciitilde,
- XK_Shift_L, NoSymbol,
- XK_backslash, XK_bar,
- XK_z, XK_z,
- XK_x, XK_X,
- XK_c, XK_C,
- XK_v, XK_V,
- XK_b, XK_B,
- XK_n, XK_N,
- XK_m, XK_M,
- XK_comma, XK_less,
- XK_period, XK_greater,
- XK_slash, XK_question,
- XK_Shift_R, NoSymbol,
- XK_KP_Multiply, NoSymbol,
- XK_Meta_L, XK_Alt_L,
- XK_space, NoSymbol,
- XK_Caps_Lock, NoSymbol,
- XK_F1, NoSymbol,
- XK_F2, NoSymbol,
- XK_F3, NoSymbol,
- XK_F4, NoSymbol,
- XK_F5, NoSymbol,
- XK_F6, NoSymbol,
- XK_F7, NoSymbol,
- XK_F8, NoSymbol,
- XK_F9, NoSymbol,
- XK_F10, NoSymbol,
- XK_Num_Lock, NoSymbol,
- XK_Scroll_Lock, NoSymbol,
- XK_KP_Home, XK_KP_7,
- XK_KP_Up, XK_KP_8,
- XK_KP_Page_Up, XK_KP_9,
- XK_KP_Subtract, NoSymbol,
- XK_KP_Left, XK_KP_4,
- XK_KP_5, NoSymbol,
- XK_KP_Right, XK_KP_6,
- XK_KP_Add, NoSymbol,
- XK_KP_End, XK_KP_1,
- XK_KP_Down, XK_KP_2,
- XK_KP_Page_Down, XK_KP_3,
- XK_KP_Insert, XK_KP_0,
- XK_KP_Delete, XK_KP_Decimal,
- NoSymbol, NoSymbol, /* 92 */
- NoSymbol, NoSymbol, /* 93 */
- NoSymbol, NoSymbol, /* 94 */
- XK_F11, NoSymbol, /* 95 */
- XK_F12, NoSymbol, /* 96 */
- XK_Home, NoSymbol, /* 97 */
- XK_Up, NoSymbol, /* 98 */
- XK_Page_Up, NoSymbol, /* 99 */
- XK_Left, NoSymbol, /* 100 */
- NoSymbol, NoSymbol, /* 101 */
- XK_Right, NoSymbol, /* 102 */
- NoSymbol, NoSymbol, /* 103 */
- XK_Down, NoSymbol, /* 104 */
- XK_Page_Down, NoSymbol, /* 105 */
- XK_Insert, NoSymbol, /* 106 */
- NoSymbol, NoSymbol, /* 107 */
- NoSymbol, NoSymbol, /* 108 */
- XK_Meta_R, XK_Alt_R, /* 109 */
- XK_Pause, XK_Break, /* 110 */
- XK_Sys_Req, XK_Print, /* 111 */
- NoSymbol, NoSymbol, /* 112 */
- XK_Control_R, NoSymbol, /* 113 */
- NoSymbol, NoSymbol, /* 114 */
- XK_Super_L, NoSymbol, /* 115 */
- XK_Super_R, NoSymbol, /* 116 */
- XK_Menu, NoSymbol, /* 117 */
- NoSymbol, NoSymbol /* 118 */
-};
-
KdKeyboardDriver sdlKeyboardDriver = {
.name = "keyboard",
.Init = sdlKeyboardInit,
@@ -304,10 +189,6 @@ static Bool sdlKeyboardInit(KdKeyboardInfo *ki)
{
ki->minScanCode = 8;
ki->maxScanCode = 255;
- ki->keySyms.minKeyCode = 8;
- ki->keySyms.maxKeyCode = 255;
- ki->keySyms.mapWidth = 2;
- memcpy(ki->keySyms.map, sdlKeymap, sizeof(sdlKeymap));
sdlKeyboard = ki;
commit d8aadfa5af85ce6613289efe119e592aa687ab03
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon Sep 7 15:04:33 2009 +1000
dix: remove unused and half-broken code to restore original classes.
In theory, the MD should change back to its old, original classes when the
last SD is detached. Thanks to the XTEST devices, we'll always have an SD
attached until the MD is removed. So let's not worry about that and do
nothing instead of having some code that's essentially untested.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/dix/devices.c b/dix/devices.c
index 0be3d58..97bb7df 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2374,30 +2374,11 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
RecalculateMasterButtons(master);
}
- /* If we were connected to master device before, this MD may need to
- * change back to it's original classes.
+ /* XXX: in theory, the MD should change back to its old, original
+ * classes when the last SD is detached. Thanks to the XTEST devices,
+ * we'll always have an SD attached until the MD is removed.
+ * So let's not worry about that.
*/
- if (oldmaster)
- {
- DeviceIntPtr it;
- for (it = inputInfo.devices; it; it = it->next)
- if (!IsMaster(it) && it->u.master == oldmaster)
- break;
-
- if (!it) /* no dev is paired with old master */
- {
- EventListPtr event = NULL;
-
- /* XXX: reset master back to defaults */
- event = InitEventList(1);
- SetMinimumEventSize(event, 1, sizeof(DeviceChangedEvent));
- CreateClassesChangedEvent(event, oldmaster, oldmaster,
- DEVCHANGE_POINTER_EVENT | DEVCHANGE_KEYBOARD_EVENT);
- XISendDeviceChangedEvent(oldmaster, oldmaster,
- (DeviceChangedEvent*)event->event);
- FreeEventList(event, 1);
- }
- }
return Success;
}
commit e9a507acca01234de189f0f64da63bac32dc13fd
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon Sep 7 15:59:37 2009 +1000
kdrive: remove xkb member from KdKeyboardInfo
Wasn't being used by anyone.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 6fdb708..9620391 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -295,7 +295,6 @@ struct _KdKeyboardInfo {
char *name;
char *path;
int inputClass;
- XkbDescPtr xkb;
char *xkbRules;
char *xkbModel;
char *xkbLayout;
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 318d233..832b09c 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1120,7 +1120,6 @@ KdParseKeyboard (char *arg)
ki->path = NULL;
ki->driver = NULL;
ki->driverPrivate = NULL;
- ki->xkb = NULL;
ki->next = NULL;
if (!arg)
More information about the xorg-commit
mailing list