xserver: Branch 'master' - 4 commits
Keith Packard
keithp at kemper.freedesktop.org
Wed Jun 4 22:02:23 PDT 2014
dix/devices.c | 7 +++----
dix/events.c | 2 +-
fb/fbscreen.c | 2 +-
xfixes/cursor.c | 2 ++
4 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 2f5cf9ff9a0f713b7e038636484c77f113a5f10a
Author: Frank Binns <frank.binns at imgtec.com>
Date: Thu Apr 24 11:37:48 2014 +0100
xfixes: disable cursor on X server reset
The initial state of the cursor is set to disabled but this was
never be re-disabled during X server reset. This meant any
application run after an X server reset would have the cursor
displayed even if it hadn't requested this to be the case.
Signed-off-by: Frank Binns <frank.binns at imgtec.com>
Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 2c4b57c..31a408f 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -1056,6 +1056,8 @@ XFixesCursorInit(void)
if (party_like_its_1989)
CursorVisible = EnableCursor;
+ else
+ CursorVisible = FALSE;
if (!dixRegisterPrivateKey(&CursorScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
commit b92d86a982504af2605042c19ef796d135074ee1
Author: Brendan King <brendan.king at imgtec.com>
Date: Thu Apr 24 11:37:47 2014 +0100
dix: fix pixmap leak on server reset
The server is leaking a pixmap (created by CreateDefaultStipple()) on
reset. The leak is caused by some X Server graphics contexts not being
freed on reset by the machine independent cursor code in the server,
which in turn is caused by the cursor cleanup code
(miSpriteDeviceCursorCleanup()) not being called.
Ensures the DeviceCursorCleanup() function is called when the associated
input device is closed on server reset.
Signed-off-by: Frank Binns <frank.binns at imgtec.com>
Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/dix/devices.c b/dix/devices.c
index 73f60f4..7f079ff 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -946,8 +946,9 @@ CloseDevice(DeviceIntPtr dev)
if (dev->inited)
(void) (*dev->deviceProc) (dev, DEVICE_CLOSE);
- /* free sprite memory */
- if (IsMaster(dev) && dev->spriteInfo->sprite)
+ FreeSprite(dev);
+
+ if (IsMaster(dev))
screen->DeviceCursorCleanup(dev, screen);
/* free acceleration info */
@@ -968,8 +969,6 @@ CloseDevice(DeviceIntPtr dev)
free(classes);
}
- FreeSprite(dev);
-
/* a client may have the device set as client pointer */
for (j = 0; j < currentMaxClients; j++) {
if (clients[j] && clients[j]->clientPtr == dev) {
commit a99c061aafd4aaa5728c776dca7d0a1789ac739a
Author: Brendan King <brendan.king at imgtec.com>
Date: Thu Apr 24 11:37:46 2014 +0100
dix: reference the cursor just once in InitializeSprite()
The new current cursor was being referenced twice, resulting in a
memory leak when the current server generation ended.
Signed-off-by: Frank Binns <frank.binns at imgtec.com>
Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/dix/events.c b/dix/events.c
index 7e7a1c9..b8c67fd 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3237,7 +3237,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin)
pCursor = RefCursor(pCursor);
if (pSprite->current)
FreeCursor(pSprite->current, None);
- pSprite->current = RefCursor(pCursor);
+ pSprite->current = pCursor;
if (pScreen) {
(*pScreen->RealizeCursor) (pDev, pScreen, pSprite->current);
commit 444a1f7a8802999e27ecf5f6eb598df2206f7277
Author: Brendan King <brendan.king at imgtec.com>
Date: Thu Apr 24 11:37:45 2014 +0100
fb: fix screen pixmap leak on server reset
Call FreePixmap() instead of free() to destroy the screen pixmap in
fbCloseScreen().
Signed-off-by: Frank Binns <frank.binns at imgtec.com>
Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/fb/fbscreen.c b/fb/fbscreen.c
index b2b9739..1f91089 100644
--- a/fb/fbscreen.c
+++ b/fb/fbscreen.c
@@ -37,7 +37,7 @@ fbCloseScreen(ScreenPtr pScreen)
free(depths[d].vids);
free(depths);
free(pScreen->visuals);
- free(pScreen->devPrivate);
+ FreePixmap((PixmapPtr)pScreen->devPrivate);
return TRUE;
}
More information about the xorg-commit
mailing list