summaryrefslogtreecommitdiffstats
path: root/sway
Commit message (Collapse)AuthorAge
* swaybar: fix setting binding mode indicatorLibravatar Ian Fan2018-09-28
|
* Check for NULL output in workspace_valid_on_outputLibravatar Ryan Dwyer2018-09-28
|
* Rename workspace_outputs to workspace_configs and fix memory leakLibravatar Ryan Dwyer2018-09-28
| | | | | | | | | | | | | | | When we eventually implement `workspace <ws> gaps inner|outer <px>`, we'll need to store the gaps settings for workspaces before they're created. Rather than create a workspace_gaps struct, the approach I'm taking is to rename workspace_outputs to workspace_configs and then add gaps settings to that. I've added a lookup function workspace_find_config. Note that we have a similar thing for outputs (output_config struct and output_find_config). Lastly, when freeing config it would create a memory leak by freeing the list items but not the workspace or output names inside them. This has been rectified using a free_workspace_config function.
* transaction: do not use pointers for stateLibravatar Ian Fan2018-09-28
|
* Fix floating views in tabbed/stacked workspaces not getting frame eventsLibravatar Ryan Dwyer2018-09-28
| | | | | | | | | view_is_visible would return false, which meant the view wouldn't receive a frame done event. view_is_visible needs to make an exception for floating containers. This also moves the workspace_is_visible check to an earlier location for performance reasons.
* input config: merge left_handed optionLibravatar Ian Fan2018-09-27
|
* Merge pull request #2704 from ianyfan/tablet-configLibravatar Drew DeVault2018-09-27
|\ | | | | input: enable configuring tablets with libinput
| * input: enable configuring tablets with libinputLibravatar Ian Fan2018-09-24
| |
* | Make sway/ipc-server.c POSIX 2001 compliantLibravatar sghctoma2018-09-26
| | | | | | | | | | | | | | This commit replaces the non-standard SOCK_NONBLOCK and SOCK_CLOEXEC flags with two fcntl calls. This makes the file POSIX 2001 compliant, thus it is no longer necessary to conditionally define, or use internal (__BSD_VISIBLE) feature test macros.
* | Fix race condition crash when view unmaps + maps quicklyLibravatar Ryan Dwyer2018-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | When a view unmaps, we start a transaction to destroy the container, then when the transaction completes we destroy the container and unset the view's container pointer. But if the view has remapped in the meantime, the view's container pointer will be pointing to a different container which should not be cleared. This adds a check to make sure the view is still pointing to the container being destroyed before clearing the pointer. The freeing of the title format is also removed as it is already freed when the view destroys in view_destroy.
* | Add a missing null check for moving tiling containersLibravatar Alexander Bakker2018-09-25
| |
* | Fix crash when disconnecting outputLibravatar Ryan Dwyer2018-09-25
|/ | | | | | | | | | | If the output being disconnected contains views, and the views are being relocated to another output of a different size, a transaction must occur to reconfigure them. This means by the time container_discover_outputs is called, the output is already disabled and wlr_output is NULL. I considered making it check output->wlr_output, but output->enabled should work just as well and is more descriptive.
* Implement support for input wildcardLibravatar Brian Ashworth2018-09-23
|
* Fix GtkMenuBar always opening first itemLibravatar Ryan Dwyer2018-09-23
| | | | | It seems like advertising that we support touch when we don't, while using SSD, makes GtkMenuBar misbehave. Please don't ask me why...
* Merge pull request #2695 from RyanDwyer/remove-moveoutoftabsstacksLibravatar Drew DeVault2018-09-23
|\ | | | | Remove move_out_of_tabs_stacks
| * Flatten container in workspace_rejiggerLibravatar Ryan Dwyer2018-09-23
| |
| * Fix some bugs as a result of removing move_out_of_tabs_stacksLibravatar Ryan Dwyer2018-09-23
| |
| * Remove move_out_of_tabs_stacksLibravatar Ryan Dwyer2018-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following. Create these layouts and run move right: (Initial layout -> expected result -> actual result) * `H[S[unfocused focused] unfocused]` -> `H[S[unfocused] focused unfocused]` -> `H[H[S[unfocused] focused] unfocused]` * `H[S[unfocused focused] V[unfocused]]` -> `H[S[unfocused] V[unfocused focused]]` -> `H[H[S[unfocused] focused] V[unfocused]]` move_out_of_tabs_stacks was originally made to allow views to move out of the tabbed/stacked container in the parallel direction, but at some point this has started working using the regular logic.
* | Merge pull request #2694 from RyanDwyer/fix-sticky-jumping-on-switchLibravatar emersion2018-09-23
|\ \ | | | | | | Prevent sticky containers from jumping on workspace switch
| * | Prevent sticky containers from jumping on workspace switchLibravatar Ryan Dwyer2018-09-23
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have swaybar docked to the top, and you create a floating sticky container and switch workspaces on the same output, the sticky container would move down by the height of swaybar on each switch. This happens because when creating the workspace we set the dimensions to the same as the output, then the subsequent arrange corrects it. During this arrange, floating containers are translated so they stay relative to the workspace. This translation needs to not occur for the initial arrange. This patch makes workspaces have a zero width and height when first created, so we can detect whether this is the initial arrange and avoid translating the floating containers if so.
* | Merge pull request #2686 from RyanDwyer/tab-scrollingLibravatar emersion2018-09-23
|\ \ | |/ |/| Implement tab cycling using mouse wheel
| * Implement tab cycling using mouse wheelLibravatar Ryan Dwyer2018-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Firstly, a change had to be made to the container_at functions. If you create layout `T[view H[view view]]` and hover the second tab, the container_at functions would return the focus_inactive child. They now return the split container itself. To compensate for this, dispatch_cursor_button has been adjusted to find the focus_inactive child before focusing it. The actual implementation of wheel scrolling is pretty straightforward. This uses handle_cursor_axis, so I took a similar approach to handle_cursor_button (ie. creating a dispatch_cursor_axis function).
* | Merge pull request #2688 from RyanDwyer/exec-commands-without-focusLibravatar Drew DeVault2018-09-22
|\ \ | | | | | | Allow running commands on containers without focusing them
| * | Allow running commands on containers without focusing themLibravatar Ryan Dwyer2018-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a `con` argument to `execute_command` which allows you to specify the container to execute the command on. In most cases it leaves it as `NULL` which makes it use the focused node. We only set it when executing `for_window` criteria such as when a view maps. This means we don't send unnecessary IPC focus events, and fixes a crash when the criteria command is `move scratchpad` (because we can't give focus to a hidden scratchpad container). Each of the shell map handlers now check to see if the view has a workspace. It won't have a workspace if criteria has moved it to the scratchpad.
* | | commands: remove obselete code for sticky windows when switching workspaceLibravatar Ian Fan2018-09-22
|/ /
* | swaybar, swaylock, & tree/container: Set cairo font options to render text ↵Libravatar Geoff Greer2018-09-22
| | | | | | | | and lines with subpixel hinting (if available).
* | Merge pull request #2660 from RyanDwyer/fix-scratchpad-iterationLibravatar emersion2018-09-22
|\ \ | | | | | | Fix double iteration of scratchpad containers
| * | Fix double iteration of scratchpad containersLibravatar Ryan Dwyer2018-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | root_for_each_container and root_find_container were using incorrect logic to determine if a container was hidden in the scratchpad. Containers will have a NULL parent if they are a direct child of a workspace. Containers will have a NULL workspace if they are hidden in the scratchpad. The incorrect check meant that root_for_each_container would run the callback on scratchpad containers twice. This meant that executing a command such as `[class="$something"] scratchpad show` would cause the command to run twice, resulting in the container being shown and hidden again which is effectively a no op. Fixes #2655.
* | | Fix pango escaping and refactor escape_markup_textLibravatar Ryan Dwyer2018-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #2674. The cause of the issue was in get_pango_layout. When we call pango_parse_markup, `text` is the escaped string, and the unescaped string is then computed and written to `buf`. We were then passing the unescaped string to pango_layout_set_markup, but this function needs the escaped string. `buf` is not needed and has been removed. The other part of this PR refactors escape_markup_text to remove the dest_length argument and removes the -1 return value on error. It now assumes that you've allocated dest to the correct length.
* | | Merge pull request #2678 from RyanDwyer/reconfigure-on-repositionLibravatar emersion2018-09-22
|\ \ \ | |_|/ |/| | Reconfigure xwayland views when repositioned
| * | Reconfigure xwayland views when repositionedLibravatar Ryan Dwyer2018-09-21
| | | | | | | | | | | | Fixes #2673.
* | | Merge branch 'master' into swaybar-hotplugLibravatar Brian Ashworth2018-09-21
|\| |
| * | Fix compilation against wlroots without X11 backendLibravatar Marien Zwart2018-09-21
| | |
| * | Merge branch 'master' into render-output-segfaultLibravatar Ryan Dwyer2018-09-21
| |\ \
| * | | Fix segfault in output_renderLibravatar emersion2018-09-19
| | |/ | |/|
* | | swaybar: handle hotpluggingLibravatar emersion2018-09-20
| |/ |/| | | | | Don't kill and respawn swaybars on hotplug.
* | Merge pull request #2671 from emersion/output-execute-no-focusLibravatar emersion2018-09-20
|\ \ | | | | | | Fix segfault when executing command without focus
| * | Fix segfault when executing command without focusLibravatar emersion2018-09-19
| | |
* | | Merge pull request #2676 from ianyfan/ipcLibravatar Drew DeVault2018-09-19
|\ \ \ | | | | | | | | ipc: add pid information for views in layout tree
| * | | ipc: add pid information for views in layout treeLibravatar Ian Fan2018-09-19
| | |/ | |/|
* | | Merge branch 'master' into create-output-commandLibravatar emersion2018-09-19
|\ \ \ | | |/ | |/|
| * | config: free strings fields when freeing input configLibravatar Ian Fan2018-09-19
| |/
* / Introduce create_output command (for developer use)Libravatar Ryan Dwyer2018-09-19
|/ | | | Should help with testing hotplugging.
* Fix crash moving out of tab containerLibravatar William Wold2018-09-17
|
* Merge pull request #2637 from RyanDwyer/fix-tabbed-workspace-shenanigansLibravatar Drew DeVault2018-09-16
|\ | | | | Make seat_get_active_child ignore floating children
| * Rename seat_get_active_child to seat_get_active_tiling_childLibravatar Ryan Dwyer2018-09-16
| | | | | | | | | | Also renames container to con in one function to prevent ugly line wrapping.
| * Make seat_get_active_child ignore floating childrenLibravatar Ryan Dwyer2018-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | seat_get_active_child is used to get the active tiling child in a few places, such as outputs getting their active workspace and tabbed/stacked containers getting their visible child. When a workspace uses a tabbed or stacked layout and contains a focused floating view, calling seat_get_active_child on the workspace would incorrectly return the floating view. This changes it so it will return the tiling child. This fixes the following bug: * Create layout T[view view] then float one of the views * Attempt to click the tiling view to give it focus - it wouldn't work because seat_get_active_child would return the floating view
* | Fix crash when destroying an idle-inhibiting clientLibravatar Marien Zwart2018-09-16
|/ | | | | | When destroying an idle-inhibiting client, idle_inhibit_v1_check_active can get called from transaction_progress_queue on a view with a null container. view_is_visible does not handle a view in this state.
* Fix crash when unmapping last child of a tabbed workspaceLibravatar Ryan Dwyer2018-09-16
| | | | | | | | | | | | | | * Create layout T[view view] * Move the cursor into the title bar area * Close both views Sway would crash because container_at_tabbed would attempt to divide by zero when there are no children. The children check isn't needed for the stacked function because it doesn't divide anything by the number of children. Fixes #2636.
* ipc: handle NULL cases for node_get_outputLibravatar Ian Fan2018-09-15
|