aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell.c
Commit message (Collapse)AuthorAge
...
* Simplify transactionsLibravatar Ryan Dwyer2018-08-15
| | | | | | | | | | | | | | | | | | | | | | | | Commit 4b8e3a885be74c588291c51f798de80bd81a92db makes it so only one transaction is committed (ie. configures sent) at a time. This commit removes the now-unnecessary code which was used to support concurrent committed transactions. * Instead of containers storing a list of instructions which they've been sent, it now stores a single instruction. * Containers now have an ntxnrefs property. Previously we knew how many references there were by the length of the instruction list. * Instructions no longer need a ready property. It was used to avoid marking an instruction ready twice when they were in a list, but this is now avoided because there is only one instruction and we nullify the container->instruction pointer when it's ready. * When a transaction applies, we no longer need to consider releasing and resaving the surface, as we know there are no other committed transactions. * transaction_notify_view_ready has been renamed to view_notify_view_ready_by_serial to make it consistent with transaction_notify_view_ready_by_size. * Out-of-memory checks have been added when creating transactions and instructions.
* Implement resizing tiled containers via cursorLibravatar Ryan Dwyer2018-08-12
| | | | | | | | | * The OP_RESIZE seat operation has been renamed to OP_RESIZE_FLOATING, and OP_RESIZE_TILING has been introduced. * Similar to the above, seat_begin_resize and handle_resize_motion have been renamed and tiling variants introduced. * resize.c's resize_tiled has to be used, so container_resize_tiled has been introduced in resize.c to allow external code to call it.
* Handle views created after decoration mode is sent for xdg-shellLibravatar emersion2018-08-06
|
* Revert "Revert "Fix popups""Libravatar Ryan Dwyer2018-08-02
| | | | | | This reverts commit 9aa258d33a9baa42895214da7e82f4568fcb8f76. Reverting the revert, so that popups can be fixed.
* Revert "Fix popups"Libravatar Drew DeVault2018-08-02
| | | | This reverts commit de86d65627e96cffe77f4abf11c4a0b982326ff9.
* Close popups when changing focusLibravatar Ryan Dwyer2018-07-31
| | | | Also reverts the send frame done changes from the previous commit.
* Fix popupsLibravatar Ryan Dwyer2018-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Allow containers to be fullscreenLibravatar Ryan Dwyer2018-07-26
|
* Merge branch 'master' into pid-workspacesLibravatar Drew DeVault2018-07-23
|\
| * Handle set_{title,app_id} for xdg-shell and zxdg-shell-v6Libravatar emersion2018-07-22
| | | | | | | | | | | | This allows to update the title even if the view doesn't commit. This is useful e.g. when a terminal sets its toplevel title to the currently running command and when the view isn't visible.
| * Deny move/resize events for tiled xdg shell viewsLibravatar Ryan Dwyer2018-07-22
| |
| * Consider view's min/max sizes when resizingLibravatar Ryan Dwyer2018-07-22
| |
| * Store last button and use it when views request to move or resizeLibravatar Ryan Dwyer2018-07-22
| |
| * Implement xdg shell request_move and request_resize eventsLibravatar Ryan Dwyer2018-07-22
| | | | | | | | | | | | | | | | | | Also does a few other related things: * Now uses enum wlr_edges instead of our own enum resize_edge * Now uses wlr_xcursor_get_resize_name and removes our own find_resize_edge_name * Renames drag to move for consistency
| * Simplify transactions by utilising a dirty flag on containersLibravatar Ryan Dwyer2018-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR changes the way we handle transactions to a more simple method. The new method is to mark containers as dirty from low level code (eg. arranging, or container_destroy, and eventually seat_set_focus), then call transaction_commit_dirty which picks up those containers and runs them through a transaction. The old methods of using transactions (arrange_and_commit, or creating one manually) are now no longer possible. The highest-level code (execute_command and view implementation handlers) will call transaction_commit_dirty, so most other code just needs to set containers as dirty. This is done by arranging, but can also be done by calling container_set_dirty.
| * Simplify popup_unconstrainLibravatar emersion2018-07-13
| | | | | | | | Just use the parent output.
| * Add xdg-positioner supportLibravatar emersion2018-07-12
| |
| * Update for swaywm/wlroots#1126Libravatar emersion2018-07-09
| |
| * Updates per wlroots#1076Libravatar Drew DeVault2018-07-05
| |
| * Fix damage on swaybar when view requests to exit fullscreenLibravatar Ryan Dwyer2018-07-02
| | | | | | | | Fixes #2191
* | Implement pid->workspace trackingLibravatar Drew DeVault2018-07-01
|/ | | | | | | | | When you spawn a process with the exec command, sway now notes the workspace you had focused and the pid of the child process, then assigns that workspace to the child when its window appears. Some of this is carried over from sway 0.15, but with some major refactoring and centralization of state.
* xdg_shell: listen to fullscreen request on mapLibravatar Dominique Martinet2018-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That event comes from the toplevel and not the surface, so would cause a use-after-free on destroy if the toplevel got destroyed first: ==5454==ERROR: AddressSanitizer: heap-use-after-free on address 0x6110001ed198 at pc 0x000000472d10 bp 0x7ffc19070a80 sp 0x7ffc19070a70 WRITE of size 8 at 0x6110001ed198 thread T0 #0 0x472d0f in wl_list_remove ../common/list.c:157 #1 0x42e159 in handle_destroy ../sway/desktop/xdg_shell_v6.c:243 #2 0x7fa9e5b28ce8 in wlr_signal_emit_safe ../util/signal.c:29 #3 0x7fa9e5afd6b1 in destroy_xdg_surface_v6 ../types/xdg_shell_v6/wlr_xdg_surface_v6.c:101 #4 0x7fa9e5d98025 in destroy_resource src/wayland-server.c:688 #5 0x7fa9e5d98091 in wl_resource_destroy src/wayland-server.c:705 #6 0x7fa9e27f103d in ffi_call_unix64 (/lib64/libffi.so.6+0x603d) #7 0x7fa9e27f09fe in ffi_call (/lib64/libffi.so.6+0x59fe) #8 0x7fa9e5d9bf2c (/lib64/libwayland-server.so.0+0xbf2c) #9 0x7fa9e5d983de in wl_client_connection_data src/wayland-server.c:420 #10 0x7fa9e5d99f01 in wl_event_loop_dispatch src/event-loop.c:641 #11 0x7fa9e5d98601 in wl_display_run src/wayland-server.c:1260 #12 0x40a2f4 in main ../sway/main.c:433 #13 0x7fa9e527318a in __libc_start_main ../csu/libc-start.c:308 #14 0x40b749 in _start (/opt/wayland/bin/sway+0x40b749) 0x6110001ed198 is located 152 bytes inside of 240-byte region [0x6110001ed100,0x6110001ed1f0) freed by thread T0 here: #0 0x7fa9e7c89880 in __interceptor_free (/lib64/libasan.so.5+0xee880) #1 0x7fa9e5affce9 in destroy_xdg_toplevel_v6 ../types/xdg_shell_v6/wlr_xdg_toplevel_v6.c:23 #2 0x7fa9e5d98025 in destroy_resource src/wayland-server.c:688 previously allocated by thread T0 here: #0 0x7fa9e7c89e50 in calloc (/lib64/libasan.so.5+0xeee50) #1 0x7fa9e5b00eea in create_xdg_toplevel_v6 ../types/xdg_shell_v6/wlr_xdg_toplevel_v6.c:427 #2 0x7fa9e27f103d in ffi_call_unix64 (/lib64/libffi.so.6+0x603d) The toplevel only notifies the compositor on destroy if it was mapped, so only listen to events at map time.
* sway views: add helpers to get view and layer from wlr_surfaceLibravatar Dominique Martinet2018-06-30
|
* Merge remote-tracking branch 'upstream/master' into atomicLibravatar Ryan Dwyer2018-06-30
|\
| * Revert "Don't unmaximize floating views"Libravatar Rostislav Pehlivanov2018-06-30
| | | | | | | | This reverts commit 97672295ed50d1d6272876c4a3b6b5607cab05c6.
* | Merge remote-tracking branch 'upstream/master' into atomicLibravatar Ryan Dwyer2018-06-29
|\|
| * xdg_shell: make view floating if a parent has been setLibravatar Dominique Martinet2018-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompts e.g. authentication request from firefox-wayland ought to be floating. This is a bit coarse but just fixed size is not enough, here is what firefox does: [1285461.363] -> xdg_wm_base@18.get_xdg_surface(new id xdg_surface@68, wl_surface@71) [1285461.508] -> xdg_surface@68.get_toplevel(new id xdg_toplevel@67) [1285461.571] -> xdg_toplevel@67.set_parent(xdg_toplevel@37) [1285461.630] -> xdg_toplevel@67.set_title("Authentication Required") [1285461.736] -> xdg_toplevel@67.set_app_id("firefox") ... [1285476.549] xdg_toplevel@67.configure(0, 0, array) ... [1285502.080] -> xdg_toplevel@67.set_min_size(299, 187) [1285502.140] -> xdg_toplevel@67.set_max_size(1920, 32767) This can also be observed with e.g. the open window of gedit (gedit->open->other documents)
* | Move unsetting of view->surface into view_unmapLibravatar Ryan Dwyer2018-06-27
| |
* | Remove transaction_add_damageLibravatar Ryan Dwyer2018-06-27
| | | | | | | | Instead, damage each container when applying the transaction.
* | Damage output when views toggle fullscreenLibravatar Ryan Dwyer2018-06-26
| | | | | | | | | | Also add workspace to the transaction when a view maps in fullscreen mode.
* | Rename view's free callback to destroyLibravatar Ryan Dwyer2018-06-26
| |
* | Damage output when a fullscreen view unmapsLibravatar Ryan Dwyer2018-06-26
| | | | | | | | | | Also moved the arranging into view_unmap to avoid excessive code duplication.
* | Implement atomic layout updates for tree operationsLibravatar Ryan Dwyer2018-06-23
| | | | | | | | | | This implements atomic layout updates for when views map, reparent or unmap.
* | Refactor everything that needs to arrange windowsLibravatar Ryan Dwyer2018-06-09
| | | | | | | | | | | | | | | | | | | | * The arrange_foo functions are now replaced with arrange_and_commit, or with manually created transactions and arrange_windows x2. * The arrange functions are now only called from the highest level functions rather than from both high level and low level functions. * Due to the previous point, view_set_fullscreen_raw and view_set_fullscreen are both merged into one function again. * Floating and fullscreen are now working with transactions.
* | WIP: Atomic layout updates ground workLibravatar Ryan Dwyer2018-06-09
|/
* Don't auto float xdg views if their dimensions are not setLibravatar Ryan Dwyer2018-06-01
|
* Fix floating position when view is floated when mappedLibravatar Ryan Dwyer2018-06-01
|
* Don't unmaximize floating viewsLibravatar Ryan Dwyer2018-06-01
|
* Use surface size if xdg shell's geometry isn't setLibravatar Ryan Dwyer2018-06-01
|
* Implement wants_floating for xdg_shell and xdg_shell_v6Libravatar Ryan Dwyer2018-06-01
|
* Store swayc coordinates as layout-localLibravatar Ryan Dwyer2018-06-01
|
* Rename set_maximized functions to set_tiledLibravatar Ryan Dwyer2018-06-01
|
* Replace is_floating boolean with functionLibravatar Ryan Dwyer2018-06-01
|
* Implement floatingLibravatar Ryan Dwyer2018-06-01
|
* xdg-shell: make all toplevels tiledLibravatar emersion2018-05-27
|
* xdg_shell: Replace get_prop with get_string_propLibravatar Ryan Dwyer2018-05-14
|
* Add xdg-shell stable supportLibravatar emersion2018-05-13