chore: update c, o files

This commit is contained in:
retoor 2026-01-16 05:41:39 +01:00
parent 1a478dc38c
commit 52444dd9ef
5 changed files with 10 additions and 5 deletions

BIN
bin/dwn

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -325,18 +325,18 @@ char *atoms_get_window_name(Window window)
unsigned char *data = NULL;
if (XGetWindowProperty(dpy, window, ewmh.NET_WM_NAME,
0, 256, False, misc_atoms.UTF8_STRING,
0, 256, False, AnyPropertyType,
&actual_type, &actual_format, &nitems, &bytes_after,
&data) == Success && data != NULL) {
&data) == Success && data != NULL && nitems > 0) {
char *name = dwn_strdup((char *)data);
XFree(data);
return name;
}
if (XGetWindowProperty(dpy, window, icccm.WM_NAME,
0, 256, False, XA_STRING,
0, 256, False, AnyPropertyType,
&actual_type, &actual_format, &nitems, &bytes_after,
&data) == Success && data != NULL) {
&data) == Success && data != NULL && nitems > 0) {
char *name = dwn_strdup((char *)data);
XFree(data);
return name;

View File

@ -550,7 +550,12 @@ void panel_handle_click(Panel *panel, int x, int y, int button)
if (client_is_minimized(c)) {
client_restore(c);
} else {
client_focus(c);
Workspace *ws = workspace_get(dwn->current_workspace);
if (ws != NULL && ws->focused == c) {
client_minimize(c);
} else {
client_focus(c);
}
}
} else if (button == 3) {
client_close(c);