]> git.sur5r.net Git - i3/i3/blob - include/floating.h
Correctly re-assign floating clients to the destination workspace when moving
[i3/i3] / include / floating.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * © 2009 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  */
11 #ifndef _FLOATING_H
12 #define _FLOATING_H
13
14 /**
15  * Enters floating mode for the given client.
16  * Correctly takes care of the position/size (separately stored for tiling/floating mode)
17  * and repositions/resizes/redecorates the client.
18  *
19  * If the automatic flag is set to true, this was an automatic update by a change of the
20  * window class from the application which can be overwritten by the user.
21  *
22  */
23 void toggle_floating_mode(xcb_connection_t *conn, Client *client, bool automatic);
24
25 /**
26  * Removes the floating client from its workspace and attaches it to the new workspace.
27  * This is centralized here because it may happen if you move it via keyboard and
28  * if you move it using your mouse.
29  *
30  */
31 void floating_assign_to_workspace(Client *client, Workspace *new_workspace);
32
33 /**
34  * Called whenever the user clicks on a border (not the titlebar!) of a floating window.
35  * Determines on which border the user clicked and launches the drag_pointer function
36  * with the resize_callback.
37  *
38  */
39 int floating_border_click(xcb_connection_t *conn, Client *client, xcb_button_press_event_t *event);
40
41 /**
42  * Called when the user clicked on the titlebar of a floating window.
43  * Calls the drag_pointer function with the drag_window callback
44  *
45  */
46 void floating_drag_window(xcb_connection_t *conn, Client *client, xcb_button_press_event_t *event);
47
48 /**
49  * Changes focus in the given direction for floating clients.
50  *
51  * Changing to the left/right means going to the previous/next floating client,
52  * changing to top/bottom means cycling through the Z-index.
53  *
54  */
55 void floating_focus_direction(xcb_connection_t *conn, Client *currently_focused, direction_t direction);
56
57 /**
58  * Moves the client 10px to the specified direction.
59  *
60  */
61 void floating_move(xcb_connection_t *conn, Client *currently_focused, direction_t direction);
62
63 /**
64  * Hides all floating clients (or show them if they are currently hidden) on
65  * the specified workspace.
66  *
67  */
68 void floating_toggle_hide(xcb_connection_t *conn, Workspace *workspace);
69
70 #endif