Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mainWindow is available through GetWMInfo

  • Loading branch information...
commit dc65b20f638856d628e47ff4e1e6f55de43b922c 1 parent 4cdcc25
@mordak mordak authored
Showing with 5 additions and 3 deletions.
  1. +3 −2 include/SDL_syswm.h
  2. +2 −1  src/video/playbook/SDL_playbookvideo.c
View
5 include/SDL_syswm.h
@@ -89,7 +89,7 @@ typedef struct SDL_SysWMinfo {
Display *display; /**< The X11 display */
Window window; /**< The X11 display window */
/** These locking functions should be called around
- * any X11 functions using the display variable,
+ * any X11 functions using the display variable,
* but not the gfxdisplay variable.
* They lock the event thread, so should not be
* called around event functions or from event filters.
@@ -195,6 +195,7 @@ typedef struct SDL_SysWMinfo {
SDL_version version;
screen_context_t context;
screen_window_t window;
+ screen_window_t mainWindow;
} SDL_SysWMinfo;
#else
@@ -220,7 +221,7 @@ typedef struct SDL_SysWMinfo {
* This function gives you custom hooks into the window manager information.
* It fills the structure pointed to by 'info' with custom information and
* returns 1 if the function is implemented. If it's not implemented, or
- * the version member of the 'info' structure is invalid, it returns 0.
+ * the version member of the 'info' structure is invalid, it returns 0.
*
* You typically use this function like this:
* @code
View
3  src/video/playbook/SDL_playbookvideo.c
@@ -166,6 +166,7 @@ int PLAYBOOK_GetWMInfo(_THIS, SDL_SysWMinfo *info)
if ( info->version.major <= SDL_MAJOR_VERSION ) {
info->window = _priv->screenWindow;
info->context = _priv->screenContext;
+ info->mainWindow = _priv->mainWindow;
return(1);
} else {
SDL_SetError("Application not compiled with SDL %d.%d\n",
@@ -697,7 +698,7 @@ SDL_Surface *PLAYBOOK_SetVideoMode(_THIS, SDL_Surface *current,
locateTCOControlFile(this);
if (_priv->tcoControlsDir) {
- initializeOverlay(this, screenWindow);
+ initializeOverlay(this, screenWindow);
}
_priv->frontBuffer = windowBuffer[0];

2 comments on commit dc65b20

@giorgosgs

This doesnt work. When I compile SDL with QNX Momentics I get a: mainWindow does not exist error.

@jnicholl
Collaborator

Which line does the compiler refer to for the failure? _priv->mainWindow should be defined in https://github.com/blackberry/SDL/blob/20c331e324ad5d58ef80c8352a760e2ac866747e/src/video/playbook/SDL_playbookvideo.h as a result of 20c331e. info->mainWindow looks like it's defined here as a result of this commit.

Please sign in to comment.
Something went wrong with that request. Please try again.