Skip to content

Instantly share code, notes, and snippets.

@richardgv
richardgv / compton-glx-direct-shadow-tex.patch
Created September 22, 2013 15:04
chjj/compton: Patch to use data directly to create shadow texture
diff --git a/src/common.h b/src/common.h
index eadaafd..0c3e45f 100644
--- a/src/common.h
+++ b/src/common.h
@@ -1149,6 +1149,9 @@ allocchk_(const char *func_name, void *ptr) {
/// @brief Wrapper of allocchk_().
#define allocchk(ptr) allocchk_(__func__, ptr)
+#define MALLOC(nmemb, type) (type *) allocchk(malloc(nmemb * sizeof(type)))
+#define CALLOC(nmemb, type) (type *) allocchk(calloc(nmemb, sizeof(type)))
@richardgv
richardgv / compton-fix-focus-detection.patch
Created September 18, 2013 02:44
chjj/compton #99: Possible focus detection fix
diff --git a/src/c2.c b/src/c2.c
index e89638b..de221c0 100644
--- a/src/c2.c
+++ b/src/c2.c
@@ -1055,7 +1055,7 @@ c2_match_once_leaf(session_t *ps, win *w, const c2_l_t *pleaf,
case C2_L_PFULLSCREEN: tgt = win_is_fullscreen(ps, w); break;
case C2_L_POVREDIR: tgt = w->a.override_redirect; break;
case C2_L_PARGB: tgt = (WMODE_ARGB == w->mode); break;
- case C2_L_PFOCUSED: tgt = w->focused_real; break;
+ case C2_L_PFOCUSED: tgt = win_is_focused_real(ps, w); break;
@richardgv
richardgv / compton-140-fixes.patch
Created September 11, 2013 15:00
chjj/compton #140: Possible fix
diff --git a/src/compton.c b/src/compton.c
index b8f1fc6..92378b0 100644
--- a/src/compton.c
+++ b/src/compton.c
@@ -1102,9 +1102,16 @@ paint_preprocess(session_t *ps, win *list) {
next = w->next;
opacity_t opacity_old = w->opacity;
- // Destroy reg_ignore on all windows if they should expire
- if (ps->reg_ignore_expire)
@richardgv
richardgv / skippy-xd-wip.patch
Last active December 22, 2015 02:39
richardgv/skippy-xd: Work in progress (icon rendering)
diff --git a/Makefile b/Makefile
index 12fbe8e..81d25db 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ BINDIR ?= ${PREFIX}/bin
CC ?= gcc
-SRCS_RAW = skippy wm dlist mainwin clientwin layout focus config tooltip img
+SRCS_RAW = skippy wm dlist mainwin clientwin layout focus config tooltip img img-xlib
@richardgv
richardgv / compton-xinerama-shadow-crop.patch
Created August 22, 2013 06:50
chjj/compton #137: Untested --xinerama-shadow-crop patch
diff --git a/Makefile b/Makefile
index 9acba9d..655c77d 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,12 @@ OBJS = compton.o
# === Configuration flags ===
CFG = -std=c99
+# ==== Xinerama ====
+ifeq "$(NO_XINERAMA)" ""
@richardgv
richardgv / skippy-xd-wip.patch
Last active December 18, 2015 00:19
richardgv/skippy-xd #10: Possible fix & other WIP things
diff --git a/Makefile b/Makefile
index 369ea19..52b72f8 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ BINDIR ?= ${PREFIX}/bin
CC ?= gcc
+SRCS_RAW = skippy wm dlist mainwin clientwin layout focus config tooltip img
PACKAGES = x11 xft xrender xcomposite xdamage xfixes
@richardgv
richardgv / skippyxd-customizable-tooltip-pos.patch
Created May 26, 2013 02:05
richardgv/skippy-xd #7: Quick and dirty implementation of customizable tooltip positioning
diff --git a/skippy-xd.rc-default b/skippy-xd.rc-default
index adcba44..3836848 100644
--- a/skippy-xd.rc-default
+++ b/skippy-xd.rc-default
@@ -54,6 +54,10 @@ opacity = 255
[tooltip]
show = true
+followsMouse = true
+offsetX = 20
@richardgv
richardgv / compton-varray.patch
Created May 22, 2013 12:57
chjj/compton #107: Use OpenGL VBO (Broken code, do not use in productive environment.)
diff --git a/src/compton.c b/src/compton.c
index c55d045..a9be15c 100644
--- a/src/compton.c
+++ b/src/compton.c
@@ -5118,6 +5118,7 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
{ "resize-damage", required_argument, NULL, 302 },
{ "glx-use-gpushader4", no_argument, NULL, 303 },
{ "opacity-rule", required_argument, NULL, 304 },
+ { "glx-use-vbo", no_argument, NULL, 305 },
// Must terminate with a NULL entry
@richardgv
richardgv / compton-dbusfading-multipassblur-wip.patch
Last active December 17, 2015 10:59
chjj/compton: D-Bus fading control & Multi-pass blur (WIP)
diff --git a/Makefile b/Makefile
index db7a272..d94783d 100644
--- a/Makefile
+++ b/Makefile
@@ -52,6 +52,12 @@ ifeq "$(NO_VSYNC_OPENGL)" ""
ifeq "$(NO_VSYNC_OPENGL_GLSL)" ""
CFG += -DCONFIG_VSYNC_OPENGL_GLSL
endif
+ ifeq "$(NO_VSYNC_OPENGL_FBO)" ""
+ CFG += -DCONFIG_VSYNC_OPENGL_FBO
@richardgv
richardgv / skippy-xd-custom-win-actions-wip.patch
Created May 9, 2013 14:22
richardgv/skippy-xd #2: Custom window actions and bindings, work in progress
diff --git a/skippy-xd.rc-default b/skippy-xd.rc-default
index ce2fb75..a4a1258 100644
--- a/skippy-xd.rc-default
+++ b/skippy-xd.rc-default
@@ -55,3 +55,8 @@ opacity = 128
text = #ffffff
textShadow = black
font = fixed-11:weight=bold
+
+[bindings]