Skip to content

Commit

Permalink
Merge pull request #29 from dtlewis290/Cog
Browse files Browse the repository at this point in the history
Map X windows properly when opening or reopening the display, as requ…
  • Loading branch information
krono committed Jul 20, 2016
2 parents 2020e65 + 6b40d65 commit 1216028
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions platforms/unix/vm-display-X11/sqUnixX11.c
Expand Up @@ -4559,7 +4559,6 @@ void initWindow(char *displayName)
dndInitialise();
}


void setWindowSize(void)
{
int width, height, maxWidth, maxHeight;
Expand Down Expand Up @@ -6784,7 +6783,13 @@ int openXDisplay(void)
initClipboard();
initWindow(displayName);
initPixmap();
if (inBrowser()) /* if so we will be reparented and mapped by plugin */
if (!inBrowser())
{
setWindowSize();
XMapWindow(stDisplay, stParent);
XMapWindow(stDisplay, stWindow);
}
else /* if in browser we will be reparented and mapped by plugin */
{
/* tell browser our window */
# if defined(DEBUG_BROWSER)
Expand All @@ -6805,16 +6810,6 @@ int openXDisplay(void)
return 0;
}

static void
mapXDisplay(void)
{
if (!inBrowser()) {
setWindowSize();
XMapWindow(stDisplay, stParent);
XMapWindow(stDisplay, stWindow);
}
}

int forgetXDisplay(void)
{
/* Initialise variables related to the X connection, and
Expand Down Expand Up @@ -7276,7 +7271,6 @@ static void display_winOpen(int argc, char *dropFiles[])
if (launched)
exit(0);

mapXDisplay();
}


Expand Down

0 comments on commit 1216028

Please sign in to comment.