aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
AgeCommit message (Collapse)Author
2018-07-14Simplify transactions by utilising a dirty flag on containersRyan Dwyer
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.
2018-07-13Simplify popup_unconstrainemersion
Just use the parent output.
2018-07-13Fix output_has_opaque_lockscreenemersion
2018-07-13Merge branch 'master' into xwayland-floating-bordersRyan Dwyer
2018-07-12Add xdg-positioner supportemersion
2018-07-12Don't disable borders for xwayland floating viewsemersion
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-10Merge branch 'master' into fix-stacked-layoutRyan Dwyer
2018-07-09Update for swaywm/wlroots#1126emersion
2018-07-10Fix titlebar rendering for nested stacked containersKonstantin Pospelov
2018-07-09Implement some floating move commandsRyan Dwyer
This implements the following for floating containers: * move <direction> <amount> * move [absolute] position <x> <y> * move [absolute] position mouse
2018-07-07Split rendereremersion
2018-07-07Fix titles when container titles contain UTF-8 charactersRyan Dwyer
The title and marks textures would have their height set from the config's computed max font height, but the textures were not regenerated when the config's max font height changed which made a gap appear. Rather than making it regenerate the title textures every time the config font height was changed, I've changed it to just make the textures the height of the title itself and fill any gap when rendering. Also, the title_width and marks_width variables have been renamed to make it more obvious that they are in output-buffer-local coordinates. Fixes #1936.
2018-07-06Make view_update_* update live props as wellemersion
2018-07-06Fix xwayland floating views unclickableemersion
Some xwayland views are first configured with a 1x1 size, and then resized. Since the view size isn't updated, they are unclickable. Fixes #2195
2018-07-07Translate surface by its geo when doing opaque box checkRyan Dwyer
2018-07-07Don't clear when using opaque lockscreenRyan Dwyer
2018-07-07Detect opaque lockscreen when using a solid colorRyan Dwyer
2018-07-07Use pixman_region32_contains_rectangleRyan Dwyer
2018-07-07Use opaque region to determine if frame done should be sentRyan Dwyer
2018-07-07Don't send frame done to surfaces behind lockscreenRyan Dwyer
Also, when rendering, don't descend into the tree if the lockscreen is active. Just render the lockscreen's surfaces.
2018-07-05Use wlr_surface.buffer_damageemersion
2018-07-05Updates per wlroots#1076Drew DeVault
2018-07-04Fix use after free in transaction codeRyan Dwyer
If we set an instruction as ready twice, it decreases the transaction's num_waiting a second time and applies the transaction earlier than it should. This no doubt has undesired effects, probably resulting in a use after free. Hopefully fixes the first part of #2207.
2018-07-02Fix damage on swaybar when view requests to exit fullscreenRyan Dwyer
Fixes #2191
2018-07-02Merge pull request #2187 from martinetd/idle-inhibitemersion
Idle inhibit
2018-07-02idle_inhibit: move server data to its own structDominique Martinet
2018-07-02idle_inhibit: stop inhibitor when views become invisibleDominique Martinet
2018-07-02Add idle inhibit unstable v1 supportDominique Martinet
2018-07-02transaction_apply: use float for quotientDominique Martinet
Pre-dividing 1000/60 would lose 2/3 due to round-up Found through static analysis
2018-06-30xdg_shell: listen to fullscreen request on mapDominique Martinet
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.
2018-06-30sway views: add helpers to get view and layer from wlr_surfaceDominique Martinet
2018-06-30Merge remote-tracking branch 'upstream/master' into atomicRyan Dwyer
2018-06-30Fix crash with stacking layout after f42bf0ad4Rostislav Pehlivanov
The "simple" rendering function only applies to tiled views.
2018-06-30Revert "Don't unmaximize floating views"Rostislav Pehlivanov
This reverts commit 97672295ed50d1d6272876c4a3b6b5607cab05c6.
2018-06-30Fix flash of background when xwayland views are mappedRyan Dwyer
A flash of background was happening for two reasons: 1) We were using the xsurface's dimensions to check if the surface is ready, but these are pending dimensions. 2) In my particular setup, the default geometry of the xsurface does not intersect any output, which prevented it from receiving a frame done event. This made the transaction time out and the client would only redraw once it's been rendered.
2018-06-29Render saved buffers with the surface's dimensionsRyan Dwyer
2018-06-29Merge remote-tracking branch 'upstream/master' into atomicRyan Dwyer
2018-06-29Replace list_empty with a simple alternativeRyan Dwyer
2018-06-27fix accidently removing borders on XCB_CONFIGURE_REQUESTArmin Preiml
The view was configured with the container coordinates. Although they were right on the first configure, they changed after a XCB_CONFIGURE_REQUEST, when the border was already drawn.
2018-06-27Allow views to skip configuresRyan Dwyer
To do this properly, the transaction queue will only be processed if it can be completely processed.
2018-06-27Move unsetting of view->surface into view_unmapRyan Dwyer
2018-06-27Remove transaction_add_damageRyan Dwyer
Instead, damage each container when applying the transaction.
2018-06-27Fix nitpicksRyan Dwyer
2018-06-27Merge branch 'master' into xwayland-wants-floatRyan Dwyer
2018-06-26Merge branch 'master' into float_xdg_shellemersion