From: Michael D. Lowis Date: Mon, 9 Mar 2020 14:20:22 +0000 (-0400) Subject: minor refactoring and removal X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=45a9dc2dee95d4cf7d8d7d216992afe88b860cdb;p=proto%2Flwm.git minor refactoring and removal --- diff --git a/lwm.c b/lwm.c index 713de18..7cb2b5a 100644 --- a/lwm.c +++ b/lwm.c @@ -52,12 +52,9 @@ XFontSetExtents *font_set_ext = NULL; /* Atoms we're interested in. See the ICCCM for more information. */ Atom wm_state; -Atom wm_change_state; Atom wm_protocols; Atom wm_delete; Atom wm_take_focus; -Atom wm_colormaps; -Atom compound_text; char *argv0; @@ -85,14 +82,7 @@ main(int argc, char *argv[]) { wm_protocols = XInternAtom(dpy, "WM_PROTOCOLS", False); wm_delete = XInternAtom(dpy, "WM_DELETE_WINDOW", False); wm_take_focus = XInternAtom(dpy, "WM_TAKE_FOCUS", False); - wm_colormaps = XInternAtom(dpy, "WM_COLORMAP_WINDOWS", False); - compound_text = XInternAtom(dpy, "COMPOUND_TEXT", False); - - /* - * Get fonts for our titlebar and our popup window. We try to - * get Lucida, but if we can't we make do with fixed because everyone - * has that. - */ + { /* FIXME: do these need to be freed? */ char **missing; @@ -115,15 +105,7 @@ main(int argc, char *argv[]) { initScreens(); - /* - * Initialisation is finished, but we start off not interacting with the - * user. - */ mode = wm_idle; - - /* - * The main event loop. - */ for (;;) { XNextEvent(dpy, &ev); diff --git a/lwm.h b/lwm.h index 9789bcc..ceb9949 100644 --- a/lwm.h +++ b/lwm.h @@ -65,7 +65,6 @@ typedef enum { typedef struct ScreenInfo ScreenInfo; struct ScreenInfo { Window root; - Window ewmh_compat; int display_width; /* The width of the screen. */ int display_height; /* The height of the screen. */ GC gc; /* The default GC. */ @@ -124,11 +123,9 @@ extern ScreenInfo * current_screen; extern XFontSet font_set; extern XFontSetExtents *font_set_ext; extern Atom wm_state; -extern Atom wm_change_state; extern Atom wm_protocols; extern Atom wm_delete; extern Atom wm_take_focus; -extern Atom compound_text; extern char *argv0; extern void sendConfigureNotify(Client *); extern int titleHeight(void); diff --git a/manage.c b/manage.c index efa7165..283ad37 100644 --- a/manage.c +++ b/manage.c @@ -276,15 +276,7 @@ getWindowName(Client *c) { if (ewmh_get_window_name(c) == False) { if (XGetWindowProperty(dpy, c->window, XA_WM_NAME, 0L, 100L, False, AnyPropertyType, &actual_type, &format, &n, &extra, (unsigned char **) &name) == Success && name && *name != '\0' && n != 0) { - /* That rather unpleasant condition is necessary because xwsh uses - * COMPOUND_TEXT rather than STRING for its WM_NAME property, - * and anonymous xwsh windows are annoying. - */ - if (actual_type == compound_text && memcmp(name, "\x1b\x28\x42", 3) == 0) { - Client_Name(c, name + 3); - } else { - Client_Name(c, name); - } + Client_Name(c, name); XFree(name); } }