mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-27 11:21:32 +00:00
Only ask application to abort once
This commit is contained in:
parent
c7703791d1
commit
cf2f8165eb
1 changed files with 12 additions and 8 deletions
20
glfw/wl_window.c
vendored
20
glfw/wl_window.c
vendored
|
|
@ -764,14 +764,18 @@ animateCursorImage(id_type timer_id UNUSED, void *data UNUSED) {
|
|||
|
||||
static void
|
||||
abortOnFatalError(int last_error) {
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR, "Wayland: fatal display error: %s", strerror(last_error));
|
||||
if (_glfw.callbacks.application_close) _glfw.callbacks.application_close(1);
|
||||
else {
|
||||
_GLFWwindow* window = _glfw.windowListHead;
|
||||
while (window)
|
||||
{
|
||||
_glfwInputWindowCloseRequest(window);
|
||||
window = window->next;
|
||||
static bool abort_called = false;
|
||||
if (!abort_called) {
|
||||
abort_called = true;
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR, "Wayland: fatal display error: %s", strerror(last_error));
|
||||
if (_glfw.callbacks.application_close) _glfw.callbacks.application_close(1);
|
||||
else {
|
||||
_GLFWwindow* window = _glfw.windowListHead;
|
||||
while (window)
|
||||
{
|
||||
_glfwInputWindowCloseRequest(window);
|
||||
window = window->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ensure the tick callback is called
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue