xwayland: Add per client private data
Add per client private data, which for now is empty. This is a preparation patch for adding randr/vidmode resolution change emulation. Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
e89872f51a
commit
905cb8b9e2
|
@ -165,11 +165,18 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DevPrivateKeyRec xwl_client_private_key;
|
||||||
static DevPrivateKeyRec xwl_window_private_key;
|
static DevPrivateKeyRec xwl_window_private_key;
|
||||||
static DevPrivateKeyRec xwl_screen_private_key;
|
static DevPrivateKeyRec xwl_screen_private_key;
|
||||||
static DevPrivateKeyRec xwl_pixmap_private_key;
|
static DevPrivateKeyRec xwl_pixmap_private_key;
|
||||||
static DevPrivateKeyRec xwl_damage_private_key;
|
static DevPrivateKeyRec xwl_damage_private_key;
|
||||||
|
|
||||||
|
struct xwl_client *
|
||||||
|
xwl_client_get(ClientPtr client)
|
||||||
|
{
|
||||||
|
return dixLookupPrivate(&client->devPrivates, &xwl_client_private_key);
|
||||||
|
}
|
||||||
|
|
||||||
static struct xwl_window *
|
static struct xwl_window *
|
||||||
xwl_window_get(WindowPtr window)
|
xwl_window_get(WindowPtr window)
|
||||||
{
|
{
|
||||||
|
@ -1121,6 +1128,13 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!dixRegisterPrivateKey(&xwl_damage_private_key, PRIVATE_WINDOW, 0))
|
if (!dixRegisterPrivateKey(&xwl_damage_private_key, PRIVATE_WINDOW, 0))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
/* There are no easy to use new / delete client hooks, we could use a
|
||||||
|
* ClientStateCallback, but it is easier to let the dix code manage the
|
||||||
|
* memory for us. This will zero fill the initial xwl_client data.
|
||||||
|
*/
|
||||||
|
if (!dixRegisterPrivateKey(&xwl_client_private_key, PRIVATE_CLIENT,
|
||||||
|
sizeof(struct xwl_client)))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
dixSetPrivate(&pScreen->devPrivates, &xwl_screen_private_key, xwl_screen);
|
dixSetPrivate(&pScreen->devPrivates, &xwl_screen_private_key, xwl_screen);
|
||||||
xwl_screen->screen = pScreen;
|
xwl_screen->screen = pScreen;
|
||||||
|
|
|
@ -377,6 +377,11 @@ struct xwl_output {
|
||||||
Bool xdg_output_done;
|
Bool xdg_output_done;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct xwl_client {
|
||||||
|
};
|
||||||
|
|
||||||
|
struct xwl_client *xwl_client_get(ClientPtr client);
|
||||||
|
|
||||||
void xwl_sync_events (struct xwl_screen *xwl_screen);
|
void xwl_sync_events (struct xwl_screen *xwl_screen);
|
||||||
void xwl_surface_damage(struct xwl_screen *xwl_screen,
|
void xwl_surface_damage(struct xwl_screen *xwl_screen,
|
||||||
struct wl_surface *surface,
|
struct wl_surface *surface,
|
||||||
|
|
Loading…
Reference in New Issue