Commit Graph

4172 Commits

Author SHA1 Message Date
Ryan Dwyer
289d696adc Implement transaction timings debug
Launch sway with SWAY_DEBUG=txn_timings to enable it.
2018-06-25 09:09:43 +10:00
emersion
eeb38d65cb
xwayland: accept configure requests from floating views 2018-06-24 19:21:02 +01:00
Ryan Dwyer
a3976e2659 Fix another crash when moving out of stacks or tabs 2018-06-24 23:07:52 +10:00
Ryan Dwyer
1549fb719a Implement atomic layout updates for xwayland views 2018-06-24 23:01:09 +10:00
Ryan Dwyer
b6a238c7b7 Fix crash when running move <direction> in an empty workspace 2018-06-24 16:03:24 +10:00
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.
2018-06-24 15:50:53 +10:00
Ryan Dwyer
33e03cb277 Fix crash related to stacks and tabs 2018-06-24 13:08:47 +10:00
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.
2018-06-24 12:33:23 +10:00
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.
2018-06-23 17:47:28 +10:00
Ryan Dwyer
b11c9199a6 Merge remote-tracking branch 'upstream/master' into atomic 2018-06-23 16:26:20 +10:00
Ryan Dwyer
38398e2d77 Implement atomic layout updates for tree operations
This implements atomic layout updates for when views map, reparent or
unmap.
2018-06-23 16:24:11 +10:00
Drew DeVault
5222e14555
Merge pull request #2155 from ael-code/fix_output_command_failure
bugfix: avoid access after free
2018-06-22 06:53:17 -07:00
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.
2018-06-22 15:41:44 +02:00
Drew DeVault
e8fbda4d21
Merge pull request #2146 from tobiasblass/prepare_server_before_dropping_privileges
Perform (partial) server initialization before dropping privileges.
2018-06-22 06:41:34 -07:00
emersion
abdbf3c1d7
Merge pull request #2152 from atomnuker/master
Init the dmabuf exporting protocol in wlroots
2018-06-22 14:40:12 +01:00
Rostislav Pehlivanov
aa9f058e3e Init the dmabuf exporting protocol in wlroots
Allows desktop capture via the dmabuf-capture wlroots example client.
2018-06-22 13:45:32 +01:00
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.
2018-06-19 00:19:57 +02:00
emersion
cda66e9a26
Automatically float xwayland windows 2018-06-18 22:52:10 +01:00
Ryan Dwyer
1c89f32533 Preserve buffers during transactions
* Also fix parts of the rendering where it was rendering the pending
state instead of current.
2018-06-18 20:42:12 +10:00
Ryan Dwyer
645bf446fa Merge remote-tracking branch 'upstream/master' into atomic 2018-06-18 15:58:48 +10:00
Drew DeVault
202ee51150
Merge pull request #2143 from vilhalmer/mark-pool-buffers-busy
Set pool_buffers busy when handing them out
2018-06-17 14:55:29 -07:00
vil
8884a063c1
Merge branch 'master' into mark-pool-buffers-busy 2018-06-17 17:37:58 -04:00
vilhalmer
54a5ee2747
Set pool_buffers busy when handing them out 2018-06-17 17:34:12 -04:00
Drew DeVault
7c44ca95f9
Merge pull request #2140 from Hello71/patch-2
swayidle: fix stack overflow on sleep
2018-06-17 11:26:57 -07:00
Alex Xu (Hello71)
7ed81cfd36 swayidle: fix stack overflow on sleep 2018-06-17 13:57:40 -04:00
Drew DeVault
378697b79d
Merge pull request #2135 from emersion/wlroots-1060
Update for swaywm/wlroots#1060
2018-06-16 14:07:25 -07:00
emersion
088cae45c8 Update for swaywm/wlroots#1060 2018-06-16 13:32:23 -04:00
Drew DeVault
55fe5fc580
Merge pull request #2130 from frsfnrrg/keyboard-tuning
Clean up keyboard handling code
2018-06-13 05:53:02 -07:00
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.
2018-06-12 20:26:57 -04:00
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.
2018-06-12 11:26:24 -04:00
Ryan Dwyer
9e96cfd310 Merge remote-tracking branch 'upstream/master' into atomic 2018-06-11 11:03:43 +10:00
Drew DeVault
867fb6aedb
Merge pull request #2124 from emersion/drag-icons
Render drag icons
2018-06-09 10:50:34 -07:00
Drew DeVault
d9fc381e02
Merge pull request #2047 from natesymer/master
Implement Gaps
2018-06-09 08:43:18 -07:00
Nate Symer
6a910b9ba5 Implement gaps (PR #2047) 2018-06-09 09:34:56 -04:00
emersion
cfd02918c0
Render drag icons 2018-06-09 13:26:03 +01:00
emersion
21d98d5bfb
Merge pull request #2123 from emersion/fix-disabled-outputs
Fix compilation errors related to disabled outputs
2018-06-09 12:09:16 +01:00
emersion
88cd7616db
Fix compilation errors related to disabled outputs 2018-06-09 11:38:16 +01:00
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.
2018-06-09 10:11:25 +10:00
Ryan Dwyer
f9e6d703d2 Make main properties be the pending state 2018-06-09 10:08:43 +10:00
Ryan Dwyer
59c9488701 WIP: Atomic layout updates ground work 2018-06-09 10:08:43 +10:00
Ryan Dwyer
0b798ed954
Merge pull request #2115 from RedSoxFan/restore-workspaces
Restore workspaces to output when re-enabled
2018-06-09 08:43:57 +10:00
Brian Ashworth
e2b2fb0a0e Switch restore workspaces to a nested for-loop 2018-06-08 13:08:00 -04:00
Brian Ashworth
5c9a917df9 Restore workspaces to outputs based on priority 2018-06-08 13:08:00 -04:00
emersion
c65c84444e
Merge pull request #2121 from martinetd/swaylock-ctrl-u
swaylock: implement ^U to clear buffer
2018-06-08 16:03:50 +01:00
Dominique Martinet
c78ce0770a swaylock: implement ^U to clear buffer
The whole state->xcb.modifiers thing didn't work at all (always 0)
The xkb doc says "[xkb_state_serialize_mods] should not be used in
regular clients; please use the xkb_state_mod_*_is_active API instead"
so here it is
2018-06-08 22:42:15 +09:00
emersion
acf71fe805
Merge pull request #2119 from martinetd/gcc-strtruncation
sway/criteria: gcc string truncation warning fix
2018-06-08 14:41:33 +01:00
emersion
231c72a141
Merge pull request #2120 from martinetd/swayidle-zombies
Swayidle: doublefork to not leave zombies around
2018-06-08 14:41:22 +01:00
Dominique Martinet
720313e185 sway/criteria: gcc string truncation warning fix 2018-06-08 22:30:13 +09:00
Dominique Martinet
d26a0a1a6e sway exec command: use waitpid instead of wait 2018-06-08 22:28:28 +09:00
Dominique Martinet
2477930d90 swayidle: doublefork to not leave zombies around 2018-06-08 22:28:28 +09:00