Commit c14a8c6c authored by Jonas Ådahl's avatar Jonas Ådahl Committed by Adam Jackson

xwayland: Put getting a xwl_window from a Window in a helper

Signed-off-by: Jonas Ådahl's avatarJonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent b4644ce8
...@@ -103,6 +103,12 @@ static DevPrivateKeyRec xwl_window_private_key; ...@@ -103,6 +103,12 @@ 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 struct xwl_window *
xwl_window_get(WindowPtr window)
{
return dixLookupPrivate(&window->devPrivates, &xwl_window_private_key);
}
struct xwl_screen * struct xwl_screen *
xwl_screen_get(ScreenPtr screen) xwl_screen_get(ScreenPtr screen)
{ {
...@@ -335,8 +341,7 @@ xwl_unrealize_window(WindowPtr window) ...@@ -335,8 +341,7 @@ xwl_unrealize_window(WindowPtr window)
xwl_screen->UnrealizeWindow = screen->UnrealizeWindow; xwl_screen->UnrealizeWindow = screen->UnrealizeWindow;
screen->UnrealizeWindow = xwl_unrealize_window; screen->UnrealizeWindow = xwl_unrealize_window;
xwl_window = xwl_window = xwl_window_get(window);
dixLookupPrivate(&window->devPrivates, &xwl_window_private_key);
if (!xwl_window) if (!xwl_window)
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment