Skip to content

Commit

Permalink
Revert "winex11.drv: Remove unused X11DRV_GET_DRAWABLE ExtEscape code."
Browse files Browse the repository at this point in the history
This reverts commit 6a395d94eeba987b69a16eb0dd29b80f271780e9.

Link: ValveSoftware#161
  • Loading branch information
rbernon committed Jan 26, 2023
1 parent 3ced19d commit 17d2319
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dlls/winex11.drv/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
9 changes: 9 additions & 0 deletions dlls/winex11.drv/x11drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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) */
Expand Down

0 comments on commit 17d2319

Please sign in to comment.