Better detection of window destroyed
This commit is contained in:
parent
e49d30048f
commit
c43fa5e4ee
10
src/main.cpp
10
src/main.cpp
@ -1314,6 +1314,10 @@ int main(int argc, char **argv) {
|
|||||||
redraw = true;
|
redraw = true;
|
||||||
|
|
||||||
if(src_window_id) {
|
if(src_window_id) {
|
||||||
|
if (XCheckTypedWindowEvent(dpy, src_window_id, DestroyNotify, &e)) {
|
||||||
|
running = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (XCheckTypedWindowEvent(dpy, src_window_id, VisibilityNotify, &e)) {
|
if (XCheckTypedWindowEvent(dpy, src_window_id, VisibilityNotify, &e)) {
|
||||||
window_resize_timer = glfwGetTime();
|
window_resize_timer = glfwGetTime();
|
||||||
window_resized = true;
|
window_resized = true;
|
||||||
@ -1405,12 +1409,6 @@ int main(int argc, char **argv) {
|
|||||||
if (frame_time_overflow >= 0.0) {
|
if (frame_time_overflow >= 0.0) {
|
||||||
frame_timer_start = time_now - frame_time_overflow;
|
frame_timer_start = time_now - frame_time_overflow;
|
||||||
|
|
||||||
if(dpy && src_window_id) {
|
|
||||||
XWindowAttributes attr;
|
|
||||||
if(!XGetWindowAttributes(dpy, src_window_id, &attr))
|
|
||||||
running = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool frame_captured = true;
|
bool frame_captured = true;
|
||||||
if(redraw) {
|
if(redraw) {
|
||||||
redraw = false;
|
redraw = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user