aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
AgeCommit message (Collapse)Author
2018-08-01Merge pull request #2391 from RyanDwyer/fix-popups-v2Drew DeVault
Fix popups (v2)
2018-08-01ipc: prevent emitting a workspace::focus event when moving a container to a ↵Ian Fan
different workspace or output When a container is moved from, say, workspace 1 to workspace 2, workspace 2 is focused in order to arrange the windows before focus is moved back to workspace 1, which caused a workspace:focus event from workspace 2 to workspace 1 to be emitted. This commit inhibits that event.
2018-08-01ipc: fix workspace::focus event behaviourIan Fan
2018-08-01ipc: add window::move eventsIan Fan
2018-08-01ipc: fix workspace::move calls argument orderIan Fan
2018-08-01ipc: only emit window::create event for viewsIan Fan
2018-08-01ipc: add window::mark eventIan Fan
2018-08-01ipc: add workspace::empty eventIan Fan
2018-08-01ipc: add window::title eventIan Fan
2018-08-01ipc: add window::close eventIan Fan
2018-08-01ipc: add workspace::init eventIan Fan
2018-07-31Close popups when changing focusRyan Dwyer
Also reverts the send frame done changes from the previous commit.
2018-07-31Fix popupsRyan Dwyer
Fixes the render and container_at order for popups. Fixes #2210 For rendering: * render_view_surfaces has been renamed to render_view_toplevels * render_view_toplevels now uses output_surface_for_each_surface (which is now public), as that function uses wlr_surface_for_each_surface which doesn't descend into popups * Views now have a for_each_popup iterator, which is used by the renderer to render the focused view's popups * When rendering a popup, toplevels (xdg subsurfaces) of that popup are also rendered For sending frame done, the logic has been updated to match the rendering logic: * send_frame_done_container no longer descends into popups * for_each_popup is used to send frame done to the focused view's popups and their child toplevels For container_at: * floating_container_at is now static, which means it had to be moved higher in the file. * container_at now considers popups for the focused view before checking containers. * tiling_container_at has been introduced, so that it doesn't call container_at recursively (it would check popups recursively if it did)
2018-07-30Fix title textures on scale changeBrian Ashworth
2018-07-28Merge pull request #2360 from RyanDwyer/floating-containersDrew DeVault
Allow containers to float
2018-07-28Fix crash when a deferred command destroys a workspaceRyan Dwyer
Example config that produces the crash (with a single output): workspace 1 workspace 2 Prior to this commit, container_workspace_free would manually mark the L_FLOATING container as destroying and free it. This assumed the L_FLOATING container would never be involved in a transaction. This was a safe assumption when it was implemented, but became an incorrect assumption once parent/child relationships became transactionised. This commit removes the L_FLOATING free from container_workspace_free. When the workspace is destroyed, it starts the normal destroy process on the L_FLOATING container so it can be freed via transactions.
2018-07-28Fix crash when unfloating child of container into empty workspaceRyan Dwyer
2018-07-28Fix focus mode_toggle from a child of a floating containerRyan Dwyer
Also fixes a crash when unfloating a window. It needs to add it back to the tiling tree as a sibling rather than a child, because the reference container might be a view.
2018-07-28When unfloating, return container to previously focused tiled containerRyan Dwyer
This introduces seat_get_focus_inactive_tiling and updates `focus mode_toggle` to use it instead, because the previous method wasn't guaranteed to return a tiling view.
2018-07-28Fix crash when a child of a floating container is in the scratchpadRyan Dwyer
2018-07-28Allow containers to floatRyan Dwyer
Things worth noting: * When a fullscreen view unmaps, the check to unset fullscreen on the workspace has been moved out of view_unmap and into container_destroy, because containers can be fullscreen too * The calls to `container_reap_empty_recursive(workspace)` have been removed from `container_set_floating`. That function reaps upwards so it wouldn't do anything. I'm probably the one who originally added it... * My fix (b14bd1b0b1536039e4f46fe94515c7c44e7afc61) for the tabbed child crash has a side effect where when you close a floating container, focus is not given to the tiled container again. I've removed my fix and removed the call to `send_cursor_motion` from `seat_set_focus_warp`. We should consider calling it from somewhere earlier in the call stack.
2018-07-28Preserve workspace nameMihai Coman
2018-07-27Fix assign to workspaceRyan Dwyer
2018-07-26Refactor view_mapRyan Dwyer
* Move workspace selection into separate function * Instead of keeping a `prev_focus` variable, do the check in `should_focus` (ie. views can only take focus if they're mapped into the active workspace) * Fix assign-to-output - it previously set `prev_focus` but should be `target_sibling` * Remove call to `workspace_switch` as we'll only ever focus the view if it's in the active workspace
2018-07-26Allow containers to be fullscreenRyan Dwyer
2018-07-25fix #2355: "move workspace to output up" crashesCédric Cabessa
when using 2 display, if scaling is different `container_update_textures_recursive` is called when moving workspace on different display. We need to call `container_update_title_textures` only for container of type "CONTAINER" or "VIEW" in order to be consistent with the assert in `update_title_texture`.
2018-07-25more style fixes, reorder config.h includePascal Pascher
2018-07-25reverted includes of "sway/config.h" and replaced with "config.h" from meson ↵Pascal Pascher
build
2018-07-25more style fixes, included "sway/config.h" where neededPascal Pascher
2018-07-24style fixes, exclude sway/desctop/xwayland.c when enable_xwayland: falsePascal Pascher
2018-07-24Added meson option "enable_xwayland" (default: true) to enable/disable ↵Pascal Pascher
xwayland support
2018-07-24Merge pull request #2165 from swaywm/pid-workspacesDrew DeVault
Implement pid->workspace tracking
2018-07-24Address @emersion's review commentsDrew DeVault
2018-07-23Also extract first workspace name from bindcodesfrsfnrrg
2018-07-23Merge branch 'master' into pid-workspacesDrew DeVault
2018-07-23Store scratchpad list in sway_root instead of serverRyan Dwyer
2018-07-23Implement scratchpadRyan Dwyer
Implements the following commands: * move scratchpad * scratchpad show * [criteria] scratchpad show Also fixes these: * Fix memory leak when executing command with criteria (use `list_free(views)` instead of `free(views)`) * Fix crash when running `move to` with no further arguments
2018-07-22Consider view's min/max sizes when resizingRyan Dwyer
2018-07-22Replace static handle_end_operation with seat_end_mouse_operationRyan Dwyer
2018-07-22Implement floating_modifier and mouse operations for floating viewsRyan Dwyer
This implements the following: * `floating_modifier` configuration directive * Drag a floating window by its title bar * Hold mod + drag a floating window from anywhere * Resize a floating view by dragging the border * Resize a floating view by holding mod and right clicking anywhere on the view * Resize a floating view and keep aspect ratio by holding shift while resizing using either method * Mouse cursor turns into resize when hovering floating border or corner
2018-07-20Fix pointer events for overlapping floating viewsRyan Dwyer
Fixes #2315.
2018-07-19Implement assign to outputRyan Dwyer
Eg. assign [class="Firefox"] output foo
2018-07-19Fix crash when moving workspace to outputRyan Dwyer
2018-07-18Merge branch 'master' into destroy-output-destroy-empty-workspacesRyan Dwyer
2018-07-17Fix uninitialized pointer in view_unmapfrsfnrrg
Otherwise, sway crashes due to uninitialized pointer dereference when AddressSanitizer is active.
2018-07-16Merge branch 'master' into default-floating-borderBrian Ashworth
2018-07-17Remove superfluous IPC urgent eventsRyan Dwyer
When an xwayland view is mapped, the IPC urgent event was being sent on every surface commit. I had intentionally ommitted the check because I figured an urgent surface could update its urgent timestamp by sending urgent a second time. But that's not how it works in xwayland's case, and it makes for more complicated code.
2018-07-17Implement default_floating_border command and adjust CSD behaviourRyan Dwyer
2018-07-16Merge pull request #2276 from RyanDwyer/urgencyDrew DeVault
Implement urgency base functionality
2018-07-16Focus view before running criteria when mappingRyan Dwyer