aboutsummaryrefslogtreecommitdiff
path: root/sway/layout.c
AgeCommit message (Collapse)Author
2016-06-02redo smart_gaps/hide_edge_borders fixZandr Martin
2016-05-18Fix issue #661.Jasen Borisov
Borders are now drawn correctly (same behavior as i3) for tabbed and stacked containers, when the children have 'border none' set.
2016-04-29Fix uninitialized variableMikkel Oscar Lyderik
2016-04-27border: clear buffer on fullscreen viewsMikkel Oscar Lyderik
This patch makes sure to clear the border buffer of fullscreen view so the border doesn't get drawn behind a fullscreen view, which would be visible if the view was transparent.
2016-04-25Remove commented codeMikkel Oscar Lyderik
2016-04-25Use correct geometry for nested containersMikkel Oscar Lyderik
2016-04-25Disable inner gaps when in tabbed/stacked modeMikkel Oscar Lyderik
2016-04-25Add support for nested tabbed/stacked containersMikkel Oscar Lyderik
2016-04-25Make floating border fixes work with tabbed/stacked codeMikkel Oscar Lyderik
2016-04-25Improve move command with tabbed/stacked layoutMikkel Oscar Lyderik
2016-04-25Correctly determine default layoutMikkel Oscar Lyderik
2016-04-25Fix problems with floating windowsMikkel Oscar Lyderik
Makes any tabbed/stacked layout a container to separate from floating windows which may be attached to a workspace.
2016-04-25Tabbed and stacked layoutMikkel Oscar Lyderik
2016-04-16Remove clang warnings (-Wsign-compare)Mikkel Oscar Lyderik
2016-04-03Fix window borderscrondog
This fixes floating borders when moving outside of the output. Not sure what happens with dual screen as I only have 1 monitor
2016-04-02Fix spelling mistakesEric Engestrom
2016-03-31Correctly reset border geometryMikkel Oscar Lyderik
2016-03-30Fix borders with floating windowsMikkel Oscar Lyderik
2016-03-30Implement bordersMikkel Oscar Lyderik
The borders are implemented as a surface/buffer attached to each view which is sent to and rendered by wlc in the view_pre_render callback. All the drawing logic is handled in sway/border.c and all the logic for calculating the geometry of the border/view is handled in `update_geometry` in sway/layout.c (same place as gaps are calculated).
2016-03-30Implement some more on bordersDrew DeVault
Note that this segfaults ALL THE TIME in wlc code. Paging @Cloudef for help, I'm at a loss.
2016-03-20Implement 'smart_gaps' feature from i3-gapsMikkel Oscar Lyderik
2016-03-04Fix assigning workspaces to outputsMikkel Oscar Lyderik
It's possible to assign workspaces to certain outputs using the command: workspace <name> output <output> However, this did not work in some cases where the workspace was assigned before the given output was made available to sway. This patch fixes those cases.
2016-02-28Correctly move focus from one output to a new one.Mikkel Oscar Lyderik
This patch aims to correctly handle moving focus <left|right|up|down> between outputs. For instance, if moving from one output to a new output at the left of the current one, it should focus the right-most view/container on the new output, and the opposite if moving from right to left. This should happen regardless of the previously stored focus of the new output. This also handles moving to a new output above or below the current one.
2015-12-28arrange_windows_r: Round pixels to match reality, fixes calculations.S. Christoffer Eliesen
If the width or height of a container can't be evenly distributed to its children, then the layout algorithm still thought it got it right (due to using decimals) which caused a gap of one or more pixels for some window arrangements. This is fixed by this patch by first rounding off the width and height (so that decimals are never introduced) and then adjusting the last view in a container to fill the remaining pixels (which now is counted correctly due to the decimals being removed). Also, due to the way gaps are implemented, an odd sized gap can never be aligned properly, so just adjust to closest even number.
2015-12-28arrange_windows_r: Bring parent coordinates into layout calculations.S. Christoffer Eliesen
This brings consistency into the algorithm (instead of resetting and then fetching again).
2015-12-25Focus new sibling added to containerMikkel Oscar Lyderik
This makes sure that the window being added to a container gets focus.
2015-12-25Trigger workspace init event (floating)Mikkel Oscar Lyderik
Triggers workspace init event when moving a floating window to a new workspace. This is a follow up on #391 which didn't handle floating windows.
2015-12-21Trigger ipc_event_workspace in all casesMikkel Oscar Lyderik
This makes sure that the workspace IPC event is triggered when needed. Fixes #382 while making sure that the IPC event is only triggered once.
2015-12-20layout: Fix `edge_gaps off` with top/left panels.S. Christoffer Eliesen
Since x/y won't be zero when there's a top or left panel in place, we need to take those coordinates into account too.
2015-12-20extensions: Track panels by wl_resource, position per panel.S. Christoffer Eliesen
Track each panel separately via its wl_resource. `set_panel_position` might be called before `set_panel`, so reuse panel config. Place the position in panel_config so that each panel has its own position.
2015-12-18layout: arrange_windows: Partially fix swaybar irregularties.S. Christoffer Eliesen
2015-12-18layout: arrange_windows: Fix/better debug output.S. Christoffer Eliesen
2015-12-18layout: Keep output at the correct size, workspace can be smaller.S. Christoffer Eliesen
If the output is not at the correct size then that info must be queried from wlc. The output size is used by e.g. seamless mouse to detect output edges. With this patch the output size is now correct and the workspace size is adjusted according to any panels. Without this patch seamless mouse would fail to detect outputs above/below each other if there was a panel in between because the output would offically end where the panel started, not at the actual screen edge.
2015-12-16Bring unmanaged windows to front on output arrangeDrew DeVault
Fixes #312
2015-12-13Don't reset x,y position before use.Mikkel Oscar Lyderik
The x and y position is calculated based on the position of the bar, we don't want to reset these values when we need them.
2015-12-13Correctly handle moving between fullscreen viewsDrew DeVault
If focus would move in an output with a fullscreen view, it always leaves the output. If focus would enter an output with a fullscreen view, it always focuses the fullscreened view.
2015-12-13Fullscreen on top of barDrew DeVault
2015-11-29Fix output adjustment for panelsDrew DeVault
2015-11-29Support desktop shell panels in compositorDrew DeVault
2015-11-24layout: get_swayc_in_direction_under: Handle floating views.S. Christoffer Eliesen
2015-11-24layout: swap_container: Handle floating views.S. Christoffer Eliesen
2015-11-24layout: replace_child: Handle floating views.S. Christoffer Eliesen
2015-11-24layout: add_sibling: Handle floating views properly.S. Christoffer Eliesen
This should fix #241.
2015-11-16output: Support multiple adjacent outputs.S. Christoffer Eliesen
When querying for an adjacent output we now need an absolute position in order to know which adjacent output that matches. (The position is either the current mouse position or the center of the currently focused container, depending on context.) If two outputs have one edge each that at least partially align with each other they now count as adjacent. Seamless mouse is affected by this and now properly moves and positions itself between outputs with "uneven" placement (as long as they have at least some part of the edge adjacent to each other). When focusing or moving a container in a specified direction the center of the current focused container decides where to look for an adjacent output. So if e.g. an output has two adjacent outputs to the right and a "focus right" command is issued then it's the placement of the currently focused container that decides which output actually gets focused. Also, if an output has at least one output adjacent in some direction but the entire edge is not covered (ie. it has "holes" with no outputs), then the algorithm will choose the output that is closest to the currently focused container (this does not apply to seamless mouse, the pointer will just stop at the edge in that case).
2015-11-12Fix gaps for views being incorrectDrew DeVault
2015-11-04Learn "gaps edge_gaps <on|off|toggle>".S. Christoffer Eliesen
When yes, the old behaviour of adding half the inner gap around each view is used. When no, don't add any gap when an edge of the view aligns with the workspace. The result is inner gap only between views, not against the workspace edge. The algorithm is not perfect because it means the extra space is distributed amongst edge-aligned views only, but it's simple, looks good and it works.
2015-11-03commands: Learn 'move workspace to output <direction|name>'.S. Christoffer Eliesen
2015-10-29layout: get_swayc_in_direction: Properly find adjacent outputs.S. Christoffer Eliesen
2015-10-28layout: Don't reset container size if it's a floating window.S. Christoffer Eliesen
2015-10-25log: Add swayc_log, use at a few key places.S. Christoffer Eliesen
swayc_log works just like sway_log, but appends type and name from given container to the log output.