Ryan Dwyer
beacd4d9f9
Rename progress_queue to transaction_progress_queue
7 years ago
Ryan Dwyer
9b15e81cff
Fix potential crash when fullscreen view unmaps
...
It happened when a view is a grandchild or deeper of the workspace, is
fullscreen, and unmaps. The workspace would not be included in the
transaction and its pointer to the fullscreen view was left dangling.
7 years ago
Tony Crisci
e9ad10c2d6
dont focus-follow-mouse when keyboard grab
7 years ago
Ryan Dwyer
c371ff3de8
Implement per-configure debug timings
7 years ago
Ryan Dwyer
289d696adc
Implement transaction timings debug
...
Launch sway with SWAY_DEBUG=txn_timings to enable it.
7 years ago
emersion
eeb38d65cb
xwayland: accept configure requests from floating views
7 years ago
Ryan Dwyer
a3976e2659
Fix another crash when moving out of stacks or tabs
7 years ago
Ryan Dwyer
1549fb719a
Implement atomic layout updates for xwayland views
7 years ago
Ryan Dwyer
b6a238c7b7
Fix crash when running move <direction> in an empty workspace
7 years ago
Ryan Dwyer
b864ac0149
Fix crash when unmapping a view with reapable parents
...
container_destroy was calling container_reap_empty, which calls
container_destroy and so on. Eventually the original container_destroy
would return a NULL pointer to the caller which caused a crash.
This also fixes an arrange on the wrong container when moving views in
and out of stacks.
7 years ago
Ryan Dwyer
33e03cb277
Fix crash related to stacks and tabs
7 years ago
Ryan Dwyer
f08a30d6d0
Force transactions to complete in order
...
This forces transactions to complete in order by using a singly linked
list stored in the sway server.
7 years ago
Ryan Dwyer
32b865e610
Fix crash when deleting last child in a tabbed or stacked container
...
There was no `current` child because the container was destroyed. This
makes it fall back to looking in the parent's current children list.
7 years ago
Ryan Dwyer
b11c9199a6
Merge remote-tracking branch 'upstream/master' into atomic
7 years ago
Ryan Dwyer
38398e2d77
Implement atomic layout updates for tree operations
...
This implements atomic layout updates for when views map, reparent or
unmap.
7 years ago
Drew DeVault
5222e14555
Merge pull request #2155 from ael-code/fix_output_command_failure
...
bugfix: avoid access after free
7 years ago
ael-code
ad085c1332
bugfix: avoid access after free
...
if src is NULL due to a previous error we cannot use it in the command
result string.
Moreover if `src` points to `p.we_wordv[0]` we cannot use it after
`wordfree(&p)` in the command result string.
Bonus feature: If there was an error accessing the file, the string
rapresentation of the error is now included in the command result
string.
7 years ago
Drew DeVault
e8fbda4d21
Merge pull request #2146 from tobiasblass/prepare_server_before_dropping_privileges
...
Perform (partial) server initialization before dropping privileges.
7 years ago
Rostislav Pehlivanov
aa9f058e3e
Init the dmabuf exporting protocol in wlroots
...
Allows desktop capture via the dmabuf-capture wlroots example client.
7 years ago
Tobias Blass
a5c091e302
Perform (partial) server initialization before dropping privileges.
...
Some operations during backend creation (e.g. becoming DRM master)
require CAP_SYS_ADMIN privileges. At this point, sway has dropped them
already, though. This patch splits the privileged part of server_init
into its own function and calls it before dropping its privileges.
This fixes the bug with minimal security implications.
7 years ago
emersion
cda66e9a26
Automatically float xwayland windows
7 years ago
Ryan Dwyer
1c89f32533
Preserve buffers during transactions
...
* Also fix parts of the rendering where it was rendering the pending
state instead of current.
7 years ago
Ryan Dwyer
645bf446fa
Merge remote-tracking branch 'upstream/master' into atomic
7 years ago
emersion
088cae45c8
Update for swaywm/wlroots#1060
7 years ago
frsfnrrg
ca061ba8bf
Fix keyboard shortcut handling inconsistencies
...
* Ensure that modifier keys are identified even when the next key does
not produce a keysym. This requires that modifier change tracking
be done for each sway_shortcut_state.
* Permit regular and --release shortcuts on the same key combination.
Distinct bindings are identified for press and release cases; note
that the release binding needs to be identified for both key press
and key release events.
* Maintain ascending sort order for the shortcut state list, and keep
track of the number of pressed key ids, for simpler (and hence
faster) searching of the list of key bindings.
* Move binding duplicate detection into get_active_binding to avoid
duplicating error messages.
7 years ago
frsfnrrg
b23cd827cf
Sort binding key lists
...
Sort the list comprising the set of keys for the binding in ascending
order. (Keyboard shortcuts depend only on the set of simultaneously
pressed keys, not their order, so this change should have no external
effect.) This simplifies comparisons between bindings.
7 years ago
Ryan Dwyer
9e96cfd310
Merge remote-tracking branch 'upstream/master' into atomic
7 years ago
Drew DeVault
867fb6aedb
Merge pull request #2124 from emersion/drag-icons
...
Render drag icons
7 years ago
Nate Symer
6a910b9ba5
Implement gaps (PR #2047 )
7 years ago
emersion
cfd02918c0
Render drag icons
7 years ago
emersion
88cd7616db
Fix compilation errors related to disabled outputs
7 years ago
Ryan Dwyer
bb66e6d578
Refactor everything that needs to arrange windows
...
* 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.
7 years ago
Ryan Dwyer
f9e6d703d2
Make main properties be the pending state
7 years ago
Ryan Dwyer
59c9488701
WIP: Atomic layout updates ground work
7 years ago
Brian Ashworth
e2b2fb0a0e
Switch restore workspaces to a nested for-loop
7 years ago
Brian Ashworth
5c9a917df9
Restore workspaces to outputs based on priority
7 years ago
emersion
acf71fe805
Merge pull request #2119 from martinetd/gcc-strtruncation
...
sway/criteria: gcc string truncation warning fix
7 years ago
Dominique Martinet
720313e185
sway/criteria: gcc string truncation warning fix
7 years ago
Dominique Martinet
d26a0a1a6e
sway exec command: use waitpid instead of wait
7 years ago
Brian Ashworth
212e4ef395
Remove strip quoting and fix strncpy-overlap
7 years ago
emersion
07bee8cffe
Merge pull request #2084 from RedSoxFan/runtime-var-expansion
...
Runtime variable expansion
7 years ago
Brian Ashworth
e072fbc6d9
Switch output storing from list_t to wl_list
7 years ago
Brian Ashworth
a0bbe67076
Address emersions comments on output re-enabling
7 years ago
Brian Ashworth
a1b5b93d29
Store sway_outputs so that they can be reenabled
7 years ago
Brian Ashworth
82b3b587dd
Remove tab/stack check for focusing after a split
7 years ago
Brian Ashworth
e7261e2917
Fix focusing after splitting tabs/stacks
7 years ago
Scott Leggett
609c420501
Initialise previous cursor position.
...
Fix the problem with focus jumping to the container under the cursor
when first starting sway.
7 years ago
Tobias Blass
d6d292897f
Remove suspicious unconditional return
...
This return effectively disables the log_kernel function
7 years ago
Brian Ashworth
f4870d5432
Fix logic issue in do_var_replacement
7 years ago
Brian Ashworth
067fe9d047
Support runtime var expansion and set at runtime
7 years ago
emersion
0f71547032
Merge pull request #2095 from emersion/fullscreen-damage-only-visible
...
Only send frame to visible surfaces when fullscreened
7 years ago
emersion
6b9ffbad20
Merge pull request #2103 from RyanDwyer/focus-fixes
...
Focus fixes
7 years ago
Brian Ashworth
9aaac8b8c8
Fix movement crashes/issues
7 years ago
Ryan Dwyer
1206a60977
Don't restore focus if unmapping surface wasn't focused
7 years ago
Ryan Dwyer
bcdb676abb
Don't set focus to NULL when clicking a surface which has no container
7 years ago
Ryan Dwyer
9253278328
Restore focus when unmapping layer shell surfaces
7 years ago
Ryan Dwyer
74799937cf
Restore focus when unmapping unmanaged xwayland surfaces
7 years ago
emersion
0549fd027b
Merge pull request #2087 from RedSoxFan/output-subcommand
...
Refactor cmd_output to use config_subcommand
7 years ago
emersion
6d0ad6a1ed
Merge pull request #2099 from RyanDwyer/fix-seat-get-active-child
...
Fix seat_get_active_child
7 years ago
Brian Ashworth
51fa988be9
Address review comments for output subcommands
7 years ago
Brian Ashworth
5ea4a4d3ee
Refactor cmd_output to use config_subcommand
7 years ago
Ryan Dwyer
d02e9aa4bc
Fix initial workspace orientation on a rotated output
7 years ago
Ryan Dwyer
57e78414fa
Fix seat_get_active_child
...
seat_get_active_child is used for tabbed and stacked containers to get
the active child. The previous implementation used seat_get_focus_inactive
then ascended the tree to the child of the tabbed/stacked container, but
this fails when the workspace itself is stacked or tabbed and the most
recently active child is floating.
The new implementation takes a more simple approach, where it directly
scans the focus stack for the first immediate child which isn't the
floating container.
Fixes #2098 .
7 years ago
emersion
ebe0b668c9
Merge pull request #2093 from emersion/damage-debug
...
Add SWAY_DAMAGE_DEBUG
7 years ago
emersion
8e3d19aad2
Merge pull request #2096 from kupospelov/fix-title-update
...
Fix view title update order
7 years ago
Ryan Dwyer
8289e30308
Fix potential crash when destroying workspace
...
`_container_destroy` emits a destroy event, and any listener for this
event should have access to the full container, not a half destroyed
one.
`_container_destroy` also destroys the swayc, so we have to grab a
reference to the sway_workspace so we can free it afterwards.
This also fixes a memory leak where the floating container wasn't freed.
Fixes #2092 .
7 years ago
Konstantin Pospelov
e6baac4297
Fix view title update order
...
This commit fixes the function call order to make sure that the title
texture is updated using the relevant global font size.
7 years ago
emersion
55b855d867
Add SWAY_DAMAGE_DEBUG
...
Setting it to "rerender" will always re-render everything
regardless of the damaged region. Setting it to "highlight" will
clear the screen and render only damaged regions.
7 years ago
emersion
34bdf25bb5
Only send frame to visible surfaces when fullscreened
7 years ago
emersion
51eee3aecc
Schedule a frame even if damage is empty
7 years ago
Dominique Martinet
71ab13f1eb
sway/config: fix use-after-free for end of block
...
Introduced in 7c810dc344
7 years ago
Drew DeVault
df204b65d8
Merge pull request #2089 from emersion/send-frame-done-visible
...
Only send frame done to visible views
7 years ago
emersion
65845be802
Only send frame done to visible views
...
Also don't accumulate empty damage
7 years ago
Brian Ashworth
8bfa2def88
Address first round of review for generic blocks
7 years ago
Brian Ashworth
51bb9d8573
Support braces on next line for config blocks
7 years ago
Brian Ashworth
7c810dc344
Make command block implementation generic
7 years ago
emersion
2d480e754e
Merge pull request #2080 from frsfnrrg/keyboard-remodeling
...
Reduce work duplication in keyboard and binding code
7 years ago
Ryan Dwyer
3f1cfd547e
Fix top border when a view is initially floating
...
Fixes #2085 .
7 years ago
frsfnrrg
78b7b46895
Style fix, redundant entry removal, fix extra keysym delete
7 years ago
frsfnrrg
480f0c593c
Rename update_shortcut_model to update_shortcut_state
7 years ago
frsfnrrg
83d559dd03
Rename check_shortcut_model to get_active_binding
7 years ago
frsfnrrg
c53e4e6cde
Style fixed for keyboard.c
7 years ago
frsfnrrg
eb00edc6e2
Style fixes for bind.c
7 years ago
frsfnrrg
f2fe93d171
Remove almost-always redundant loop in key handling
7 years ago
frsfnrrg
705230a26c
Fix binding bindcode flag initialization
7 years ago
frsfnrrg
a056419ad7
Rewrite shortcut handling code to avoid hardcoded values
...
The same shortcut algorithm is now used for keycodes,
raw keysyms, and translated keysyms. Pressed keysyms
are now stored in association with the keycodes that
generated them. Modifier keycodes (and associated
keysyms) are identified retroactively by the subsequent
change to the modifier flags.
7 years ago
frsfnrrg
f5ed65e633
Use XKB keycode numbering for bindcode
7 years ago
frsfnrrg
d77681ea3d
Share common code between bindsym and bindcode commands
7 years ago
Drew DeVault
96446fdbf7
Merge pull request #2027 from RyanDwyer/implement-floating
...
Implement floating
7 years ago
Brian Ashworth
edf37f27e1
Fix cmd_workspace crash when a surface has focus
7 years ago
Ryan Dwyer
70c2c50445
Fix changing borders on floating views
7 years ago
Ryan Dwyer
d466b8fa7b
Don't auto float xdg views if their dimensions are not set
7 years ago
Ryan Dwyer
a2c1cb9072
Fix mpv damage issue when unfullscreening into floating
7 years ago
Ryan Dwyer
c9e3a313b4
Fix fullscreen position of xwayland views
7 years ago
Ryan Dwyer
00cac22038
Fix crash when using multiple outputs
7 years ago
Drew DeVault
e605dc43bb
Fix mouse warping interaction with layout coords
7 years ago
Ryan Dwyer
c9f8d35ca9
Consider floating views when calculating title height
7 years ago
Ryan Dwyer
9119f87655
Fix floating position when view is floated when mapped
7 years ago
Ryan Dwyer
f7cadf2333
Adjust move command to account for changed coordinate system
7 years ago
Ryan Dwyer
f24087d104
Fix fullscreen position
7 years ago
Ryan Dwyer
97672295ed
Don't unmaximize floating views
7 years ago
Ryan Dwyer
40af5d81a1
Fix getting adjacent output
7 years ago
Ryan Dwyer
becceafa7f
Remove unfinished wants_floating implementation for xwayland
7 years ago
Ryan Dwyer
5b1601c2e3
Don't let xwayland views set position unless unmanaged
7 years ago
Ryan Dwyer
02d385e06f
Use swayc rather than wlr_output when rendering
7 years ago
Ryan Dwyer
3b1db30a5e
Use surface size if xdg shell's geometry isn't set
7 years ago
Ryan Dwyer
4371c746e4
Implement wants_floating for xdg_shell and xdg_shell_v6
7 years ago
Ryan Dwyer
d4ed204d4d
Remove container_self_or_parent_floating
7 years ago
Ryan Dwyer
70f5d6fcf3
Rename container_set_geometry_from_view
7 years ago
Ryan Dwyer
3281574fa3
Remove check for if floating view intersects output
7 years ago
Ryan Dwyer
7d2b33a458
Render floating views before top layer and unmanaged
7 years ago
Ryan Dwyer
e4e912ea91
Store swayc coordinates as layout-local
7 years ago
Ryan Dwyer
00f6e179cd
Add L_FLOATING back to debug tree
7 years ago
Ryan Dwyer
02de2a6f65
Rename set_maximized functions to set_tiled
7 years ago
Ryan Dwyer
5d69a56209
Prevent splitting a floating view
7 years ago
Ryan Dwyer
dc83b158e1
Fix issues with sticky containers and workspaces
...
* Attach sticky containers to new workspaces when switching
* Fire the close event *before* we start destroying the workspace to
prevent a crash
Because the sticky container now follows the visible workspace, this
simplifies the rendering and container_at logic.
7 years ago
Ryan Dwyer
13a4b0512e
Fix unfullscreening a floating view
7 years ago
Ryan Dwyer
754cb7944c
Respect view's border config for floating containers
7 years ago
Ryan Dwyer
aaba7642b3
Replace is_floating boolean with function
7 years ago
Ryan Dwyer
34f35f0bad
Use L_FLOATING instead of reapable boolean
7 years ago
Ryan Dwyer
1f2e399ade
Implement floating
7 years ago
Drew DeVault
1132efe42e
Send frame done to floating views
...
Also centers them on the screen when initially floated
In the future we'll need a more sophisticated solution than that
7 years ago
Drew DeVault
71db8de4be
Render floating views
7 years ago
Drew DeVault
f3ab895916
Implement `floating enable`
7 years ago
emersion
c47d6cb1c4
Merge pull request #2081 from RedSoxFan/fix-2077
...
Send reparent events in container_split
7 years ago
Brian Ashworth
8237d944d4
Fix move perpendicular segfault
7 years ago
Brian Ashworth
cca587b21f
Send reparent events in container_split
7 years ago
Brian Ashworth
e13c94f2dd
Fix typo
7 years ago
Brian Ashworth
633bee9019
Fix moving out of tab/stack when only child
7 years ago
Brian Ashworth
64225b1137
Send IPC layout of node itself
7 years ago
Brian Ashworth
3b90b55666
Notify of subtree change
7 years ago
Brian Ashworth
f5e44d4b2c
Fix layout in -t get_tree
7 years ago
Brian Ashworth
103a302fa4
Fix moving out of a tabbed/stacked workspace
7 years ago
Brian Ashworth
a66fd74a54
Fix breaking out of tabs/stacks
7 years ago
Ryan Dwyer
6f4cb2b29d
Add tree representation to IPC workspace description
7 years ago
Brian Ashworth
d76729af22
Implement config parser for workspace_layout
7 years ago
Brian Ashworth
205a1732cf
Force fullscreen views to be fully opaque
7 years ago
Brian Ashworth
c81d0ef1e8
Support i3's legacy force_focus_wrapping command
7 years ago
emersion
1071785f56
Merge pull request #2060 from RedSoxFan/focus-wrapping
...
Implement focus_wrapping
7 years ago
emersion
015878e5db
Merge pull request #2058 from RyanDwyer/refactor-parse-title-format
...
Refactor parse_title_format
7 years ago
Brian Ashworth
46da1dc32b
Implement focus_wrapping
7 years ago
Ryan Dwyer
7c7d24600b
Fix ancestor typos
7 years ago
Ryan Dwyer
9df1432f56
Refactor parse_title_format
...
Don't read properties until needed, and do it with less lines of code.
7 years ago
Drew DeVault
b2c0ba5b18
Merge pull request #2050 from smlx/focus-fix
...
Focus containers only on entry.
7 years ago
Drew DeVault
53a3fc63c5
Merge pull request #2055 from RedSoxFan/output-destroy-workspace-ipc
...
Send workspace::move in container_output_destroy
7 years ago
frsfnrrg
a78a5684ea
Implement bindsym/bindcode --locked
...
Adds the --locked flag to bindsym and bindcode commands.
When a keyboard's associated seat has an exclusive client
(i.e, a screenlocker), then bindings are only executed if
they have the locked flag. When there is no such client,
this restriction is lifted.
7 years ago
Scott Leggett
4d8120ccf3
Improve comment.
7 years ago
Brian Ashworth
fd137c4f05
Send workspace::move in container_output_destroy
7 years ago
Scott Leggett
b57f88e7db
Avoid assert on container type.
7 years ago
Scott Leggett
1b8de39287
Move previous cursor_position inline.
7 years ago