Skip to content

Xext: replace "ShapeEventType" resource by devPrivate #1784

@metux

Description

@metux

Describe the cleanup

Instead of allocating resource additional per-Window resources (with same XID as the window, but different RESTYPE), use a devPrivate on the window instead.

Note that we're currently relying on some resource hash table deep black magic that's destroying all resources with the given XID, even if they have different RESTYPEs. Thus, when moving to devPrivate's, we also have to add a window destroy hook. Yet have to sort out whether the current ScreenHooks are already sufficient (Xshape would need to hook into all screens one by one) or adding a dedicated generic Window destructor (idependent of screen) first.

It should be done because

The current implementation is an abuse of some historical and undocumented implementation details of the resource hash table, which just had been discovered accidentially. And it's blocking unification of various different hashtable implementations.

See: #1507

What are the alternatives?

No response

Additional context

No response

Extra fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-cleanupCode refactoringsneeds-triageThis needs to be reviewed and categorized.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions