summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/graphics.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/graphics.cc b/src/graphics.cc
index 5618824..3eddc74 100644
--- a/src/graphics.cc
+++ b/src/graphics.cc
@@ -6,11 +6,11 @@
#include "utils.h"
#include "wlstate.h"
-/* clang-format off */
#define WAYC_OPENGL_MAJOR 4
#define WAYC_OPENGL_MINOR 6
#define WAYC_COLOR_BITS 8
+/* clang-format off */
static EGLint WAYC_EGL_ATTRS[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RED_SIZE, WAYC_COLOR_BITS,
@@ -27,6 +27,10 @@ static EGLint WAYC_OGL_ATTRS[] = {
EGL_NONE
};
+static struct graphics_s WAYC_GRAPHICS_DUMMY = {
+ nullptr, nullptr, nullptr
+};
+
/* clang-format on */
static bool wayc_graphics_config(EGLDisplay display, EGLConfig* config) {
@@ -84,6 +88,7 @@ void wayc_graphics_deinit(struct graphics_s* graphics) {
if (graphics->display == nullptr || graphics->context == nullptr) return;
+ wayc_graphics_use(&WAYC_GRAPHICS_DUMMY);
eglDestroyContext(graphics->display, graphics->context);
eglTerminate(graphics->display);