mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-27 10:14:14 +00:00
Fix crash on xwayland (toplevel->activated)
Xwayland clients don't have the same structure. The toplevel->current.activated thing was meant to avoid selclient() in render, but that would require a separate check for xwayland clients, so it isn't worth it any more
This commit is contained in:
parent
13b853d96a
commit
807b2ad2d6
4
dwl.c
4
dwl.c
@ -1642,7 +1642,7 @@ render(struct wlr_surface *surface, int sx, int sy, void *data)
|
|||||||
void
|
void
|
||||||
renderclients(Monitor *m, struct timespec *now)
|
renderclients(Monitor *m, struct timespec *now)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c, *sel = selclient();
|
||||||
const float *color;
|
const float *color;
|
||||||
double ox, oy;
|
double ox, oy;
|
||||||
int i, w, h;
|
int i, w, h;
|
||||||
@ -1673,7 +1673,7 @@ renderclients(Monitor *m, struct timespec *now)
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Draw window borders */
|
/* Draw window borders */
|
||||||
color = (c->surface.xdg->toplevel->current.activated) ? focuscolor : bordercolor;
|
color = (c == sel) ? focuscolor : bordercolor;
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
scalebox(&borders[i], m->wlr_output->scale);
|
scalebox(&borders[i], m->wlr_output->scale);
|
||||||
wlr_render_rect(drw, &borders[i], color,
|
wlr_render_rect(drw, &borders[i], color,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user