Update window.cpp
key repeat fix
This commit is contained in:
@@ -36,7 +36,6 @@ void RWindow::lower() const { XLowerWindow(display, window); }
|
||||
|
||||
void RWindow::destroyWindow() {
|
||||
XDestroySubwindows(display, window);
|
||||
XAutoRepeatOn(display);
|
||||
XDestroyWindow(display, window);
|
||||
delete this;
|
||||
}
|
||||
@@ -72,6 +71,7 @@ void RWindow::pollEvents() {
|
||||
if (xev.type == ClientMessage)
|
||||
if (xev.xclient.message_type == XInternAtom(display, "WM_PROTOCOLS", False) && static_cast<Atom>(xev.xclient.data.l[0]) == wmDeleteWindow) {
|
||||
destroyWindow();
|
||||
system("xset r on");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -290,9 +290,9 @@ void RWindow::pollEvents() {
|
||||
XStoreName(display, window, title.c_str());
|
||||
wmDeleteWindow = XInternAtom(display, "WM_DELETE_WINDOW", False);
|
||||
XSetWMProtocols(display, window, &wmDeleteWindow, 1);
|
||||
if (renderer == RenderingAPI::OPENGL) {
|
||||
|
||||
if (renderer == RenderingAPI::OPENGL)
|
||||
glXMakeCurrent(display, window, glContext);
|
||||
}
|
||||
open = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user