]> git.mdlowis.com Git - proto/lwm.git/commitdiff
minor refactoring and removal
authorMichael D. Lowis <mike.lowis@gentex.com>
Mon, 9 Mar 2020 14:20:22 +0000 (10:20 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Mon, 9 Mar 2020 14:20:22 +0000 (10:20 -0400)
lwm.c
lwm.h
manage.c

diff --git a/lwm.c b/lwm.c
index 713de181ab49576bd36c96e378342ab28c04747d..7cb2b5a3d5301b02ae795f2ac7f0f3109ffc7b67 100644 (file)
--- 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 9789bccb7d79af7a29225f9197602c2023aec732..ceb9949a4264fea4e4597011a4a8d48fd141fcc7 100644 (file)
--- 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);
index efa716572daf6a064b215eed6c93034358326878..283ad37c30273c3d64ef0c20ff4c613641581d8a 100644 (file)
--- 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);
         }
     }