aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2018-09-18swaybar: rewrite protocol determinationIan Fan
This now uses the getline function to receive the header, replacing read_line_buffer, which has been deleted since it is otherwise unused. Furthermore, once the protocol has been determined, the current status is handled immediately to be shown (though this has not been added for the i3bar protocol since it has not yet been rewritten to handle this).
2018-09-08Align titles to baselineRyan Dwyer
This does the following: * Adds a baseline argument to get_text_size (the baseline is the distance from the top of the texture to the baseline). * Stores the baseline in the container when calculating the title height. * Takes the baseline into account when calculating the config's max font height. * When rendering, pads the textures according to the baseline so they line up.
2018-09-02prevent ub caused by misaligned stores/loadstaiyu
2018-09-01Allow reload command to exist anywhere in the command stringRyan Dwyer
This fixes a crash if you have commands where reload appears in the middle or at the end, such as `bindsym r mode default, reload`.
2018-08-26Remove layout.cRyan Dwyer
When we have type safety we'll need to have functions for workspace_add_tiling and so on. This means the existing container functions will be just for containers, so they are being moved to container.c. At this point layout.c doesn't contain much else, so I've relocated everything and removed the file. * container_swap and its static functions have been moved to the swap command and made static. * container_recursive_resize has been moved to the resize command and made static. * The following have been moved to container.c: * container_handle_fullscreen_reparent * container_insert_child * container_add_sibling * container_add_child * container_remove_child * container_replace_child * container_split * enum movement_direction and sway_dir_to_wlr have been moved to util.c. Side note: Several commands included layout.h which then included root.h. With layout.h gone, root.h has to be included by those commands.
2018-08-15Use list_find in more places and refactor/fix workspace prev_next functionsRyan Dwyer
The original purpose of this commit is to replace some for loops with list_find. But while doing this I found the workspace_prev_next_impl functions to be difficult to read and also contained a bug, so I refactored them and fixed the bug. To reproduce the bug: * Have two outputs, where the left output has workspaces 1, 2, 3 and the right output has workspaces 4, 5, 6. Make workspace 2 focused_inactive and workspace 4 focused. * Run `workspace prev`. * Previously it would visit the left output, then apply `workspace prev` to workspace 2, which focuses workspace 1. * Now it will focus the rightmost workspace on the left output (workspace 3). The refactoring I made to the workspace functions are: * Added the static keyword. * They now accept an int dir rather than bool, to avoid an unnecessary conversion. * Rather than preparing start and end variables for the purpose of iterating, just iterate everything. * Replace for loops with list_find. * Don't call workspace_output_prev_next_impl (this fixes the bug).
2018-08-12Implement resizing tiled containers via cursorRyan Dwyer
* The OP_RESIZE seat operation has been renamed to OP_RESIZE_FLOATING, and OP_RESIZE_TILING has been introduced. * Similar to the above, seat_begin_resize and handle_resize_motion have been renamed and tiling variants introduced. * resize.c's resize_tiled has to be used, so container_resize_tiled has been introduced in resize.c to allow external code to call it.
2018-08-06ipc-client: fix memory leaks in get_socketpathIan Fan
2018-07-23Address review comments on parse_booleanBrian Ashworth
2018-07-23Remove unneeded constBrian Ashworth
2018-07-23Switch to using a function to parse booleansBrian Ashworth
2018-07-11Move floating windows to front when focusedRyan Dwyer
2018-07-09Update for swaywm/wlroots#1126emersion
2018-07-02utf8_size: fix loop boundaryDominique Martinet
Found through static analysis
2018-07-02get_parent_pid: fix memory leakDominique Martinet
Found through static analysis.
2018-06-02Fix infinite loop in peek_line for EOF blanksBrian Ashworth
2018-06-02Address emersion's feedback on peek_lineBrian Ashworth
2018-06-02Fix condition in peek_lineBrian Ashworth
2018-06-02Address first round of review for generic blocksBrian Ashworth
2018-06-02Support braces on next line for config blocksBrian Ashworth
2018-05-25Clean up container title functionsRyan Dwyer
* Add and use lenient_strcat and lenient_strncat functions * Rename `concatenate_child_titles` function as that's no longer what it does * Rename `container_notify_child_title_changed` because we only need to notify that the tree structure has changed, not titles * Don't notify parents when a child changes its title * Update ancestor titles when changing a container's layout * Eg. create nested tabs and change the inner container to stacking * No need to store tree presentation in both container->name and formatted_title
2018-05-16Change scale from int32_t to double for pangoBrian Ashworth
2018-05-13Fix pango markupemersion
The condition checking if the markup is valid was inverted. This commit also adds better error handling: if the markup cannot be parsed, it fallbacks to plain text.
2018-05-13Fix crash when using pango markup fontHeghedus Razvan
The characters & < > ' " needs to be escaped when using pango markup Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2018-04-13Fix gcc string truncation warningsDominique Martinet
2018-04-04R E N D E R I N GDrew DeVault
2018-04-04Add password buffer, refactor rendering/surfacesDrew DeVault
2018-04-04Initial swaylock portDrew DeVault
2018-04-04Move swaybg background rendering into common/Drew DeVault
swaylock will use it too
2018-04-02Fix use-after-free with block hotspotsDrew DeVault
2018-03-29Use statically allocated text bufferDrew DeVault
2018-03-29Start port of swaybar to layer shellDrew DeVault
This starts up the event loop and wayland display and shims out the basic top level rendering concepts. Also includes some changes to incorporate pango into the 1.x codebase properly.
2018-03-29Allow sway IPC clients to fall back to i3 socketDrew DeVault
2018-03-28Address review commentsDrew DeVault
2018-03-28Add solid-color rendering to swaybgDrew DeVault
2018-01-05common/log: finish removing most log functionsDominique Martinet
Keep sway_abort and sway_assert and convert them to use wlr_log functions
2018-01-05sway: change all sway_log to wlr_logDominique Martinet
2017-12-19build: add wlroots dependency to commonDominique Martinet
It is required for include path if wlroots is not built in standard path, but found through pkg-config
2017-11-30remove relevant CMakeLists.txtTony Crisci
2017-11-30meson: common static libraryTony Crisci
2017-11-30use meson subdirectoriesTony Crisci
2017-11-23common/util: replace WLC_BIT_MOD_* by WLR_MODIFIER_*Dominique Martinet
This removes the last wlc/wlc.h include actually in use
2017-11-18Move everything to sway/old/Drew DeVault
2017-10-20Print log level even if STDERR is not a ttyCalvin Lee
Makes reading debug logs much easier, debug lines will start with `E`, info lines with `I` and error lines with `E`.
2017-06-06FreeBSD fixesjohalun
Increase _POSIX_SOURCE value where needed. Increase _XOPEN_SOURCE value where needed. Conditionally link to libcap (only on Linux). Possibly some trailing whitespace fixes (automatic).
2017-05-11Replace spaces with tabs in resolve_pathMykyta Holubakha
2017-04-26Fix link to dotfiles, closes #1193Drew DeVault
2017-04-20Make sway_abort() report locationJerzi Kaminsky
2017-04-16Add resolve_path() to utilsJerzi Kaminsky
2017-04-16Fix location reported by sway_assertJerzi Kaminsky