diff options
| author | allusive-dev <[email protected]> | 2023-11-08 09:50:17 +1100 |
|---|---|---|
| committer | allusive-dev <[email protected]> | 2023-11-08 09:50:17 +1100 |
| commit | a1f306539842b104abe23e9654d32308de2dcded (patch) | |
| tree | 39309626992e42a085b0601fdbc514efbec688d0 /src/picom.c | |
| parent | Update README.md (diff) | |
| download | compfy-a1f306539842b104abe23e9654d32308de2dcded.tar.xz compfy-a1f306539842b104abe23e9654d32308de2dcded.zip | |
Window Manager support is now applied automatically without using 'wm-support'
Diffstat (limited to 'src/picom.c')
| -rw-r--r-- | src/picom.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/picom.c b/src/picom.c index c8dea67..7c350b9 100644 --- a/src/picom.c +++ b/src/picom.c @@ -17,6 +17,7 @@ #include <fcntl.h> #include <inttypes.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <unistd.h> #include <xcb/composite.h> @@ -62,6 +63,8 @@ #include "options.h" #include "uthash_extra.h" +#include "wm_check.c" + /// Get session_t pointer from a pointer to a member of session_t #define session_ptr(ptr, member) \ ({ \ @@ -835,9 +838,11 @@ paint_preprocess(session_t *ps, bool *fade_running, bool *animation_running) { if (size_changed) { win_on_win_size_change(ps, w); - if (ps->o.support_for_wm == WM_SUPPORT_AWESOME) { + const char *wm = checkWindowManager(); + + if (strcmp(wm, "awesome") == 0) { win_update_bounding_shape(ps, w); - } else if (ps->o.support_for_wm == WM_SUPPORT_HERB) { + } else if (strcmp(wm, "herb") == 0) { win_update_bounding_shape(ps, w); } else { pixman_region32_clear(&w->bounding_shape); @@ -846,6 +851,17 @@ paint_preprocess(session_t *ps, bool *fade_running, bool *animation_running) { (uint)w->widthb, (uint)w->heightb); } + // if (ps->o.support_for_wm == WM_SUPPORT_AWESOME) { + // win_update_bounding_shape(ps, w); + // } else if (ps->o.support_for_wm == WM_SUPPORT_HERB) { + // win_update_bounding_shape(ps, w); + // } else { + // pixman_region32_clear(&w->bounding_shape); + // pixman_region32_fini(&w->bounding_shape); + // pixman_region32_init_rect(&w->bounding_shape, 0, 0, + // (uint)w->widthb, (uint)w->heightb); + // } + if (w->state != WSTATE_DESTROYING) win_clear_flags(w, WIN_FLAGS_PIXMAP_STALE); |