chore: update c, o files
This commit is contained in:
parent
1a478dc38c
commit
52444dd9ef
BIN
build/atoms.o
BIN
build/atoms.o
Binary file not shown.
BIN
build/panel.o
BIN
build/panel.o
Binary file not shown.
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user