Commit graph

4355 commits

Author SHA1 Message Date
Brian Ashworth a7f7d4a488 Write to swaynag pipe fd directly on config errors 2018-08-03 10:37:35 -04:00
Brian Ashworth f9a6407111 Show swaynag on config errors 2018-08-03 10:37:35 -04:00
Ryan Dwyer 3e2bf7f3a5
Merge pull request #2417 from marienz/swaynag-includes
Add missing stdlib.h includes to swaynag
2018-08-03 19:58:42 +10:00
Marien Zwart 4df8858873 Add missing stdlib.h includes to swaynag 2018-08-03 19:24:44 +10:00
emersion b49904dd7e
Merge pull request #2414 from RyanDwyer/fix-inactive-fullscreen-crash
Fix crash when fullscreen view closes on inactive workspace
2018-08-03 09:56:46 +01:00
emersion 16c1e21f26
Merge pull request #2415 from RyanDwyer/fix-fullscreen-container-crash
Fix crash when moving cursor over a fullscreen split container
2018-08-03 09:47:54 +01:00
emersion 942f92f3eb
Merge pull request #2413 from RyanDwyer/dont-move-empty-workspace
Deny "move container" when an empty workspace is focused
2018-08-03 09:45:24 +01:00
Ryan Dwyer c17f0870ef Fix crash when moving cursor over a fullscreen split container
Calling container_at_view fails an assertion if the container isn't a
view. Calling tiling_container_at works correctly, as that function
checks if the container is a view and calls container_at_view if so.
2018-08-03 18:08:20 +10:00
Ryan Dwyer 854c5fbec8 Fix crash when fullscreen view closes on inactive workspace
When a view unmaps, normally the surviving ancestor (ie. after reaping)
needs to be arranged. When a fullscreen view unmaps, it arranges the
workspace rather than the surviving ancestor, but didn't handle cases
where the workspace itself was reaped. This happens if the workspace is
not currently shown and the fullscreen view was the last container on
that workspace.

This commit rewrites this part of view_unmap so it's more readable, and
fixes the crash by not arranging the workspace if it's been reaped. Note
that it no longer arranges the output under any circumstance - this
wasn't required anyway.
2018-08-03 17:55:58 +10:00
Ryan Dwyer 9e8d628a17 Deny "move container" when an empty workspace is focused 2018-08-03 17:13:37 +10:00
Brian Ashworth 5ac3509d54
Merge pull request #2408 from ianyfan/exit-nag
Change exit binding in default config to nag user, matching i3
2018-08-02 22:35:26 -04:00
Brian Ashworth b16043aeeb
Merge branch 'master' into exit-nag 2018-08-02 22:18:14 -04:00
emersion 4eadf9f3ae
Merge pull request #2325 from emersion/wlr-gamma-control
Enable wlr-gamma-control-unstable-v1
2018-08-02 23:59:20 +01:00
emersion 3a54e2291c
Merge branch 'master' into wlr-gamma-control 2018-08-02 23:49:25 +01:00
Ryan Dwyer e07da5fc5c
Merge pull request #2411 from emersion/fullscreen-pointer-input
Fix pointer events for fullscreen views
2018-08-03 08:18:09 +10:00
emersion b336564511 Fix pointer events for fullscreen views 2018-08-02 22:48:43 +01:00
Drew DeVault 2ecba101fd
Merge pull request #2410 from minus7/fix-fullscreen
Fix crash on mouse motion on fullscreen container
2018-08-02 17:33:38 -04:00
minus e72f86784c Fix crash on mouse motion on fullscreen container
container_at expects a workspace, not the fullscreened container.
Fixes #2409
2018-08-02 23:19:01 +02:00
Ian Fan 94888e58a2 config.in: nag user on exit 2018-08-02 15:42:43 +01:00
Drew DeVault 3eda76de48
Merge pull request #2407 from RyanDwyer/fix-popups-v3
Fix popups v3
2018-08-02 09:46:53 -04:00
Ryan Dwyer 787f08da7f Convert toplevel coordinates to output-local 2018-08-02 23:36:36 +10:00
Ryan Dwyer 8392eae40f Revert "Revert "Fix popups""
This reverts commit 9aa258d33a.

