wm

My window manager
git clone git://pcardenasb.com/wm
Log | Files | Refs

commit 1fbbf1502c48eefbedb42d4fc941cfb2ff7eabba
parent 14ab6805e8690f4f6bd67102ad754b2b107747eb
Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe>
Date:   Mon, 30 Dec 2024 03:35:02 -0500

Removed ActiveWindow and ClientList

Diffstat:
Mpwm.c | 13-------------
1 file changed, 0 insertions(+), 13 deletions(-)

diff --git a/pwm.c b/pwm.c @@ -90,10 +90,8 @@ int main(void) XInternAtom(dpy, "_NET_WM_STATE", False), XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False), XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False), - XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False), XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False), XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False), - XInternAtom(dpy, "_NET_CLIENT_LIST", False), }; XChangeProperty(dpy, root, netatom[0], XA_ATOM, 32, PropModeReplace, (unsigned char *)netatom, sizeof(netatom) / sizeof(Atom)); @@ -101,8 +99,6 @@ int main(void) // Scan existing windows // /////////////////////////// - Atom NetClientList = XInternAtom(dpy, "_NET_CLIENT_LIST", False); - XDeleteProperty(dpy, root, NetClientList); { Window d1, d2; Window *wins; @@ -118,7 +114,6 @@ int main(void) XSetWindowBorderWidth(dpy, wins[i], BORDER_WIDTH); XSetWindowBorder(dpy, wins[i], BORDER_COLOR); XSelectInput(dpy, wins[i], EnterWindowMask | FocusChangeMask | PropertyChangeMask | StructureNotifyMask); - XChangeProperty(dpy, root, NetClientList, XA_WINDOW, 32, PropModeAppend, (unsigned char *)&wins[i], 1); } } } @@ -130,7 +125,6 @@ int main(void) /////////////// XWindowAttributes pressed_wa; XButtonEvent start = {.subwindow = None}; - Atom NetActiveWindow = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False); XSync(dpy, False); for (;;) { @@ -152,7 +146,6 @@ int main(void) XSetWindowBorderWidth(dpy, ev.xmaprequest.window, BORDER_WIDTH); XSetWindowBorder(dpy, ev.xmaprequest.window, BORDER_COLOR); XSelectInput(dpy, ev.xmaprequest.window, EnterWindowMask | FocusChangeMask | PropertyChangeMask | StructureNotifyMask); - XChangeProperty(dpy, root, NetClientList, XA_WINDOW, 32, PropModeAppend, (unsigned char *)&ev.xmaprequest.window, 1); } XMapWindow(dpy, ev.xmaprequest.window); fprintf(stderr, "%d: XMapRequestEvent %lu, num_windows: %d\n", ev.type, ev.xmaprequest.window, num_windows); @@ -165,10 +158,6 @@ int main(void) break; } } - XDeleteProperty(dpy, root, NetClientList); - for (int i = 0; i < num_windows; i++) { - XChangeProperty(dpy, root, NetClientList, XA_WINDOW, 32, PropModeAppend, (unsigned char *)&windows[i], 1); - } current_index = current_index % num_windows; fprintf(stderr, "%d: XUnmapEvent %lu, num_windows = %d\n", ev.type, ev.xunmap.window, num_windows); break; @@ -244,7 +233,6 @@ int main(void) XSetInputFocus(dpy, windows[current_index], RevertToParent, CurrentTime); XRaiseWindow(dpy, windows[current_index]); XSetWindowBorder(dpy, windows[current_index], 0xAAAAAA); - XChangeProperty(dpy, root, NetActiveWindow, XA_WINDOW, 32, PropModeReplace, (unsigned char *)&windows[current_index], 1); XClientMessageEvent send_ev = { .type = ClientMessage, .window = windows[current_index], @@ -260,7 +248,6 @@ int main(void) XSetInputFocus(dpy, windows[current_index], RevertToParent, CurrentTime); XRaiseWindow(dpy, windows[current_index]); XSetWindowBorder(dpy, windows[current_index], 0xAAAAAA); - XChangeProperty(dpy, root, NetActiveWindow, XA_WINDOW, 32, PropModeReplace, (unsigned char *)&windows[current_index], 1); XClientMessageEvent send_ev = { .type = ClientMessage, .window = windows[current_index],