correctly update/display window title/class

This commit is contained in:
Michael Stapelberg
2010-04-13 17:22:34 +02:00
parent bcfb0d2505
commit fd8735a6fd
13 changed files with 114 additions and 95 deletions

View File

@ -48,5 +48,6 @@
#include "con.h"
#include "load_layout.h"
#include "render.h"
#include "window.h"
#endif

View File

@ -247,7 +247,12 @@ struct xoutput {
struct Window {
xcb_window_t id;
const char *class;
const char *class_class;
const char *class_instance;
const char *name_ucs2;
const char *name_utf8;
int name_len;
bool uses_net_wm_name;
};
struct Match {

View File

@ -107,6 +107,7 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_noti
int handle_destroy_notify_event(void *data, xcb_connection_t *conn,
xcb_destroy_notify_event_t *event);
#endif
/**
* Called when a window changes its title
*
@ -114,7 +115,7 @@ int handle_destroy_notify_event(void *data, xcb_connection_t *conn,
int handle_windowname_change(void *data, xcb_connection_t *conn, uint8_t state,
xcb_window_t window, xcb_atom_t atom,
xcb_get_property_reply_t *prop);
#if 0
/**
* We handle legacy window names (titles) which are in COMPOUND_TEXT
* encoding. However, we just pass them along, so when containing non-ASCII

View File

@ -33,6 +33,7 @@ extern TAILQ_HEAD(autostarts_head, Autostart) autostarts;
extern TAILQ_HEAD(assignments_head, Assignment) assignments;
extern SLIST_HEAD(stack_wins_head, Stack_Window) stack_wins;
extern xcb_event_handlers_t evenths;
extern xcb_property_handlers_t prophs;
extern uint8_t root_depth;
extern bool xkb_supported;
extern xcb_atom_t atoms[NUM_ATOMS];

7
include/window.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef _WINDOW_H
#define _WINDOW_H
void window_update_class(i3Window *win, xcb_get_property_reply_t *prop);
void window_update_name(i3Window *win, xcb_get_property_reply_t *prop);
#endif