i3
|
Go to the source code of this file.
Macros | |
#define | ASSIGN_IF_CHANGED(original, new) |
#define | MWM_HINTS_FLAGS_FIELD 0 |
#define | MWM_HINTS_DECORATIONS_FIELD 2 |
#define | MWM_HINTS_DECORATIONS (1 << 1) |
#define | MWM_DECOR_ALL (1 << 0) |
#define | MWM_DECOR_BORDER (1 << 1) |
#define | MWM_DECOR_TITLE (1 << 3) |
Functions | |
void | window_free (i3Window *win) |
Frees an i3Window and all its members. | |
void | window_update_class (i3Window *win, xcb_get_property_reply_t *prop) |
Updates the WM_CLASS (consisting of the class and instance) for the given window. | |
void | window_update_name (i3Window *win, xcb_get_property_reply_t *prop) |
Updates the name by using _NET_WM_NAME (encoded in UTF-8) for the given window. | |
void | window_update_name_legacy (i3Window *win, xcb_get_property_reply_t *prop) |
Updates the name by using WM_NAME (encoded in COMPOUND_TEXT). | |
void | window_update_leader (i3Window *win, xcb_get_property_reply_t *prop) |
Updates the CLIENT_LEADER (logical parent window). | |
void | window_update_transient_for (i3Window *win, xcb_get_property_reply_t *prop) |
Updates the TRANSIENT_FOR (logical parent window). | |
void | window_update_strut_partial (i3Window *win, xcb_get_property_reply_t *prop) |
Updates the _NET_WM_STRUT_PARTIAL (reserved pixels at the screen edges) | |
void | window_update_role (i3Window *win, xcb_get_property_reply_t *prop) |
Updates the WM_WINDOW_ROLE. | |
void | window_update_type (i3Window *window, xcb_get_property_reply_t *reply) |
Updates the _NET_WM_WINDOW_TYPE property. | |
bool | window_update_normal_hints (i3Window *win, xcb_get_property_reply_t *reply, xcb_get_geometry_reply_t *geom) |
Updates the WM_NORMAL_HINTS. | |
void | window_update_hints (i3Window *win, xcb_get_property_reply_t *prop, bool *urgency_hint) |
Updates the WM_HINTS (we only care about the input focus handling part). | |
static border_style_t | border_style_from_motif_value (uint32_t value) |
bool | window_update_motif_hints (i3Window *win, xcb_get_property_reply_t *prop, border_style_t *motif_border_style) |
Updates the MOTIF_WM_HINTS. | |
void | window_update_machine (i3Window *win, xcb_get_property_reply_t *prop) |
Updates the WM_CLIENT_MACHINE. | |
void | window_update_icon (i3Window *win, xcb_get_property_reply_t *prop) |
Updates the _NET_WM_ICON. | |
#define ASSIGN_IF_CHANGED | ( | original, | |
new ) |
Referenced by window_update_normal_hints().
#define MWM_DECOR_ALL (1 << 0) |
Definition at line 417 of file window.c.
Referenced by border_style_from_motif_value().
#define MWM_DECOR_BORDER (1 << 1) |
Definition at line 418 of file window.c.
Referenced by border_style_from_motif_value().
#define MWM_DECOR_TITLE (1 << 3) |
Definition at line 419 of file window.c.
Referenced by border_style_from_motif_value().
#define MWM_HINTS_DECORATIONS (1 << 1) |
Definition at line 416 of file window.c.
Referenced by window_update_motif_hints().
#define MWM_HINTS_DECORATIONS_FIELD 2 |
Definition at line 414 of file window.c.
Referenced by window_update_motif_hints().
#define MWM_HINTS_FLAGS_FIELD 0 |
Definition at line 413 of file window.c.
Referenced by window_update_motif_hints().
|
static |
Definition at line 421 of file window.c.
References BS_NONE, BS_NORMAL, BS_PIXEL, MWM_DECOR_ALL, MWM_DECOR_BORDER, and MWM_DECOR_TITLE.
Referenced by window_update_motif_hints().
void window_free | ( | i3Window * | win | ) |
Frees an i3Window and all its members.
Definition at line 18 of file window.c.
References Window::class_class, Window::class_instance, FREE, i3string_free(), Window::icon, Window::machine, Window::name, Window::ran_assignments, and Window::role.
Referenced by manage_window(), remanage_window(), and tree_close_internal().
void window_update_class | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop ) |
Updates the WM_CLASS (consisting of the class and instance) for the given window.
Definition at line 34 of file window.c.
References Window::class_class, Window::class_instance, DLOG, FREE, LOG, and sstrndup().
Referenced by handle_class_change(), and manage_window().
void window_update_hints | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop, | ||
bool * | urgency_hint ) |
Updates the WM_HINTS (we only care about the input focus handling part).
Definition at line 378 of file window.c.
References DLOG, Window::doesnt_accept_focus, FREE, and LOG.
Referenced by handle_hints(), and manage_window().
void window_update_icon | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop ) |
Updates the _NET_WM_ICON.
Definition at line 520 of file window.c.
References DLOG, FREE, Window::icon, logical_px(), Window::name_x_changed, render_deco_height(), and smalloc().
Referenced by handle_windowicon_change(), and manage_window().
void window_update_leader | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop ) |
Updates the CLIENT_LEADER (logical parent window).
Definition at line 143 of file window.c.
References DLOG, FREE, Window::id, and Window::leader.
Referenced by handle_clientleader_change(), and manage_window().
void window_update_machine | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop ) |
Updates the WM_CLIENT_MACHINE.
Definition at line 506 of file window.c.
References DLOG, FREE, LOG, Window::machine, and sstrndup().
Referenced by handle_machine_change(), and manage_window().
bool window_update_motif_hints | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop, | ||
border_style_t * | motif_border_style ) |
Updates the MOTIF_WM_HINTS.
The container's border style should be set to ‘motif_border_style’ if border style is not BS_NORMAL.
i3 only uses this hint when it specifies a window should have no title bar, or no decorations at all, which is how most window managers handle it.
The EWMH spec intended to replace Motif hints with _NET_WM_WINDOW_TYPE, but it is still in use by popular widget toolkits such as GTK+ and Java AWT.
Definition at line 464 of file window.c.
References border_style_from_motif_value(), FREE, MWM_HINTS_DECORATIONS, MWM_HINTS_DECORATIONS_FIELD, and MWM_HINTS_FLAGS_FIELD.
Referenced by handle_motif_hints_change(), and manage_window().
void window_update_name | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop ) |
Updates the name by using _NET_WM_NAME (encoded in UTF-8) for the given window.
Further updates using window_update_name_legacy will be ignored.
Definition at line 68 of file window.c.
References con_by_window_id(), con_parse_title_format(), DLOG, ewmh_update_visible_name(), FREE, i3string_as_utf8(), I3STRING_FREE, i3string_free(), i3string_from_utf8(), Window::id, LOG, Window::name, Window::name_x_changed, sstrndup(), Con::title_format, and Window::uses_net_wm_name.
Referenced by handle_windowname_change(), and manage_window().
void window_update_name_legacy | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop ) |
Updates the name by using WM_NAME (encoded in COMPOUND_TEXT).
We do not touch what the client sends us but pass it to xcb_image_text_8. To get proper unicode rendering, the application has to use _NET_WM_NAME (see window_update_name()).
Definition at line 104 of file window.c.
References con_by_window_id(), con_parse_title_format(), DLOG, ewmh_update_visible_name(), FREE, i3string_as_utf8(), I3STRING_FREE, i3string_free(), i3string_from_utf8(), Window::id, LOG, Window::name, Window::name_x_changed, sstrndup(), Con::title_format, and Window::uses_net_wm_name.
Referenced by handle_windowname_change_legacy(), and manage_window().
bool window_update_normal_hints | ( | i3Window * | win, |
xcb_get_property_reply_t * | reply, | ||
xcb_get_geometry_reply_t * | geom ) |
Updates the WM_NORMAL_HINTS.
Definition at line 257 of file window.c.
References ASSIGN_IF_CHANGED, Window::base_height, Window::base_width, conn, DLOG, Window::height_increment, Window::id, max(), Window::max_aspect_ratio, Window::max_height, Window::max_width, Window::min_aspect_ratio, Window::min_height, Window::min_width, and Window::width_increment.
Referenced by handle_normal_hints(), and manage_window().
void window_update_role | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop ) |
Updates the WM_WINDOW_ROLE.
Definition at line 218 of file window.c.
References DLOG, FREE, LOG, Window::role, and sasprintf().
Referenced by handle_windowrole_change(), and manage_window().
void window_update_strut_partial | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop ) |
Updates the _NET_WM_STRUT_PARTIAL (reserved pixels at the screen edges)
Definition at line 193 of file window.c.
References DLOG, FREE, and Window::reserved.
Referenced by handle_strut_partial_change(), and manage_window().
void window_update_transient_for | ( | i3Window * | win, |
xcb_get_property_reply_t * | prop ) |
Updates the TRANSIENT_FOR (logical parent window).
Definition at line 168 of file window.c.
References DLOG, FREE, Window::id, and Window::transient_for.
Referenced by handle_transient_for(), and manage_window().
void window_update_type | ( | i3Window * | window, |
xcb_get_property_reply_t * | reply ) |
Updates the _NET_WM_WINDOW_TYPE property.
Definition at line 239 of file window.c.
References DLOG, LOG, run_assignments(), Window::window_type, and xcb_get_preferred_window_type().
Referenced by handle_window_type().