mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-22 20:35:43 +00:00
Alloc sprite memory in devices' devPrivates, allow undisplaying cursors.
Improve memory usage by allocating the sprite's memory only to devices that actually have a sprite and provide means to remove a device's cursor from the screen (more hotplugging, yay!). This commit breaks ScreenRec's ABI.
This commit is contained in:
parent
7cef789fa1
commit
f1f8b562aa
12 changed files with 442 additions and 291 deletions
|
|
@ -424,6 +424,10 @@ extern int DeliverDeviceEvents(
|
|||
extern void DefineInitialRootWindow(
|
||||
WindowPtr /* win */);
|
||||
|
||||
extern void SetupSprite(
|
||||
DeviceIntPtr /* pDev */,
|
||||
ScreenPtr /* pScreen */);
|
||||
|
||||
extern void InitializeSprite(
|
||||
DeviceIntPtr /* pDev */,
|
||||
WindowPtr /* pWin */);
|
||||
|
|
|
|||
|
|
@ -190,6 +190,8 @@ extern int InitAndStartDevices(void);
|
|||
|
||||
extern void CloseDownDevices(void);
|
||||
|
||||
extern void UndisplayDevices(void);
|
||||
|
||||
extern int RemoveDevice(
|
||||
DeviceIntPtr /*dev*/);
|
||||
|
||||
|
|
|
|||
|
|
@ -431,6 +431,18 @@ typedef void (* MarkUnrealizedWindowProcPtr)(
|
|||
WindowPtr /*pWin*/,
|
||||
Bool /*fromConfigure*/);
|
||||
|
||||
typedef void (* UndisplayCursorProcPtr)(
|
||||
DeviceIntPtr /* pDev */,
|
||||
ScreenPtr /* pScreen */);
|
||||
|
||||
typedef Bool (* DeviceCursorInitializeProcPtr)(
|
||||
DeviceIntPtr /* pDev */,
|
||||
ScreenPtr /* pScreen */);
|
||||
|
||||
typedef void (* DeviceCursorCleanupProcPtr)(
|
||||
DeviceIntPtr /* pDev */,
|
||||
ScreenPtr /* pScreen */);
|
||||
|
||||
typedef struct _Screen {
|
||||
int myNum; /* index of this instance in Screens[] */
|
||||
ATOM id;
|
||||
|
|
@ -587,6 +599,10 @@ typedef struct _Screen {
|
|||
ChangeBorderWidthProcPtr ChangeBorderWidth;
|
||||
MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
|
||||
|
||||
/* Device cursor procedures */
|
||||
UndisplayCursorProcPtr UndisplayCursor;
|
||||
DeviceCursorInitializeProcPtr DeviceCursorInitialize;
|
||||
DeviceCursorCleanupProcPtr DeviceCursorCleanup;
|
||||
} ScreenRec;
|
||||
|
||||
typedef struct _ScreenInfo {
|
||||
|
|
|
|||
Loading…
Reference in a new issue