aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--picom.sample.conf2
-rw-r--r--src/atom.h3
-rw-r--r--src/config_libconfig.c18
-rw-r--r--src/options.c3
-rw-r--r--src/picom.c20
-rw-r--r--src/win.c13
-rw-r--r--src/wm_check.c22
-rw-r--r--src/wm_check.h6
9 files changed, 11 insertions, 80 deletions
diff --git a/README.md b/README.md
index 8f076f9..1170824 100644
--- a/README.md
+++ b/README.md
@@ -31,8 +31,8 @@ Here is a full list of features that are now avaliable going ahead from `1.0`
- Animation open and unmap exclusion lists! Don't want something animating? Now you can fix that.
- Blur rules. Background blurring is now done on a whitelist basis to reduce hardware consumption.
- (As of `1.2.3`) fixes rounded corner issues on AwesomeWM.
-- (As of `1.3.0`) Adds `inactive-exclude` and `active-opacity-exclude`. See Wiki or Donument for more information.
-- (As of `1.4.0`) Your window manager is now automically detected and patched if any patches are avaliable!
+- (As of `1.2.4`) A New option, `wm-support` has been added. This will be expanded upon in the future but it currently fixes the corner issue on AwesomeWM when passing in `"awesome"`.
+- (As of `1.3.0`) Adds `inactive-opacity-exclude` and `active-opacity-exclude`. See Wiki or Donument for more information.
## What Is This?
diff --git a/picom.sample.conf b/picom.sample.conf
index 685d68e..0fb8bb2 100644
--- a/picom.sample.conf
+++ b/picom.sample.conf
@@ -162,7 +162,7 @@ active-opacity = 1.0
# ];
-# Specify a list of windows that should ignore both `active-opacity` and `inactive-opacity`. If `inactive-opacity-override = true;` then the window will always use `1.0` opacity and as expected ignore its opacity-rule.
+# Specify a list of conditions of windows that should never be considered focused.
# focus-exclude = [
# "class_g = 'Cairo-clock'"
#];
diff --git a/src/atom.h b/src/atom.h
index 6f4eae6..baf3360 100644
--- a/src/atom.h
+++ b/src/atom.h
@@ -23,7 +23,8 @@
WM_CLIENT_MACHINE, \
_NET_ACTIVE_WINDOW, \
_COMPTON_SHADOW, \
- _NET_WM_WINDOW_TYPE
+ _NET_WM_WINDOW_TYPE, \
+ _NET_CURRENT_DESKTOP
#define ATOM_LIST2 \
_NET_WM_WINDOW_TYPE_DESKTOP, \
diff --git a/src/config_libconfig.c b/src/config_libconfig.c
index 0f6a0f1..1b81a50 100644
--- a/src/config_libconfig.c
+++ b/src/config_libconfig.c
@@ -468,21 +468,6 @@ char *parse_config_libconfig(options_t *opt, const char *config_file, bool *shad
goto err;
}
}
-
- const char *wmNotice = checkWindowManager();
-
- if (strcmp(wmNotice, "awesome") == 0) {
- log_warn("Looks like you are using AwesomeWM. Applying Patches");
- } else if (strcmp(wmNotice, "herb") == 0) {
- log_warn("Looks like you are using HerbstluftWM. Applying Patches");
- } else if (strcmp(wmNotice, "dwm") == 0) {
- log_warn("Looks like you are using DWM. Applying Patches");
- } else if (strcmp(wmNotice, "NULL") == 0) {
- log_warn("Your not using a Display Manager. Add this to your shells's rc file to ensure you will get the right patches.\n export DESKTOP_SESSION='your-window-manager'\n");
- } else {
- log_warn("Looks like your WM, %s does not have any patches avaliable. This is not an Error.", wmNotice);
- }
-
// --log-level
if (config_lookup_string(&cfg, "log-level", &sval)) {
auto level = string_to_log_level(sval);
@@ -616,8 +601,7 @@ char *parse_config_libconfig(options_t *opt, const char *config_file, bool *shad
log_fatal("Invalid window manager name passed %s", sval);
goto err;
}
- log_warn("wm-support is deprecated. Your window manager will now be detected and have patches applied automatically");
- opt->support_for_wm = WM_SUPPORT_NONE;
+ opt->support_for_wm = wm;
}
// --opacity-rule
parse_cfg_condlst_opct(opt, &cfg, "opacity-rule");
diff --git a/src/options.c b/src/options.c
index e2fcd42..c98a77e 100644
--- a/src/options.c
+++ b/src/options.c
@@ -805,8 +805,7 @@ bool get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
if (wm >= WM_SUPPORT_INVALID) {
log_warn("Invalid window manager %s, ignoring.", optarg);
} else {
- log_warn("wm-support is deprecated. Your window manager will now be detected and have patches applied automatically");
- opt->support_for_wm = WM_SUPPORT_NONE;
+ opt->support_for_wm = wm;
}
break;
}
diff --git a/src/picom.c b/src/picom.c
index 7c350b9..c8dea67 100644
--- a/src/picom.c
+++ b/src/picom.c
@@ -17,7 +17,6 @@
#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <xcb/composite.h>
@@ -63,8 +62,6 @@
#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) \
({ \
@@ -838,11 +835,9 @@ paint_preprocess(session_t *ps, bool *fade_running, bool *animation_running) {
if (size_changed) {
win_on_win_size_change(ps, w);
- const char *wm = checkWindowManager();
-
- if (strcmp(wm, "awesome") == 0) {
+ if (ps->o.support_for_wm == WM_SUPPORT_AWESOME) {
win_update_bounding_shape(ps, w);
- } else if (strcmp(wm, "herb") == 0) {
+ } else if (ps->o.support_for_wm == WM_SUPPORT_HERB) {
win_update_bounding_shape(ps, w);
} else {
pixman_region32_clear(&w->bounding_shape);
@@ -851,17 +846,6 @@ 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);
diff --git a/src/win.c b/src/win.c
index b82e522..1392020 100644
--- a/src/win.c
+++ b/src/win.c
@@ -34,8 +34,6 @@
#include "utils.h"
#include "x.h"
-#include "wm_check.h"
-
#ifdef CONFIG_DBUS
#include "dbus.h"
#endif
@@ -1128,16 +1126,13 @@ double win_calc_opacity_target(session_t *ps, const struct managed_win *w) {
return 0;
}
-
- const char *wm = checkWindowManager();
-
// Try obeying opacity property and window type opacity firstly
if (w->has_opacity_prop) {
opacity = ((double)w->opacity_prop) / OPAQUE;
} else if (w->opacity_is_set && !ps->o.inactive_opacity_override) {
opacity = w->opacity_set;
} else if (w->opacity_is_set && ps->o.inactive_opacity_override) {
- if (strcmp(wm, "dwm") == 0) {
+ if (ps->o.support_for_wm == WM_SUPPORT_DWM) {
if (win_is_focused_raw(ps, w)) {
if (c2_match(ps, w, ps->o.active_opacity_blacklist, NULL)) {
opacity = 1.0;
@@ -1215,10 +1210,7 @@ bool win_should_dim(session_t *ps, const struct managed_win *w) {
return false;
}
- const char *wm = checkWindowManager();
-
- if (strcmp(wm, "dwm") == 0) {
- // printf("DWM True\n");
+ if (ps->o.support_for_wm == WM_SUPPORT_DWM) {
if (ps->o.inactive_dim > 0 && !win_is_focused_raw(ps, w)) {
if (c2_match(ps, w, ps->o.inactive_opacity_blacklist, NULL)) {
return false;
@@ -1229,7 +1221,6 @@ bool win_should_dim(session_t *ps, const struct managed_win *w) {
return false;
}
} else {
- // printf("DWM False\n");
if (ps->o.inactive_dim > 0 && !win_is_focused_raw(ps, w)) {
if (c2_match(ps, w, ps->o.inactive_opacity_blacklist, NULL)) {
return false;
diff --git a/src/wm_check.c b/src/wm_check.c
deleted file mode 100644
index 462f68b..0000000
--- a/src/wm_check.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-const char *checkWindowManager() {
- char *desktopSession = getenv("DESKTOP_SESSION");
- if (strlen(desktopSession) == 0) {
- return "NULL";
- } else {
- if (strstr(desktopSession, "xmonad") != NULL) {
- return "xmonad";
- } else if (strstr(desktopSession, "herb") != NULL) {
- return "herb";
- } else if (strstr(desktopSession, "awesome") != NULL) {
- return "awesome";
- } else if (strstr(desktopSession, "dwm") != NULL) {
- return "dwm";
- } else {
- return "empty";
- }
- }
-} \ No newline at end of file
diff --git a/src/wm_check.h b/src/wm_check.h
deleted file mode 100644
index 0b95d4d..0000000
--- a/src/wm_check.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef WINDOW_MANAGER_CHECKER_H
-#define WINDOW_MANAGER_CHECKER_H
-
-const char *checkWindowManager();
-
-#endif \ No newline at end of file