A client is X11-speak for a window. More...
#include <data.h>
Public Types | |
enum | { FLOATING_AUTO_OFF = 0, FLOATING_USER_OFF = 1, FLOATING_AUTO_ON = 2, FLOATING_USER_ON = 3 } |
floating? (= not in tiling layout) This cannot be simply a bool because we want to keep track of whether the status was set by the application (by setting WM_CLASS to tools for example) or by the user. More... | |
enum | { TITLEBAR_TOP = 0, TITLEBAR_LEFT, TITLEBAR_RIGHT, TITLEBAR_BOTTOM, TITLEBAR_OFF } |
Ensure TITLEBAR_TOP maps to 0 because we use calloc for initialization later. More... | |
Public Member Functions | |
CIRCLEQ_ENTRY (Client) clients | |
The following entry provides the necessary list pointers to use Client with LIST_* macros. | |
SLIST_ENTRY (Client) dock_clients | |
SLIST_ENTRY (Client) focus_clients | |
TAILQ_ENTRY (Client) floating_clients | |
Data Fields | |
bool | initialized |
initialized will be set to true if the client was fully initialized by manage_window() and all functions can be used normally | |
Cell | old_position |
if you set a client to floating and set it back to managed, it does remember its old position and *tries* to get back there | |
Container * | container |
Backpointer. | |
Workspace * | workspace |
Because dock clients don’t have a container, we have this workspace-backpointer. | |
Rect | rect |
x, y, width, height of the frame | |
Rect | floating_rect |
Position in floating mode and in tiling mode are saved separately. | |
Rect | child_rect |
x, y, width, height of the child (relative to its frame) | |
int | proportional_height |
contains the size calculated from the hints set by the window or 0 if the client did not send any hints | |
int | proportional_width |
int | base_height |
int | base_width |
int | border_width |
The amount of pixels which X will draw around the client. | |
int | width_increment |
contains the minimum increment size as specified for the window (in pixels). | |
int | height_increment |
int | desired_height |
Height which was determined by reading the _NET_WM_STRUT_PARTIAL top/bottom of the screen reservation. | |
char * | name |
Name (= window title). | |
int | name_len |
name_len stores the real string length (glyphs) of the window title if the client uses _NET_WM_NAME. | |
bool | uses_net_wm_name |
This will be set to true as soon as the first _NET_WM_NAME comes in. | |
char * | window_class_instance |
Holds the WM_CLASS (which consists of two strings, the instance and the class), useful for matching the client in commands. | |
char * | window_class_class |
char * | mark |
Holds the client’s mark, for vim-like jumping. | |
xcb_window_t | leader |
Holds the xcb_window_t (just an ID) for the leader window (logical parent for toolwindows and similar floating windows). | |
bool | fullscreen |
fullscreen is pretty obvious | |
enum Client:: { ... } | floating |
floating? (= not in tiling layout) This cannot be simply a bool because we want to keep track of whether the status was set by the application (by setting WM_CLASS to tools for example) or by the user. | |
enum Client:: { ... } | titlebar_position |
Ensure TITLEBAR_TOP maps to 0 because we use calloc for initialization later. | |
bool | borderless |
Contains a bool specifying whether this window should not be drawn with the usual decorations. | |
bool | dock |
If a client is set as a dock, it is placed at the very bottom of the screen and its requested size is used. | |
bool | urgent |
True if the client set the urgency flag in its WM_HINTS property. | |
bool | force_reconfigure |
bool | awaiting_useless_unmap |
xcb_window_t | frame |
Our window: The frame around the client. | |
xcb_gcontext_t | titlegc |
The titlebar’s graphic context inside the frame. | |
xcb_window_t | child |
The client’s window. |
A client is X11-speak for a window.
Definition at line 342 of file data.h.
anonymous enum |
floating? (= not in tiling layout) This cannot be simply a bool because we want to keep track of whether the status was set by the application (by setting WM_CLASS to tools for example) or by the user.
The user’s choice overwrites automatic mode, of course. The order of the values is important because we check with >= FLOATING_AUTO_ON if a client is floating.
anonymous enum |
Client::CIRCLEQ_ENTRY | ( | Client | ) |
The following entry provides the necessary list pointers to use Client with LIST_* macros.
Client::SLIST_ENTRY | ( | Client | ) |
Client::SLIST_ENTRY | ( | Client | ) |
Client::TAILQ_ENTRY | ( | Client | ) |
Definition at line 445 of file data.h.
Referenced by handle_unmap_notify_event().
Definition at line 371 of file data.h.
Referenced by client_min_height(), handle_normal_hints(), and resize_client().
Definition at line 372 of file data.h.
Referenced by client_min_width(), handle_normal_hints(), and resize_client().
The amount of pixels which X will draw around the client.
Definition at line 375 of file data.h.
Referenced by resize_client().
bool Client::borderless |
Contains a bool specifying whether this window should not be drawn with the usual decorations.
Definition at line 427 of file data.h.
Referenced by client_init_border(), client_min_height(), client_min_width(), decorate_window(), handle_configure_request(), handle_expose_event(), parse_command(), and resize_client().
xcb_window_t Client::child |
The client’s window.
Definition at line 452 of file data.h.
Referenced by client_enter_fullscreen(), client_kill(), client_leave_fullscreen(), client_map(), client_supports_protocol(), client_unmap(), client_warp_pointer_into(), dump_table(), fake_absolute_configure_notify(), handle_configure_request(), handle_hints(), handle_normal_hints(), handle_unmap_notify_event(), ignore_enter_notify_forall(), output_change_mode(), resize_client(), restore_geometry(), set_focus(), toggle_floating_mode(), and workspace_unmap_clients().
x, y, width, height of the child (relative to its frame)
Definition at line 364 of file data.h.
Referenced by fake_absolute_configure_notify(), handle_button_press(), resize_client(), and toggle_floating_mode().
Backpointer.
A client is inside a container
Definition at line 353 of file data.h.
Referenced by client_change_border(), decorate_window(), floating_mod_on_tiled_client(), get_last_focused_client(), handle_button_press(), handle_configure_request(), handle_enter_notify(), handle_expose_event(), handle_normal_hints(), handle_unmap_notify_event(), handle_windowname_change(), handle_windowname_change_legacy(), move_current_window(), move_current_window_in_container(), move_current_window_to_workspace(), parse_command(), parse_resize_command(), redecorate_window(), reparent_window(), resize_client(), set_focus(), and toggle_floating_mode().
Height which was determined by reading the _NET_WM_STRUT_PARTIAL top/bottom of the screen reservation.
Definition at line 384 of file data.h.
Referenced by handle_configure_request(), render_bars(), render_workspace(), and workspace_height().
bool Client::dock |
If a client is set as a dock, it is placed at the very bottom of the screen and its requested size is used.
Definition at line 431 of file data.h.
Referenced by client_toggle_fullscreen(), client_toggle_fullscreen_global(), decorate_window(), handle_button_press(), handle_configure_request(), handle_expose_event(), handle_unmap_notify_event(), handle_windowname_change(), handle_windowname_change_legacy(), move_current_window(), reparent_window(), set_focus(), toggle_floating_mode(), and workspace_show().
enum { ... } Client::floating |
floating? (= not in tiling layout) This cannot be simply a bool because we want to keep track of whether the status was set by the application (by setting WM_CLASS to tools for example) or by the user.
The user’s choice overwrites automatic mode, of course. The order of the values is important because we check with >= FLOATING_AUTO_ON if a client is floating.
Referenced by client_is_floating(), floating_focus_direction(), handle_transient_for(), and toggle_floating_mode().
Position in floating mode and in tiling mode are saved separately.
Definition at line 362 of file data.h.
Referenced by toggle_floating_mode().
Definition at line 440 of file data.h.
Referenced by client_change_border(), client_leave_fullscreen(), handle_normal_hints(), output_change_mode(), render_bars(), render_container(), render_workspace(), reposition_client(), switch_layout_mode(), and workspace_assign_to().
xcb_window_t Client::frame |
Our window: The frame around the client.
Definition at line 448 of file data.h.
Referenced by client_enter_fullscreen(), client_map(), client_set_below_floating(), client_unmap(), decorate_window(), handle_button_press(), handle_expose_event(), handle_unmap_notify_event(), handle_windowname_change(), handle_windowname_change_legacy(), ignore_enter_notify_forall(), move_floating_window_to_workspace(), output_change_mode(), redecorate_window(), render_container(), reposition_client(), resize_client(), set_focus(), switch_layout_mode(), toggle_floating_mode(), and workspace_unmap_clients().
bool Client::fullscreen |
fullscreen is pretty obvious
Definition at line 411 of file data.h.
Referenced by client_enter_fullscreen(), client_leave_fullscreen(), client_toggle_fullscreen(), client_toggle_fullscreen_global(), floating_assign_to_workspace(), floating_move(), handle_button_press(), handle_client_message(), handle_configure_request(), handle_normal_hints(), handle_unmap_notify_event(), move_current_window_to_workspace(), move_floating_window_to_workspace(), and parse_command().
Definition at line 380 of file data.h.
Referenced by handle_normal_hints(), and resize_client().
bool Client::initialized |
initialized will be set to true if the client was fully initialized by manage_window() and all functions can be used normally
xcb_window_t Client::leader |
Holds the xcb_window_t (just an ID) for the leader window (logical parent for toolwindows and similar floating windows).
Definition at line 408 of file data.h.
Referenced by handle_clientleader_change().
char* Client::mark |
Holds the client’s mark, for vim-like jumping.
Definition at line 404 of file data.h.
Referenced by client_mark(), and jump_to_mark().
char* Client::name |
Name (= window title).
Definition at line 387 of file data.h.
Referenced by client_matches_class_name(), decorate_window(), dump_table(), get_matching_client(), handle_unmap_notify_event(), handle_windowname_change(), and handle_windowname_change_legacy().
int Client::name_len |
name_len stores the real string length (glyphs) of the window title if the client uses _NET_WM_NAME.
Otherwise, it is set to -1 to indicate that name should be just passed to X as 8-bit string and therefore will not be rendered correctly. This behaviour is to support legacy applications which do not set _NET_WM_NAME
Definition at line 393 of file data.h.
Referenced by client_matches_class_name(), decorate_window(), handle_windowname_change(), and handle_windowname_change_legacy().
contains the size calculated from the hints set by the window or 0 if the client did not send any hints
Definition at line 368 of file data.h.
Referenced by handle_normal_hints(), and resize_client().
Definition at line 369 of file data.h.
Referenced by handle_normal_hints(), and resize_client().
x, y, width, height of the frame
Definition at line 359 of file data.h.
Referenced by client_warp_pointer_into(), decorate_window(), drag_pointer(), fake_absolute_configure_notify(), floating_border_click(), floating_mod_on_tiled_client(), floating_move(), floating_resize_window(), handle_button_press(), handle_configure_request(), handle_expose_event(), handle_normal_hints(), move_floating_window_to_workspace(), output_change_mode(), parse_resize_command(), redecorate_window(), render_bars(), render_container(), reparent_window(), reposition_client(), resize_client(), restore_geometry(), and toggle_floating_mode().
enum { ... } Client::titlebar_position |
Ensure TITLEBAR_TOP maps to 0 because we use calloc for initialization later.
Referenced by client_init_border(), client_min_height(), client_min_width(), decorate_window(), handle_configure_request(), handle_expose_event(), parse_command(), and resize_client().
xcb_gcontext_t Client::titlegc |
The titlebar’s graphic context inside the frame.
Definition at line 450 of file data.h.
Referenced by decorate_window(), handle_expose_event(), handle_windowname_change(), handle_windowname_change_legacy(), and redecorate_window().
bool Client::urgent |
True if the client set the urgency flag in its WM_HINTS property.
Definition at line 434 of file data.h.
Referenced by decorate_window(), handle_expose_event(), handle_hints(), handle_unmap_notify_event(), set_focus(), and workspace_update_urgent_flag().
This will be set to true as soon as the first _NET_WM_NAME comes in.
If set to true, legacy window names are ignored.
Definition at line 396 of file data.h.
Referenced by handle_windowname_change(), and handle_windowname_change_legacy().
contains the minimum increment size as specified for the window (in pixels).
Definition at line 379 of file data.h.
Referenced by handle_normal_hints(), and resize_client().
Definition at line 401 of file data.h.
Referenced by client_matches_class_name(), get_matching_client(), handle_unmap_notify_event(), and handle_windowclass_change().
Holds the WM_CLASS (which consists of two strings, the instance and the class), useful for matching the client in commands.
Definition at line 400 of file data.h.
Referenced by client_matches_class_name(), get_matching_client(), handle_unmap_notify_event(), and handle_windowclass_change().
Because dock clients don’t have a container, we have this workspace-backpointer.
Definition at line 356 of file data.h.
Referenced by client_enter_fullscreen(), client_set_below_floating(), decorate_window(), floating_assign_to_workspace(), floating_focus_direction(), floating_move(), handle_configure_request(), handle_enter_notify(), handle_hints(), handle_normal_hints(), handle_unmap_notify_event(), handle_windowname_change(), handle_windowname_change_legacy(), jump_to_mark(), jump_to_window(), move_current_window(), move_current_window_to_workspace(), move_floating_window_to_workspace(), parse_command(), parse_resize_command(), reparent_window(), reposition_client(), set_focus(), toggle_floating_mode(), workspace_show(), and workspace_unmap_clients().