Allow background opacity for values in range [0.91, 0.99]

This commit is contained in:
Maxim Baz 2018-04-09 12:59:17 +02:00 committed by GitHub
parent 1ce50fb6f0
commit 662ab0df45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -334,7 +334,7 @@ create_os_window(PyObject UNUSED *self, PyObject *args) {
PyErr_SetString(PyExc_ValueError, "Too many windows");
return NULL;
}
bool want_semi_transparent = (1.0 - OPT(background_opacity) > 0.1) ? true : false;
bool want_semi_transparent = (1.0 - OPT(background_opacity) >= 0.01) ? true : false;
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, want_semi_transparent);
GLFWwindow *glfw_window = glfwCreateWindow(width, height, title, NULL, global_state.num_os_windows ? global_state.os_windows[0].handle : NULL);
if (glfw_window == NULL) {