Use XConfigureWindow instead of creating new ones. This doesn't exhibit

the expose problem that XResizeWindow shows.
This commit is contained in:
Brandon Wright 2011-01-09 05:32:43 -06:00
parent 583f2a7ef8
commit 52defdc17a
2 changed files with 10 additions and 10 deletions

View File

@ -727,17 +727,15 @@ S9xOpenGLDisplayDriver::refresh (int width, int height)
void
S9xOpenGLDisplayDriver::resize_window (int width, int height)
{
g_object_unref (gdk_window);
XDestroyWindow (display, xwindow);
XWindowChanges changes;
changes.width = width;
changes.height = height;
XConfigureWindow (display, xwindow, CWWidth | CWHeight, &changes);
XSync (display, False);
create_window (width, height);
gdk_window_show (gdk_window);
glXMakeCurrent (display, xwindow, glx_context);
swap_control (config->sync_to_vblank);
return;
}

View File

@ -39,11 +39,13 @@ S9xXVDisplayDriver::S9xXVDisplayDriver (Snes9xWindow *window,
void
S9xXVDisplayDriver::resize_window (int width, int height)
{
g_object_unref (gdk_window);
XDestroyWindow (display, xwindow);
XWindowChanges changes;
changes.width = width;
changes.height = height;
XConfigureWindow (display, xwindow, CWWidth | CWHeight, &changes);
XSync (display, False);
create_window (width, height);
gdk_window_show (gdk_window);
return;