Reverting the revert, so that popups can be fixed.
2018-08-02 23:36:36 +10:00
Drew DeVault ea14ef4095
Merge pull request #2366 from RedSoxFan/nagbar
Implement swaynag
2018-08-02 09:28:13 -04:00
Ryan Dwyer 706c0fbe23
Merge branch 'master' into nagbar 2018-08-02 23:05:49 +10:00
Drew DeVault 9aa258d33a Revert "Fix popups"
This reverts commit de86d65627.
2018-08-02 09:05:46 -04:00
Drew DeVault 8e60f6a732
Merge pull request #2404 from RyanDwyer/move-containers-when-workspace-focused
Allow moving containers when workspace itself is focused
2018-08-02 08:11:23 -04:00
Drew DeVault 23b5124a4d
Merge pull request #2403 from RyanDwyer/fix-transaction-unmap
Fix race condition crashes when unmapping views
2018-08-02 08:10:16 -04:00
Drew DeVault eec25ce60e
Merge pull request #2406 from RyanDwyer/fix-focus-crashes
Fix focus related crashes
2018-08-02 08:07:40 -04:00
emersion e2eaf7b9b5
Merge pull request #2405 from marienz/sigmask
Reset signal mask after fork
2018-08-02 13:03:54 +01:00
Ryan Dwyer 9339026a31 Fix focus related crashes
* seat_set_focus_warp lacked a container NULL check
* view mapping code needs to use seat_get_focus_inactive

Also, seat_set_focus_warp triggered the wrong IPC event if focus was a
workspace, which resulted in swaybar not showing the workspace as
active.
2018-08-02 21:55:37 +10:00
Marien Zwart 7d8413d962 Reset signal mask after fork
wlroots uses wl_event_loop_add_signal to handle SIGUSR1 from Xwayland.
wl_event_loop_add_signal works by masking the signal and receiving it from a
signalfd. The signal mask is preserved across fork and exec, so subprocesses
spawned by Sway start with SIGUSR1 masked. Most subprocesses do not expect this
and never unmask the signal, resulting in missing functionality or unexpected
behavior for processes that use SIGUSR1 (such as i3status).

Fix this by unmasking all signals between fork and exec.
2018-08-02 21:31:34 +10:00
Ryan Dwyer d64c8df7ce Allow moving containers when workspace itself is focused 2018-08-02 20:59:44 +10:00
Ryan Dwyer 8314019f66 Fix race condition crashes when unmapping views
This fixes two issues which were both introduced in #2396.

First issue:
The PR changes the location of the buffer save to transaction_apply, but
puts it inside the should_configure block. For unmapping (destroying)
views, should_configure returns false so it wasn't saving the buffer. If
a frame was rendered between the unmap and the transaction applying then
it would result in a crash.

Second issue:
If a destroying view is involved in two transactions, we must not
release the buffer between the transactions because there is no live
buffer to grab any more.
2018-08-02 20:54:03 +10:00
Michel Ganguin d6095588a1 Link xcb dependency to meson options "enable_xwayland" (#2393)
* Link xcb dependency to meson options "enable_xwayland"

* Link xcb dependency to meson options "enable_xwayland"
2018-08-02 08:36:47 +01:00
emersion fe39129b96
Merge pull request #2396 from RyanDwyer/fix-resize-wiggle
Correctly track saved surfaces during multiple transactions
2018-08-02 08:20:39 +01:00
emersion 47bf4ed0cb
Merge branch 'master' into fix-resize-wiggle 2018-08-02 08:11:10 +01:00
Brian Ashworth 26c5ef18ba swaynag: don't drop \n for first line 2018-08-01 22:55:20 -04:00
Brian Ashworth 41d858b439 swaynag: add blank lines after headings in scdocs 2018-08-01 22:47:54 -04:00
Brian Ashworth 1e7fbe493e swaynag: swaybar like default colors 2018-08-01 22:47:54 -04:00
Brian Ashworth 4f5cf330c8 swaynag: address some more of sircmpwn's comments
Fixes segfauls for any case where swaynag->outputs was not inititalized
including -h/--help, -v/--version, and invalid arguments.

Sets sane defaults for colors not given. Any color not given will
fallback to the default color values for type error.

Adds support for a hidpi cursor
2018-08-01 22:47:54 -04:00
Brian Ashworth 0ef3988438 swaynag: fix hidpi 2018-08-01 22:47:54 -04:00
Brian Ashworth e01acb6097 swaynag: allow more config options 2018-08-01 22:47:54 -04:00
Brian Ashworth ca40298af4 swaynag: add math to meson.build 2018-08-01 22:47:54 -04:00
Brian Ashworth 894d57f192 swaynag: fix output selection 2018-08-01 22:47:54 -04:00
Brian Ashworth a6145914c6 swaynag: refactor {sway_,}nagbar to swaynag 2018-08-01 22:47:54 -04:00
Brian Ashworth 6124d0f9a2 swaynag: split config into own file and fix optind 2018-08-01 22:47:54 -04:00
Drew DeVault 58f3fa74ae Disable pango markup for extended message 2018-08-01 22:47:54 -04:00
Drew DeVault 37709917b1 Set output to NULL if not specified
This opens nagbar on the active output.
2018-08-01 22:47:54 -04:00
Brian Ashworth 8463a2896a swaynag: implement config file support 2018-08-01 22:47:54 -04:00
Brian Ashworth a4f7bf23b2 Address first round review for swaynag 2018-08-01 22:47:54 -04:00