mirror of https://github.com/snes9xgit/snes9x.git
Use XConfigureWindow instead of creating new ones. This doesn't exhibit
the expose problem that XResizeWindow shows.
This commit is contained in:
parent
583f2a7ef8
commit
52defdc17a
|
@ -727,17 +727,15 @@ S9xOpenGLDisplayDriver::refresh (int width, int height)
|
||||||
void
|
void
|
||||||
S9xOpenGLDisplayDriver::resize_window (int width, int height)
|
S9xOpenGLDisplayDriver::resize_window (int width, int height)
|
||||||
{
|
{
|
||||||
g_object_unref (gdk_window);
|
XWindowChanges changes;
|
||||||
XDestroyWindow (display, xwindow);
|
|
||||||
|
changes.width = width;
|
||||||
|
changes.height = height;
|
||||||
|
XConfigureWindow (display, xwindow, CWWidth | CWHeight, &changes);
|
||||||
XSync (display, False);
|
XSync (display, False);
|
||||||
|
|
||||||
create_window (width, height);
|
|
||||||
gdk_window_show (gdk_window);
|
gdk_window_show (gdk_window);
|
||||||
|
|
||||||
glXMakeCurrent (display, xwindow, glx_context);
|
|
||||||
|
|
||||||
swap_control (config->sync_to_vblank);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,11 +39,13 @@ S9xXVDisplayDriver::S9xXVDisplayDriver (Snes9xWindow *window,
|
||||||
void
|
void
|
||||||
S9xXVDisplayDriver::resize_window (int width, int height)
|
S9xXVDisplayDriver::resize_window (int width, int height)
|
||||||
{
|
{
|
||||||
g_object_unref (gdk_window);
|
XWindowChanges changes;
|
||||||
XDestroyWindow (display, xwindow);
|
|
||||||
|
changes.width = width;
|
||||||
|
changes.height = height;
|
||||||
|
XConfigureWindow (display, xwindow, CWWidth | CWHeight, &changes);
|
||||||
XSync (display, False);
|
XSync (display, False);
|
||||||
|
|
||||||
create_window (width, height);
|
|
||||||
gdk_window_show (gdk_window);
|
gdk_window_show (gdk_window);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue