Xfwm4 does not respect the use of an external compositor (picom, etc.)
If you use the built-in xfwm4 compositor, all the window manager effects are displayed, but if you use a different compositor, the effects are disabled, although they work fine using picom.
This patch fixes this behavior (works fine even if the --disable-compositor autotools option is set):
diff --git a/src/compositor.c b/src/compositor.c
index 49c27f730..4269bbcae 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4173,6 +4173,7 @@ compositorHandleCursorNotify (DisplayInfo *display_info, XFixesCursorNotifyEvent
update_cursor (screen_info);
}
}
+#endif
static gboolean
compositorCheckCMSelection (ScreenInfo *screen_info)
@@ -4200,6 +4201,7 @@ compositorCheckCMSelection (ScreenInfo *screen_info)
return FALSE;
}
+#ifdef HAVE_COMPOSITOR
#ifdef HAVE_PRESENT_EXTENSION
static void
compositorHandlePresentCompleteNotify (DisplayInfo *display_info, XPresentCompleteNotifyEvent *ev)
@@ -4406,11 +4408,19 @@ compositorIsUsable (DisplayInfo *display_info)
gboolean
compositorIsActive (ScreenInfo *screen_info)
{
-#ifdef HAVE_COMPOSITOR
g_return_val_if_fail (screen_info != NULL, FALSE);
- return screen_info->compositor_active;
+#ifdef HAVE_COMPOSITOR
+ if (screen_info->compositor_active) {
+ return TRUE;
+ }
#endif /* HAVE_COMPOSITOR */
+
+ // check if any other compositor is running (ex. picom)
+ if (compositorCheckCMSelection(screen_info)) {
+ return TRUE;
+ }
+
return FALSE;
}
P.S. Maybe there are other places where you need to fix the code, but this patch seems to work fine, I didn't see any issues.
It would be nice to have this thing, especially when picom is on the WM/compositor list (compton can be removed, it's obsolete and unmaintained).