]> git.sur5r.net Git - i3/i3/blob - include/client.h
Bugfix: Correctly handle moving fullscreen client onto another screen (Thanks dirkson)
[i3/i3] / include / client.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * (c) 2009 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  */
11 #include <xcb/xcb.h>
12
13 #include "data.h"
14
15 #ifndef _CLIENT_H
16 #define _CLIENT_H
17
18 /**
19  * Removes the given client from the container, either because it will be inserted into another
20  * one or because it was unmapped
21  *
22  */
23 void client_remove_from_container(xcb_connection_t *conn, Client *client, Container *container, bool remove_from_focusstack);
24
25 /**
26  * Warps the pointer into the given client (in the middle of it, to be specific), therefore
27  * selecting it
28  *
29  */
30 void client_warp_pointer_into(xcb_connection_t *conn, Client *client);
31
32 /**
33  * Kills the given window using WM_DELETE_WINDOW or xcb_kill_window
34  *
35  */
36 void client_kill(xcb_connection_t *conn, Client *window);
37
38 /**
39  * Checks if the given window class and title match the given client
40  * Window title is passed as "normal" string and as UCS-2 converted string for
41  * matching _NET_WM_NAME capable clients as well as those using legacy hints.
42  *
43  */
44 bool client_matches_class_name(Client *client, char *to_class, char *to_title,
45                                char *to_title_ucs, int to_title_ucs_len);
46
47 /**
48  * Enters fullscreen mode for the given client. This is called by toggle_fullscreen
49  * and when moving a fullscreen client to another screen.
50  *
51  */
52 void client_enter_fullscreen(xcb_connection_t *conn, Client *client);
53
54 /**
55  * Toggles fullscreen mode for the given client. It updates the data structures and
56  * reconfigures (= resizes/moves) the client and its frame to the full size of the
57  * screen. When leaving fullscreen, re-rendering the layout is forced.
58  *
59  */
60 void client_toggle_fullscreen(xcb_connection_t *conn, Client *client);
61
62 /**
63  * Sets the position of the given client in the X stack to the highest (tiling layer is always
64  * on the same position, so this doesn’t matter) below the first floating client, so that
65  * floating windows are always on top.
66  *
67  */
68 void client_set_below_floating(xcb_connection_t *conn, Client *client);
69
70 /**
71  * Returns true if the client is floating. Makes the code more beatiful, as floating
72  * is not simply a boolean, but also saves whether the user selected the current state
73  * or whether it was automatically set.
74  *
75  */
76 bool client_is_floating(Client *client);
77
78 #endif