i3
scratchpad.h File Reference
#include <config.h>
Include dependency graph for scratchpad.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void scratchpad_move (Con *con)
 Moves the specified window to the __i3_scratch workspace, making it floating and setting the appropriate scratchpad_state.
 
bool scratchpad_show (Con *con)
 Either shows the top-most scratchpad window (con == NULL) or shows the specified con (if it is scratchpad window).
 
void scratchpad_fix_resolution (void)
 When starting i3 initially (and after each change to the connected outputs), this function fixes the resolution of the __i3 pseudo-output.
 

Function Documentation

◆ scratchpad_fix_resolution()

void scratchpad_fix_resolution ( void )

When starting i3 initially (and after each change to the connected outputs), this function fixes the resolution of the __i3 pseudo-output.

When that resolution is not set to a function which shares a common divisor with every active output’s resolution, floating point calculation errors will lead to the scratchpad window moving when shown repeatedly.

Definition at line 249 of file scratchpad.c.

References _lcm(), con_get_output(), croot, DLOG, floating_fix_coordinates(), Rect::height, Con::name, Con::rect, rect_equals(), TAILQ_FOREACH, Rect::width, workspace_get(), Rect::x, and Rect::y.

Referenced by handle_screen_change(), and main().

Here is the call graph for this function:

◆ scratchpad_move()

void scratchpad_move ( Con * con)

Moves the specified window to the __i3_scratch workspace, making it floating and setting the appropriate scratchpad_state.

Gets called upon the command 'move scratchpad'.

Definition at line 19 of file scratchpad.c.

References con_disable_fullscreen(), con_get_workspace(), con_inside_floating(), con_move_to_workspace(), DLOG, floating_enable(), focused, LOG, Con::name, Con::parent, scratchpad_move(), Con::scratchpad_state, TAILQ_FIRST, TAILQ_NEXT, Con::type, and workspace_get().

Referenced by cmd_move_scratchpad(), con_move_to_target(), scratchpad_move(), and scratchpad_show().

Here is the call graph for this function:

◆ scratchpad_show()

bool scratchpad_show ( Con * con)

Either shows the top-most scratchpad window (con == NULL) or shows the specified con (if it is scratchpad window).

When called with con == NULL and the currently focused window is a scratchpad window, this serves as a shortcut to hide it again (so the user can press the same key to quickly look something up).

Definition at line 85 of file scratchpad.c.

References all_cons, CF_NONE, CF_OUTPUT, con_activate(), con_descend_focused(), con_descend_tiling_focused(), con_get_output(), con_get_workspace(), con_inside_floating(), con_is_internal(), con_move_to_workspace(), con_toggle_fullscreen(), DLOG, floating_center(), floating_check_size(), focused, Con::fullscreen_mode, Rect::height, LOG, Con::parent, Con::rect, scratchpad_move(), Con::scratchpad_state, TAILQ_FIRST, TAILQ_FOREACH, Con::type, Rect::width, workspace_get(), and workspace_show().

Referenced by cmd_focus(), cmd_scratchpad_show(), and handle_client_message().

Here is the call graph for this function: