/* 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;
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;
initScreens();
- /*
- * Initialisation is finished, but we start off not interacting with the
- * user.
- */
mode = wm_idle;
-
- /*
- * The main event loop.
- */
for (;;)
{
XNextEvent(dpy, &ev);
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. */
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);
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);
}
}