Client Struct Reference

A client is X11-speak for a window. More...

#include <data.h>

Collaboration diagram for Client:
[legend]

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
Containercontainer
 Backpointer.
Workspaceworkspace
 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.

Detailed Description

A client is X11-speak for a window.

Definition at line 342 of file data.h.


Member Enumeration Documentation

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.

Enumerator:
FLOATING_AUTO_OFF 
FLOATING_USER_OFF 
FLOATING_AUTO_ON 
FLOATING_USER_ON 

Definition at line 419 of file data.h.

anonymous enum

Ensure TITLEBAR_TOP maps to 0 because we use calloc for initialization later.

Enumerator:
TITLEBAR_TOP 
TITLEBAR_LEFT 
TITLEBAR_RIGHT 
TITLEBAR_BOTTOM 
TITLEBAR_OFF 

Definition at line 423 of file data.h.


Member Function Documentation

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   ) 

Field Documentation

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().

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

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().

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().

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().

xcb_window_t Client::frame

Definition at line 380 of file data.h.

Referenced by handle_normal_hints(), and resize_client().

initialized will be set to true if the client was fully initialized by manage_window() and all functions can be used normally

Definition at line 346 of file data.h.

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_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().

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

Definition at line 350 of file data.h.

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().

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().

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().

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().


The documentation for this struct was generated from the following file:

Generated on 2 Jul 2010 for i3 by  doxygen 1.6.1