Compare commits

...

3 Commits

Author SHA1 Message Date
Rumen
03e6e72b41 barconfig patch 2025-11-24 01:53:12 +01:00
Rumen
010b4b70be appicons patch 2025-11-24 01:45:29 +01:00
yukiisen
7c70e204b8 Fixed client opacity problem so windows don't lose transparency when they update buffers 2025-11-24 01:04:38 +01:00
6 changed files with 542 additions and 32 deletions

View File

@ -0,0 +1,25 @@
![dwl bar-appicons patch example](example.png)
### Description
Adds support for app icons that can replace the tag indicator and tag name.
This feature is configurable through an additional option in `rules`.
Icons should work out of the box. Emojis require a special font like
[Noto Color Emoji](https://fonts.google.com/noto/specimen/Noto+Color+Emoji).
When one or more app icons are present in a tag, the tag name will be enclosed
by the outer separators (`outer_separator_beg` and `outer_separator_end`).
Additionally, the icons within the tag will be separated by `inner_separator`.
Each tag can display a maximum of `truncate_icons_after` icons, after which the
`truncate_symbol` will be shown.
**Inspiration:** [XMonad's DynamicIcons](https://hackage.haskell.org/package/xmonad-contrib-0.18.1/docs/XMonad-Hooks-DynamicIcons.html)
### Prerequisites
Make sure you have the [bar](/dwl/dwl-patches/raw/branch/main/patches/bar) patch.
### Download
- [main_2025-10-24](/dwl/dwl-patches/raw/branch/main/patches/bar-appicons/appicons.patch)
### Authors
- [rumenmitov](https://codeberg.org/rumenmitov)

View File

@ -0,0 +1,275 @@
From f0c747be0deca64801fe01eebfa78ce5b3d803fe Mon Sep 17 00:00:00 2001
From: Rumen <rumenmitov@protonmail.com>
Date: Fri, 24 Oct 2025 17:14:02 +0200
Subject: [PATCH] fix: appicons displaying on all monitors
---
config.def.h | 14 +++--
dwl.c | 142 +++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 149 insertions(+), 7 deletions(-)
diff --git a/config.def.h b/config.def.h
index 1b7472d..a48b78d 100644
--- a/config.def.h
+++ b/config.def.h
@@ -26,12 +26,20 @@ static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
/* logging */
static int log_level = WLR_ERROR;
+/* appicons */
+/* NOTE: set to 0 to set to default (whitespace) */
+static char outer_separator_beg = '[';
+static char outer_separator_end = ']';
+static char inner_separator = ' ';
+static unsigned truncate_icons_after = 2; /* will default to 1, that is the min */
+static char truncate_symbol[] = "...";
+
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
static const Rule rules[] = {
- /* app_id title tags mask isfloating monitor */
+ /* app_id title tags mask isfloating monitor appicon*/
/* examples: */
- { "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
- { "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
+ { "Gimp_EXAMPLE", NULL, 0, 1, -1, NULL }, /* Start on currently visible tags floating, not tiled */
+ { "firefox_EXAMPLE", NULL, 1 << 8, 0, -1, "" }, /* Start on ONLY tag "9" */
};
/* layout(s) */
diff --git a/dwl.c b/dwl.c
index bf340d8..ba6388a 100644
--- a/dwl.c
+++ b/dwl.c
@@ -143,6 +143,7 @@ typedef struct {
struct wl_listener set_hints;
#endif
unsigned int bw;
+ char *appicon;
uint32_t tags;
int isfloating, isurgent, isfullscreen;
uint32_t resize; /* configure serial of a pending resize */
@@ -221,6 +222,7 @@ struct Monitor {
unsigned int seltags;
unsigned int sellt;
uint32_t tagset[2];
+ char **tag_icons;
float mfact;
int gamma_lut_changed;
int nmaster;
@@ -252,6 +254,7 @@ typedef struct {
uint32_t tags;
int isfloating;
int monitor;
+ const char *appicon;
} Rule;
typedef struct {
@@ -313,6 +316,9 @@ static void destroypointerconstraint(struct wl_listener *listener, void *data);
static void destroysessionlock(struct wl_listener *listener, void *data);
static void destroykeyboardgroup(struct wl_listener *listener, void *data);
static Monitor *dirtomon(enum wlr_direction dir);
+static void remove_outer_separators(char **str);
+static void appiconsappend(char **str, const char *appicon, size_t new_size);
+static void applyappicon(char *tag_icons[], int *icons_per_tag, const Client *c);
static void drawbar(Monitor *m);
static void drawbars(void);
static void focusclient(Client *c, int lift);
@@ -520,6 +526,11 @@ applybounds(Client *c, struct wlr_box *bbox)
void
applyrules(Client *c)
{
+ outer_separator_beg = outer_separator_beg ? outer_separator_beg : ' ';
+ outer_separator_end = outer_separator_end ? outer_separator_end : ' ';
+ inner_separator = inner_separator ? inner_separator : ' ';
+ truncate_icons_after = truncate_icons_after > 0 ? truncate_icons_after : 1;
+
/* rule matching */
const char *appid, *title;
uint32_t newtags = 0;
@@ -533,6 +544,8 @@ applyrules(Client *c)
for (r = rules; r < END(rules); r++) {
if ((!r->title || strstr(title, r->title))
&& (!r->id || strstr(appid, r->id))) {
+ /* r->appicon is static, so lifetime is sufficient */
+ c->appicon = (char*) r->appicon;
c->isfloating = r->isfloating;
newtags |= r->tags;
i = 0;
@@ -775,7 +788,7 @@ buttonpress(struct wl_listener *listener, void *data)
(buffer = wlr_scene_buffer_from_node(node)) && buffer == selmon->scene_buffer) {
cx = (cursor->x - selmon->m.x) * selmon->wlr_output->scale;
do
- x += TEXTW(selmon, tags[i]);
+ x += TEXTW(selmon, selmon->tag_icons[i]);
while (cx >= x && ++i < LENGTH(tags));
if (i < LENGTH(tags)) {
click = ClkTagBar;
@@ -905,6 +918,16 @@ cleanupmon(struct wl_listener *listener, void *data)
wlr_output_layout_remove(output_layout, m->wlr_output);
wlr_scene_output_destroy(m->scene_output);
+ for (int i = 0; i < LENGTH(tags); i++) {
+ if (m->tag_icons[i]) free(m->tag_icons[i]);
+ m->tag_icons[i] = NULL;
+ }
+
+ if (m->tag_icons) {
+ free(m->tag_icons);
+ m->tag_icons = NULL;
+ }
+
closemon(m);
wlr_scene_node_destroy(&m->fullscreen_bg->node);
wlr_scene_node_destroy(&m->scene_buffer->node);
@@ -1227,6 +1250,13 @@ createmon(struct wl_listener *listener, void *data)
m->lt[0] = r->lt;
m->lt[1] = &layouts[LENGTH(layouts) > 1 && r->lt != &layouts[1]];
strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof(m->ltsymbol));
+
+ m->tag_icons = (char**) malloc(LENGTH(tags) * sizeof(char*));
+ if (m->tag_icons == NULL) perror("dwm: malloc()");
+ for (int i = 0; i < LENGTH(tags); i++) {
+ m->tag_icons[i] = NULL;
+ }
+
wlr_output_state_set_scale(&state, r->scale);
wlr_output_state_set_transform(&state, r->rr);
break;
@@ -1566,6 +1596,97 @@ dirtomon(enum wlr_direction dir)
return selmon;
}
+void
+remove_outer_separators(char **str)
+{
+ size_t clean_tag_name_len = strlen(*str) - 2;
+
+ char *temp_tag_name = (char*)
+ malloc(clean_tag_name_len + 1);
+
+ if (temp_tag_name == NULL) perror("dwm: malloc()");
+
+ memset(temp_tag_name, 0, clean_tag_name_len + 1);
+
+ char *clean_tag_name_beg = *str + 1;
+ strncpy(temp_tag_name,
+ clean_tag_name_beg,
+ clean_tag_name_len);
+
+ if (*str) free(*str);
+ *str = temp_tag_name;
+}
+
+void
+appiconsappend(char **str, const char *appicon, size_t new_size)
+{
+ char *temp_tag_name = (char*) malloc(new_size);
+ if (temp_tag_name == NULL) perror("dwm: malloc()");
+
+ /* NOTE: Example format of temp_tag_name (with two appicons):
+ * <outer_sep_beg><appicon><inner_sep><appicon><outer_sep_end>
+ */
+ temp_tag_name = memset(temp_tag_name, 0, new_size);
+
+ temp_tag_name[0] = outer_separator_beg;
+ temp_tag_name[new_size - 2] = outer_separator_end;
+
+ strncpy(temp_tag_name + 1, *str, strlen(*str));
+ temp_tag_name[strlen(temp_tag_name)] = inner_separator;
+
+ strncpy(temp_tag_name + strlen(temp_tag_name),
+ appicon, strlen(appicon));
+
+ if (*str) free(*str);
+ *str = temp_tag_name;
+}
+
+void
+applyappicon(char *tag_icons[], int *icons_per_tag, const Client *c)
+{
+ for (unsigned t = 1, i = 0;
+ i < LENGTH(tags);
+ t <<= 1, i++)
+ {
+ if (c->tags & t) {
+ if (icons_per_tag[i] == 0) {
+ if (tag_icons[i]) free(tag_icons[i]);
+ tag_icons[i] = strndup(c->appicon, strlen(c->appicon));
+ } else {
+ char *icon = NULL;
+ if (icons_per_tag[i] < truncate_icons_after)
+ icon = c->appicon;
+ else if (icons_per_tag[i] == truncate_icons_after)
+ icon = truncate_symbol;
+ else {
+ icons_per_tag[i]++;
+ continue;
+ }
+
+ /* remove outer separators from previous iterations
+ * otherwise they get applied recursively */
+ if (icons_per_tag[i] > 1) {
+ remove_outer_separators(&tag_icons[i]);
+ }
+
+ size_t outer_separators_size = 2;
+ size_t inner_separator_size = 1;
+
+ size_t new_size = strlen(tag_icons[i])
+ + outer_separators_size
+ + inner_separator_size
+ + strlen(icon)
+ + 1;
+
+ appiconsappend(&tag_icons[i], icon, new_size);
+ }
+
+ icons_per_tag[i]++;
+ }
+ }
+}
+
+
void
drawbar(Monitor *m)
{
@@ -1588,9 +1709,22 @@ drawbar(Monitor *m)
drwl_text(m->drw, m->b.width - tw, 0, tw, m->b.height, 0, stext, 0);
}
+ int icons_per_tag[LENGTH(tags)];
+ memset(icons_per_tag, 0, LENGTH(tags) * sizeof(int));
+
+ for (int i = 0; i < LENGTH(tags); i++) {
+ /* set each tag to default value */
+ m->tag_icons[i] = strndup(tags[i], strlen(tags[i]));
+ }
+
wl_list_for_each(c, &clients, link) {
if (c->mon != m)
continue;
+
+ if (c->appicon && strlen(c->appicon) > 0) {
+ applyappicon(m->tag_icons, icons_per_tag, c);
+ }
+
occ |= c->tags;
if (c->isurgent)
urg |= c->tags;
@@ -1598,10 +1732,10 @@ drawbar(Monitor *m)
x = 0;
c = focustop(m);
for (i = 0; i < LENGTH(tags); i++) {
- w = TEXTW(m, tags[i]);
+ w = TEXTW(m, m->tag_icons[i]);
drwl_setscheme(m->drw, colors[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
- drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, tags[i], urg & 1 << i);
- if (occ & 1 << i)
+ drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, m->tag_icons[i], urg & 1 << i);
+ if (occ & 1 << i && icons_per_tag[i] ==0)
drwl_rect(m->drw, x + boxs, boxs, boxw, boxw,
m == selmon && c && c->tags & 1 << i,
urg & 1 << i);
--
2.51.1

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -0,0 +1,25 @@
### Description
This patch **requires** the dwl [barconfig](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/bar) patch be applied first! The barconfig patch provides configuration for the dwl bar via the variable
`barlayout`. This determines which of the elements listed below to
display on the bar and in which order:
- 't' -> the tags
- 'l' -> the current layout symbol
- 'n' -> the window name
- 's' -> the status message
- '|' -> elements on the right of this separator will be displayed from
the right
**NOTE**: This patch is a dwl port of the [original](https://dwm.suckless.org/patches/barconfig/) barconfig patch for dwm.
### Known Issues With Patch
Changing the location of the tags breaks the tag button presses (the buttons expect the click in the usual location of the tags). I do not have any plans to look into this, as I ported this patch for the sole purpose of having the option to omit the layout symbol from the bar.
### Download
- [main 2025-10-24](/dwl/dwl-patches/raw/branch/main/patches/barconfig/barconfig.patch)
### Authors - latest at top
- Rumen Mitov
Codeberg: [rumenmitov](https://codeberg.org/rumenmitov)
Email: rumenmitov@protonmail.com

View File

@ -0,0 +1,194 @@
From e733fda4e498c998a104d0d5bb42b9c7373f2c9d Mon Sep 17 00:00:00 2001
From: Rumen <rumenmitov@protonmail.com>
Date: Fri, 24 Oct 2025 09:33:24 +0200
Subject: [PATCH] Barconfig: Configure the dwl bar!
NOTE: This is a port of the original barconfig patch for dwm!
This patch provides configuration for the dwl bar via the variable
`barlayout`. This determines which of the elements listed below to
display on the bar and in which order:
- 't' -> the tags
- 'l' -> the current layout symbol
- 'n' -> the window name
- 's' -> the status message
- '|' -> elements on the right of this separator will be displayed from
the right
---
config.def.h | 1 +
dwl.c | 134 +++++++++++++++++++++++++++++++++++----------------
2 files changed, 93 insertions(+), 42 deletions(-)
diff --git a/config.def.h b/config.def.h
index 1b7472d..c7a33d6 100644
--- a/config.def.h
+++ b/config.def.h
@@ -9,6 +9,7 @@ static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will
static const unsigned int borderpx = 1; /* border pixel of windows */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
+static const char *barlayout = "tln|s";
static const char *fonts[] = {"monospace:size=10"};
static const float rootcolor[] = COLOR(0x000000ff);
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
diff --git a/dwl.c b/dwl.c
index bf340d8..f0d72cf 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1569,10 +1569,10 @@ dirtomon(enum wlr_direction dir)
void
drawbar(Monitor *m)
{
- int x, w, tw = 0;
+ int x = 0, w, tw = 0, moveright = 0;
int boxs = m->drw->font->height / 9;
int boxw = m->drw->font->height / 6 + 2;
- uint32_t i, occ = 0, urg = 0;
+ uint32_t i, j, occ = 0, urg = 0;
Client *c;
Buffer *buf;
@@ -1581,48 +1581,99 @@ drawbar(Monitor *m)
if (!(buf = bufmon(m)))
return;
- /* draw status first so it can be overdrawn by tags later */
- if (m == selmon) { /* status is only drawn on selected monitor */
- drwl_setscheme(m->drw, colors[SchemeNorm]);
- tw = TEXTW(m, stext) - m->lrpad + 2; /* 2px right padding */
- drwl_text(m->drw, m->b.width - tw, 0, tw, m->b.height, 0, stext, 0);
- }
+ if (barlayout[0] == '\0')
+ barlayout = "tln|s";
+
+ drwl_text(m->drw, 0, 0, m->w.width, m->b.height, 0, "", 0); /* draw background */
+
+ for (i = 0; i < strlen(barlayout); i++) {
+ switch (barlayout[i]) {
+ case 'l':
+ w = TEXTW(m, m->ltsymbol);
+ drwl_setscheme(m->drw, colors[SchemeNorm]);
+ if (moveright) {
+ x -= w;
+ drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, m->ltsymbol, 0);
+ } else
+ x = drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, m->ltsymbol, 0);
+ break;
- wl_list_for_each(c, &clients, link) {
- if (c->mon != m)
- continue;
- occ |= c->tags;
- if (c->isurgent)
- urg |= c->tags;
- }
- x = 0;
- c = focustop(m);
- for (i = 0; i < LENGTH(tags); i++) {
- w = TEXTW(m, tags[i]);
- drwl_setscheme(m->drw, colors[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
- drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, tags[i], urg & 1 << i);
- if (occ & 1 << i)
- drwl_rect(m->drw, x + boxs, boxs, boxw, boxw,
- m == selmon && c && c->tags & 1 << i,
- urg & 1 << i);
- x += w;
- }
- w = TEXTW(m, m->ltsymbol);
- drwl_setscheme(m->drw, colors[SchemeNorm]);
- x = drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, m->ltsymbol, 0);
-
- if ((w = m->b.width - tw - x) > m->b.height) {
- if (c) {
- drwl_setscheme(m->drw, colors[m == selmon ? SchemeSel : SchemeNorm]);
- drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, client_get_title(c), 0);
- if (c && c->isfloating)
- drwl_rect(m->drw, x + boxs, boxs, boxw, boxw, 0, 0);
- } else {
- drwl_setscheme(m->drw, colors[SchemeNorm]);
- drwl_rect(m->drw, x, 0, w, m->b.height, 1, 1);
- }
- }
+ case 'n':
+ c = focustop(m);
+
+ if (c) {
+ tw = TEXTW(m, client_get_title(c));
+ if (moveright)
+ x -= tw;
+
+ drwl_setscheme(m->drw, colors[m == selmon ? SchemeSel : SchemeNorm]);
+ drwl_text(m->drw, x, 0, moveright ? tw : m->w.width, m->b.height, m->lrpad / 2, client_get_title(c), 0);
+
+ if (c && c->isfloating)
+ drwl_rect(m->drw, x + boxs, boxs, boxw, boxw, 0, 0);
+
+ } else {
+ drwl_setscheme(m->drw, colors[SchemeNorm]);
+ drwl_rect(m->drw, x, 0, tw, m->b.height, 1, 1);
+ }
+
+ if (!moveright)
+ x += tw;
+ break;
+
+ case 's':
+ if (m == selmon) { /* status is only drawn on selected monitor */
+ drwl_setscheme(m->drw, colors[SchemeNorm]);
+ tw = TEXTW(m, stext) - m->lrpad + 2; /* 2px right padding */
+ if (moveright) {
+ x -= tw;
+ drwl_text(m->drw, x, 0, tw, m->b.height, 0, stext, 0);
+ } else
+ x = drwl_text(m->drw, x, 0, tw, m->b.height, 0, stext, 0);
+ }
+ break;
+
+ case 't':
+ wl_list_for_each(c, &clients, link) {
+ if (c->mon != m)
+ continue;
+ occ |= c->tags;
+ if (c->isurgent)
+ urg |= c->tags;
+ }
+
+ c = focustop(m);
+
+ /* tags */
+ if (moveright) {
+ tw = 0;
+ for (j = 0; j < LENGTH(tags); j++) {
+ tw += TEXTW(m, tags[j]);
+ }
+ x -= tw;
+ }
+ for (j = 0; j < LENGTH(tags); j++) {
+ w = TEXTW(m, tags[j]);
+ drwl_setscheme(m->drw, colors[m->tagset[m->seltags] & 1 << j ? SchemeSel : SchemeNorm]);
+ drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, tags[j], urg & 1 << j);
+ if (occ & 1 << j)
+ drwl_rect(m->drw, x + boxs, boxs, boxw, boxw,
+ m == selmon && c && c->tags & 1 << j,
+ urg & 1 << i);
+ x += w;
+ }
+ if (moveright)
+ x -= tw;
+ break;
+
+ case '|':
+ moveright = 1;
+ x = m->w.width;
+ break;
+ }
+ }
+
wlr_scene_buffer_set_dest_size(m->scene_buffer,
m->b.real_width, m->b.real_height);
wlr_scene_node_set_position(&m->scene_buffer->node, m->m.x,
--
2.51.1

View File

@ -7,21 +7,22 @@ Subject: [PATCH] add default transparency for windows and rules for override
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
Modified-by: Yuki <yukii.senp@gmail.com>
---
config.def.h | 9 ++++++---
dwl.c | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 3 deletions(-)
dwl.c | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/config.def.h b/config.def.h
index 22d2171d..0eb86874 100644
index 95c2afa..808242a 100644
--- a/config.def.h
+++ b/config.def.h
@@ -13,6 +13,7 @@ static const float focuscolor[] = COLOR(0x005577ff);
static const float urgentcolor[] = COLOR(0xff0000ff);
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You can also use glsl colors */
static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You can also use glsl colors */
+static const float default_opacity = 0.75;
/* tagging - TAGCOUNT must be no greater than 31 */
@ -50,7 +51,7 @@ index 22d2171d..0eb86874 100644
{ MODKEY, XKB_KEY_Tab, view, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
diff --git a/dwl.c b/dwl.c
index ad21e1ba..0554fcdf 100644
index 12f441e..f547148 100644
--- a/dwl.c
+++ b/dwl.c
@@ -138,6 +138,7 @@ typedef struct {
@ -85,7 +86,7 @@ index ad21e1ba..0554fcdf 100644
static void setpsel(struct wl_listener *listener, void *data);
static void setsel(struct wl_listener *listener, void *data);
static void setup(void);
@@ -491,6 +495,7 @@ applyrules(Client *c)
@@ -490,6 +494,7 @@ applyrules(Client *c)
if ((!r->title || strstr(title, r->title))
&& (!r->id || strstr(appid, r->id))) {
c->isfloating = r->isfloating;
@ -93,26 +94,7 @@ index ad21e1ba..0554fcdf 100644
newtags |= r->tags;
i = 0;
wl_list_for_each(m, &mons, link) {
@@ -499,6 +504,8 @@ applyrules(Client *c)
}
}
}
+ if (c->scene_surface)
+ wlr_scene_node_for_each_buffer(&c->scene_surface->node, scenebuffersetopacity, c);
setmon(c, mon, newtags);
}
@@ -874,6 +881,9 @@ commitnotify(struct wl_listener *listener, void *data)
resize(c, c->geom, (c->isfloating && !c->isfullscreen));
+ if (c->scene_surface)
+ wlr_scene_node_for_each_buffer(&c->scene_surface->node, scenebuffersetopacity, c);
+
/* mark a pending resize as completed */
if (c->resize && c->resize <= c->surface.xdg->current.configure_serial)
c->resize = 0;
@@ -1120,6 +1130,7 @@ createnotify(struct wl_listener *listener, void *data)
@@ -1127,6 +1132,7 @@ createnotify(struct wl_listener *listener, void *data)
c = toplevel->base->data = ecalloc(1, sizeof(*c));
c->surface.xdg = toplevel->base;
c->bw = borderpx;
@ -120,7 +102,16 @@ index ad21e1ba..0554fcdf 100644
LISTEN(&toplevel->base->surface->events.commit, &c->commit, commitnotify);
LISTEN(&toplevel->base->surface->events.map, &c->map, mapnotify);
@@ -2285,6 +2296,15 @@ run(char *startup_cmd)
@@ -2159,6 +2165,8 @@ rendermon(struct wl_listener *listener, void *data)
/* Render if no XDG clients have an outstanding resize and are visible on
* this monitor. */
wl_list_for_each(c, &clients, link) {
+ wlr_scene_node_for_each_buffer(&c->scene_surface->node, scenebuffersetopacity, c);
+
if (c->resize && !c->isfloating && client_is_rendered_on_mon(c, m) && !client_is_stopped(c))
goto skip;
}
@@ -2295,6 +2303,15 @@ run(char *startup_cmd)
wl_display_run(dpy);
}
@ -136,7 +127,7 @@ index ad21e1ba..0554fcdf 100644
void
setcursor(struct wl_listener *listener, void *data)
{
@@ -2353,6 +2373,7 @@ setfullscreen(Client *c, int fullscreen)
@@ -2363,6 +2380,7 @@ setfullscreen(Client *c, int fullscreen)
* client positions are set by the user and cannot be recalculated */
resize(c, c->prev, 0);
}
@ -144,7 +135,7 @@ index ad21e1ba..0554fcdf 100644
arrange(c->mon);
printstatus();
}
@@ -2409,6 +2430,23 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
@@ -2419,6 +2437,23 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
focusclient(focustop(selmon), 1);
}
@ -168,7 +159,7 @@ index ad21e1ba..0554fcdf 100644
void
setpsel(struct wl_listener *listener, void *data)
{
@@ -3120,6 +3158,7 @@ createnotifyx11(struct wl_listener *listener, void *data)
@@ -3130,6 +3165,7 @@ createnotifyx11(struct wl_listener *listener, void *data)
c->surface.xwayland = xsurface;
c->type = X11;
c->bw = client_is_unmanaged(c) ? 0 : borderpx;
@ -177,5 +168,5 @@ index ad21e1ba..0554fcdf 100644
/* Listen to the various events it can emit */
LISTEN(&xsurface->events.associate, &c->associate, associatex11);
--
2.48.0
2.51.0