aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/render.c
AgeCommit message (Collapse)Author
2018-08-18Fix nitpickRyan Dwyer
2018-08-18Store geometry in the view and handle any floating view resizingRyan Dwyer
2018-08-18Render saved buffer using saved geometryRyan Dwyer
2018-08-18Fix geometryRyan Dwyer
2018-08-17Add using_csd variable to transaction stateRyan Dwyer
This fixes a race condition flicker when unfloating a view which uses client side decorations. When the view is floated it has using_csd = true, so the decorations are not drawn. When unfloating it it changes to false, but this change wasn't part of transactions so it could potentially render the decorations around the view while it's waiting for the transaction to apply.
2018-08-02Convert toplevel coordinates to output-localRyan Dwyer
2018-08-02Revert "Revert "Fix popups""Ryan Dwyer
This reverts commit 9aa258d33a9baa42895214da7e82f4568fcb8f76. Reverting the revert, so that popups can be fixed.
2018-08-02Revert "Fix popups"Drew DeVault
This reverts commit de86d65627e96cffe77f4abf11c4a0b982326ff9.
2018-08-02Merge branch 'master' into fix-resize-wiggleemersion
2018-08-01Correctly track saved surfaces during multiple transactionsRyan Dwyer
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-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-29Completely switch over to new iteratorsemersion
2018-07-29wip: redesign output_view_for_each_surface iteratoremersion
2018-07-29wip: redesign output_layer_for_each_surface iteratoremersion
2018-07-29wip: redesign output_drag_icons_for_each_surface iteratoremersion
2018-07-29wip: redesign output_unmanaged_for_each_surface iteratoremersion
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-26Fix indentRyan Dwyer
2018-07-26Allow containers to be fullscreenRyan Dwyer
2018-07-25Merge pull request #2353 from emersion/render-opaque-overlayDrew DeVault
Improve rendering with a fullscreen opaque overlay surface
2018-07-25reverted includes of "sway/config.h" and replaced with "config.h" from meson ↵Pascal Pascher
build
2018-07-25Improve rendering with a fullscreen opaque overlay surfaceemersion
The rendering code doesn't use the exclusive input surface at all anymore to decide to skip rendering of shell surfaces. This fixes a weird situation in which a client requests exclusive input but isn't an overlay layer surface. The renderer also renders all overlay surfaces in this situation, not just one. This simplifies the code and fixes rendering when there are more than one overlay surfaces (e.g. for a virtual keyboard to type the lockscreen password).
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-23fix crash on new output while swaylock is runningsomdoron
2018-07-17Implement default_floating_border command and adjust CSD behaviourRyan Dwyer
2018-07-16Render containers as urgent if they have an urgent childRyan Dwyer
2018-07-16Implement urgency base functionalityRyan Dwyer
Introduces a command to manually set urgency, as well as rendering of urgent views, sending the IPC event, removing urgency after focused for one second, and matching urgent views via criteria.
2018-07-15Make focus part of transactionsRyan Dwyer
Rather than maintain copies of the entire focus stack, this PR transactionises the focus by introducing two new properties to the container state and using those when rendering. * `bool focused` means this container has actual focus. Only one container should have this equalling true in its current state. * `struct sway_container *focus_inactive_child` points to the immediate child that was most recently focused (eg. for tabbed and stacked containers).
2018-07-14Add extended debugging flagsDrew DeVault
We currently have several ways of setting debug flags, including command line arguments, environment variables, and compile-time macros. This replaces the lot with command line flags.
2018-07-11Use saved buffer when fullscreen view is in a transactionRyan Dwyer
Fixes #2237.
2018-07-10removed unnecessary parensruss morris
2018-07-10fix line lengthsruss morris
2018-07-10tabs instead of spacesruss morris
2018-07-10fix tabbed titlebar widthsruss morris
2018-07-10Fix titlebar rendering for nested stacked containersKonstantin Pospelov
2018-07-07Split rendereremersion