aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorLines
2018-08-08Deny moving a sticky container to workspace if it's the same outputFurkan Sahin-0/+2
Rationale: Sticky containers are always assigned to the visible workspace. The basic idea here is to check the destination's output (move.c:190). But if the command was `move container to workspace x` then a workspace might have been created for it. We could destroy the workspace in this case, but that results in unnecessary IPC events. To avoid this, the logic for `move container to workspace x` has been adjusted. It now delays creating the workspace until the end, and uses `workspace_get_initial_output` to determine and check the output before creating it.
2018-08-07Fix edge cases when moving floating container to new workspaceFurkan Sahin-3/+6
* Removes container_floating_move_to_container, instead opting to put that logic in container_move_to * In the seat code, focusing a floating view now updates the pending state only and lets the next transaction carry it over to the current state. This is required, otherwise it would crash. * When unfullscreening a floating container, an output check is now done to see if it should center it.
2018-08-04Implement move to workspace on a floating containerFurkan Sahin-0/+8
Also adjusts container_floating_translate to not change the current properties directly.
2018-08-06Merge pull request #2268 from emersion/server-decoration-bordersFurkan Sahin-1/+31
Enable borders on floating SSD xdg-shell views
2018-08-05commands: complete workspace implementationFurkan Sahin-1/+3
Allow optional --no-auto-back-and-forth flag, as well as refactoring some logic
2018-08-01commands: fix layout implementation (also better name for previous split layout)Furkan Sahin-1/+1
2018-07-31commands: complete move implementationFurkan Sahin-0/+5
2018-07-29Handle views created after decoration mode is sent for xdg-shellFurkan Sahin-0/+9
2018-08-04Move workspace pid code to root.cFurkan Sahin-4/+4
2018-08-03Separate root-related codeFurkan Sahin-48/+58
This creates a root.c and moves bits and pieces from elsewhere into it. * layout_init has been renamed to root_create and moved into root.c * root_destroy has been created and is called on shutdown * scratchpad code has been moved into root.c, because hidden scratchpad containers are stored in the root struct
2018-08-03Remove swaynag_clone and use memcpyFurkan Sahin-4/+0
2018-08-02Write to swaynag pipe fd directly on config errorsFurkan Sahin-6/+42
2018-08-01Show swaynag on config errorsFurkan Sahin-3/+7
2018-08-03Fix crash when moving cursor over a fullscreen split containerFurkan Sahin-3/+3
Calling container_at_view fails an assertion if the container isn't a view. Calling tiling_container_at works correctly, as that function checks if the container is a view and calls container_at_view if so.
2018-08-02Fix pointer events for fullscreen viewsFurkan Sahin-0/+4
2018-08-02Revert "Revert "Fix popups""Furkan Sahin-9/+21
This reverts commit 781fc357eaf46b9ca6b5415771982db960c87475. Reverting the revert, so that popups can be fixed.
2018-08-02Merge pull request #2366 from RedSoxFan/nagbarFurkan Sahin-0/+159
Implement swaynag
2018-08-02Merge branch 'master' into nagbarFurkan Sahin-13/+7
2018-08-02Revert "Fix popups"Furkan Sahin-21/+9
This reverts commit 0878cf13c8acc3e2a67dc1a6d177ad3052cb425b.
2018-08-02Merge branch 'master' into fix-resize-wiggleFurkan Sahin-14/+32
2018-08-01Merge pull request #2391 from RyanDwyer/fix-popups-v2Furkan Sahin-9/+24
Fix popups (v2)
2018-08-01ipc: remove extraneous valuesFurkan Sahin-2/+0
Removes IPC_EVENT_MODIFIER and IPC_EVENT_INPUT, which were sway-specific and unused
2018-08-01Correctly track saved surfaces during multiple transactionsFurkan Sahin-13/+7
Fixes #2364. Suppose a view is 600px wide, and we tell it to resize to 601px during a resize operation. We create a transaction, save the 600px buffer and send the configure. This buffer is saved into the associated instruction, and is rendered while we wait for the view to commit a 601px buffer. Before the view commits the 601px buffer, suppose we tell it to resize to 602px. The new transaction will also save the buffer, but it's still the 600px buffer because we haven't received a new one yet. Then suppose the view commits its original 601px buffer. This completes the first transaction, so we apply the 601px width to the container. There's still the second (now only) transaction remaining, so we render the saved buffer from that. But this is still the 600px buffer, and we believe it's 601px. Whoops. The problem here is we can't stack buffers like this. So this commit removes the saved buffer from the instructions, places it in the view instead, and re-saves the latest buffer every time the view completes a transaction and still has further pending transactions. As saved buffers are now specific to views rather than instructions, the functions for saving and removing the saved buffer have been moved to view.c. The calls to save and restore the buffer have been relocated to more appropriate functions too, favouring transaction_commit and transaction_apply rather than transaction_add_container and transaction_destroy.
2018-07-31Close popups when changing focusFurkan Sahin-0/+3
Also reverts the send frame done changes from the previous commit.
2018-07-31Fix popupsFurkan Sahin-9/+21
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-30swaynag: address some more of sircmpwn's commentsFurkan Sahin-1/+2
Fixes segfauls for any case where swaynag->outputs was not inititalized including -h/--help, -v/--version, and invalid arguments. Sets sane defaults for colors not given. Any color not given will fallback to the default color values for type error. Adds support for a hidpi cursor
2018-07-30Merge pull request #2367 from emersion/iterator-redesignFurkan Sahin-28/+17
Refactor surface iterators
2018-07-30Merge pull request #2381 from frsfnrrg/key-repeatFurkan Sahin-0/+3
Implement key repeat for keybindings
2018-07-30delete references to swaygrabFurkan Sahin-10/+0
2018-07-30util.h: add missing includeFurkan Sahin-0/+1
parse_boolean() takes and returns a `bool`
2018-07-30Fix title textures on scale changeFurkan Sahin-0/+2
2018-07-30swaynag: fix hidpiFurkan Sahin-1/+7
2018-07-29swaynag: allow more config optionsFurkan Sahin-14/+17
2018-07-29Bindings use advised keyboard repeat parametersFurkan Sahin-2/+0
Now 'repeat_delay' and 'repeat_rate' control the initial delay and rate (per second) of repeated binding invocations. If the repeat delay is zero, binding repetition is disabled. When the repeat rate is zero, the binding is repeated exactly once, assuming no other key events intervene.
2018-07-29Implement key repeat for pressed key bindingsFurkan Sahin-0/+5
Each sway_keyboard is provided with a wayland timer event source. When a valid keypress binding has been found, a callback to handle_keyboard_repeat is set. Any key event will either clear the callback or (if the new key event is a valid keypress binding) delay the callback again.
2018-07-28swaynag: refactor {sway_,}nagbar to swaynagFurkan Sahin-51/+52
2018-07-28swaynag: split config into own file and fix optindFurkan Sahin-0/+14
2018-07-28Add virtual keyboard protocolFurkan Sahin-0/+3
Ref #2373
2018-07-28swaynag: implement config file supportFurkan Sahin-16/+29
2018-07-27Remove output_surface_for_each_surface from headerFurkan Sahin-4/+0
2018-07-27Completely switch over to new iteratorsFurkan Sahin-18/+0
2018-07-27wip: redesign output_view_for_each_surface iteratorFurkan Sahin-3/+3
2018-07-27wip: redesign output_layer_for_each_surface iteratorFurkan Sahin-2/+2
2018-07-27wip: redesign output_drag_icons_for_each_surface iteratorFurkan Sahin-3/+3
2018-07-27wip: redesign output_unmanaged_for_each_surface iteratorFurkan Sahin-3/+14
2018-07-27Address first round review for swaynagFurkan Sahin-0/+0
2018-07-27Support a detailed message in swaynagbarFurkan Sahin-0/+27
2018-07-26When unfloating, return container to previously focused tiled containerFurkan Sahin-0/+3
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-26Allow containers to floatFurkan Sahin-5/+11
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 (31a121efd0a6fb4835ea1f0a2b45cb34bf603718) 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-25Implements swaynagbarFurkan Sahin-0/+94