From 17d231926d9bc4e6142a757556f6679ba13e5ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 26 Jan 2023 19:57:55 +0100 Subject: [PATCH] Revert "winex11.drv: Remove unused X11DRV_GET_DRAWABLE ExtEscape code." This reverts commit 6a395d94eeba987b69a16eb0dd29b80f271780e9. Link: https://github.com/ValveSoftware/wine/issues/161 --- dlls/winex11.drv/init.c | 8 ++++++++ dlls/winex11.drv/x11drv.h | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 095a3778089..1df9fe589f0 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -222,6 +222,14 @@ static INT CDECL X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOI return TRUE; } break; + case X11DRV_GET_DRAWABLE: + if (out_count >= sizeof(struct x11drv_escape_get_drawable)) + { + struct x11drv_escape_get_drawable *data = out_data; + data->drawable = physDev->drawable; + return TRUE; + } + break; case X11DRV_PRESENT_DRAWABLE: if (in_count >= sizeof(struct x11drv_escape_present_drawable)) { diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 53c627c75fd..98cbe2f6f67 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -339,6 +339,7 @@ extern int *get_window_surface_mapping( int bpp, int *mapping ) DECLSPEC_HIDDEN; enum x11drv_escape_codes { X11DRV_SET_DRAWABLE, /* set current drawable for a DC */ + X11DRV_GET_DRAWABLE, /* get current drawable for a DC */ X11DRV_START_EXPOSURES, /* start graphics exposures */ X11DRV_END_EXPOSURES, /* end graphics exposures */ X11DRV_PRESENT_DRAWABLE, /* present the drawable on screen */ @@ -352,6 +353,14 @@ struct x11drv_escape_set_drawable RECT dc_rect; /* DC rectangle relative to drawable */ }; +struct x11drv_escape_get_drawable +{ + enum x11drv_escape_codes code; /* escape code (X11DRV_GET_DRAWABLE) */ + Drawable drawable; /* X drawable */ + Drawable gl_drawable; /* GL drawable */ + int pixel_format; /* internal GL pixel format */ +}; + struct x11drv_escape_present_drawable { enum x11drv_escape_codes code; /* escape code (X11DRV_PRESENT_DRAWABLE) */