Refactor FBConfig lookup
Background: To bind a Xorg window content to a OpenGL FBConfig, which has to match the color format the Xorg window is using. Previously, compton just find a FBConfig that has the same depth. This led to chjj/compton#477, which has been fixed by a ugly hack. The commit refactor the lookup mechanism to take as much into consideration as we reasonably can. Hopefully preventing similar breakages in the future. Also, some code sharing between the old and new glx backend. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "region.h"
|
||||
#include "log.h"
|
||||
|
||||
@@ -62,6 +61,8 @@ typedef struct {
|
||||
int height;
|
||||
} gl_blur_cache_t;
|
||||
|
||||
typedef struct session session_t;
|
||||
|
||||
#define GL_PROG_MAIN_INIT \
|
||||
{ .prog = 0, .unifm_opacity = -1, .unifm_invert_color = -1, .unifm_tex = -1, }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user