mirror of https://github.com/adamdruppe/arsd.git
ketmar sdpy manual non-opengl window resizing segfault fix
This commit is contained in:
parent
ea1ef14f8a
commit
dde5021232
|
@ -4449,8 +4449,7 @@ version(Windows) {
|
||||||
// same position, new size for the client rectangle
|
// same position, new size for the client rectangle
|
||||||
MoveWindow(hwnd, rect.left, rect.top, rect.right, rect.bottom, true);
|
MoveWindow(hwnd, rect.left, rect.top, rect.right, rect.bottom, true);
|
||||||
|
|
||||||
version(without_opengl) {} else
|
version(without_opengl) {} else if (openglMode == OpenGlOptions.yes) glViewport(0, 0, w, h);
|
||||||
glViewport(0, 0, w, h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void moveResize (int x, int y, int w, int h) {
|
void moveResize (int x, int y, int w, int h) {
|
||||||
|
@ -4465,8 +4464,7 @@ version(Windows) {
|
||||||
throw new Exception("AdjustWindowRect");
|
throw new Exception("AdjustWindowRect");
|
||||||
|
|
||||||
MoveWindow(hwnd, rect.left, rect.top, rect.right, rect.bottom, true);
|
MoveWindow(hwnd, rect.left, rect.top, rect.right, rect.bottom, true);
|
||||||
version(without_opengl) {} else
|
version(without_opengl) {} else if (openglMode == OpenGlOptions.yes) glViewport(0, 0, w, h);
|
||||||
glViewport(0, 0, w, h);
|
|
||||||
if (windowResized !is null) windowResized(w, h);
|
if (windowResized !is null) windowResized(w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5724,8 +5722,7 @@ version(X11) {
|
||||||
if (w < 1) w = 1;
|
if (w < 1) w = 1;
|
||||||
if (h < 1) h = 1;
|
if (h < 1) h = 1;
|
||||||
XResizeWindow(display, window, w, h);
|
XResizeWindow(display, window, w, h);
|
||||||
version(without_opengl) {} else
|
version(without_opengl) {} else if (openglMode == OpenGlOptions.yes) glViewport(0, 0, w, h);
|
||||||
glViewport(0, 0, w, h);
|
|
||||||
if (windowResized !is null) windowResized(w, h);
|
if (windowResized !is null) windowResized(w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5733,8 +5730,7 @@ version(X11) {
|
||||||
if (w < 1) w = 1;
|
if (w < 1) w = 1;
|
||||||
if (h < 1) h = 1;
|
if (h < 1) h = 1;
|
||||||
XMoveResizeWindow(display, window, x, y, w, h);
|
XMoveResizeWindow(display, window, x, y, w, h);
|
||||||
version(without_opengl) {} else
|
version(without_opengl) {} else if (openglMode == OpenGlOptions.yes) glViewport(0, 0, w, h);
|
||||||
glViewport(0, 0, w, h);
|
|
||||||
if (windowResized !is null) windowResized(w, h);
|
if (windowResized !is null) windowResized(w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue