18 #define DRAGGING_CB(name) \
19 static void name(Con *con, Rect *old_rect, uint32_t new_x, \
20 uint32_t new_y, const void *extra)
86 void floating_assign_to_workspace(Client *client, Workspace *new_workspace);
94 int floating_border_click(xcb_connection_t *
conn, Client *client,
95 xcb_button_press_event_t *event);
129 void floating_focus_direction(xcb_connection_t *
conn, Client *currently_focused,
136 void floating_move(xcb_connection_t *
conn, Client *currently_focused,
144 void floating_toggle_hide(xcb_connection_t *
conn, Workspace *workspace);
179 xcb_window_t confine_to,
border_t border,
int cursor,
void floating_disable(Con *con, bool automatic)
Disables floating mode for the given container by re-attaching the container to its old parent...
drag_result_t drag_pointer(Con *con, const xcb_button_press_event_t *event, xcb_window_t confine_to, border_t border, int cursor, callback_t callback, const void *extra)
This function grabs your pointer and keyboard and lets you drag stuff around (borders).
void floating_enable(Con *con, bool automatic)
Enables floating mode for the given container by detaching it from its parent, creating a new contain...
void floating_drag_window(Con *con, const xcb_button_press_event_t *event)
Called when the user clicked on the titlebar of a floating window.
border_t
On which border was the dragging initiated?
void floating_resize_window(Con *con, const bool proportional, const xcb_button_press_event_t *event)
Called when the user clicked on a floating window while holding the floating_modifier and the right m...
void floating_reposition(Con *con, Rect newrect)
Repositions the CT_FLOATING_CON to have the coordinates specified by newrect, but only if the coordin...
xcb_connection_t * conn
XCB connection and root screen.
void floating_center(Con *con, Rect rect)
Centers a floating con above the specified rect.
bool floating_maybe_reassign_ws(Con *con)
Checks if con’s coordinates are within its workspace and re-assigns it to the actual workspace if not...
void floating_raise_con(Con *con)
Raises the given container in the list of floating containers.
void toggle_floating_mode(Con *con, bool automatic)
Calls floating_enable() for tiling containers and floating_disable() for floating containers...
Stores a rectangle, for example the size of a window, the child window etc.
drag_result_t
This is the return value of a drag operation like drag_pointer.
A 'Con' represents everything from the X11 root window down to a single X11 window.
void floating_move_to_pointer(Con *con)
Moves the given floating con to the current pointer position.
void(* callback_t)(Con *, Rect *, uint32_t, uint32_t, const void *)
Callback for dragging.
void floating_check_size(Con *floating_con)
Called when a floating window is created or resized.
void floating_resize(Con *floating_con, int x, int y)
Sets size of the CT_FLOATING_CON to specified dimensions.
void floating_fix_coordinates(Con *con, Rect *old_rect, Rect *new_rect)
Fixes the coordinates of the floating window whenever the window gets reassigned to a different outpu...