Dont allow running the program as the root user

This commit is contained in:
dec05eba
2024-11-24 22:53:29 +01:00
parent b57bc8505d
commit a872c07f7a
2 changed files with 8 additions and 5 deletions

View File

@@ -1436,7 +1436,7 @@ namespace gsr {
mgl_context *context = mgl_get_context();
Display *display = (Display*)context->connection;
if(is_compositor_running(display, 0))
if(gsr_info.system_info.display_server != DisplayServer::X11 || is_compositor_running(display, 0))
return false;
bool window_texture_loaded = false;