Commit Graph

4816 Commits

Author SHA1 Message Date
Ryan Dwyer b542c5413e
Merge pull request #2739 from RedSoxFan/fix-2653
Fix smart gaps
2018-10-02 08:57:55 +10:00
Ryan Dwyer 82559c16c7
Merge branch 'master' into fix-2653 2018-10-02 08:14:01 +10:00
Drew DeVault 9956a1a9ab
Merge pull request #2735 from RedSoxFan/fix-quotes
Do not strip quotes for exec or bind commands
2018-10-01 20:18:54 +02:00
Brian Ashworth 742d1764a6 Fix smart gaps 2018-10-01 09:41:15 -04:00
Drew DeVault 51f68e10ad
Merge pull request #2737 from Ragnis/criteria-floating
Parse floating criteria
2018-09-30 19:29:26 +02:00
Ragnis Armus 1bd695ffd2 Parse floating criteria 2018-09-30 19:59:32 +03:00
Brian Ashworth a125575eb5 Do not strip quotes for cmd_set 2018-09-30 12:35:45 -04:00
Brian Ashworth 87a70b3591 Do not strip quotes for exec or bind commands
Leave quotes intact for cmd_exec, cmd_exec_always, cmd_bindcode,
and cmd_bindsym
2018-09-30 10:39:29 -04:00
emersion bebe7dea8c
Merge pull request #2734 from ivyl/use_rpath
Add support for installing binaries with DT_RPATH
2018-09-30 15:04:13 +02:00
Arkadiusz Hiler eed0bc3ebd Add support for installing binaries with DT_RPATH
It's better to use DT_RPATH dynamic section of the elf binary to store
the paths of libraries to load instead of overwriting LD_LIBRARY_PATH
for the whole environment, causing surprises. This solution is much more
transparent and perfectly suitable for running contained installations
of wayland/wlroots/sway.

The code unsetting the LD_LIBRARY_PATH/LD_PRELOAD was also deleted as
it's a placebo security at best - we should trust the execution path
that leads us to running sway, and it's way too late to care about those
variables since we already started executing our compositor, thus we
would be compromised anyway.
2018-09-30 15:37:01 +03:00
Drew DeVault f1dbdce0b2
Merge pull request #2726 from RyanDwyer/overhaul-gaps
Make gaps implementation consistent with i3-gaps
2018-09-30 13:47:35 +02:00
Drew DeVault e518c5dbaf
Merge pull request #2728 from RedSoxFan/move-sticky-on-evac
Move sticky containers in output_evacuate
2018-09-30 13:45:31 +02:00
Drew DeVault 8f6aca2166
Merge pull request #2725 from PumbaPe/add-tap-and-drag
Add tap and drag to sway-input
2018-09-30 13:44:11 +02:00
Drew DeVault 7355959d7f
Merge pull request #2730 from ivyl/remove_cap_leftovers
Remove libcap/prctl artifacts
2018-09-30 13:41:36 +02:00
Arkadiusz Hiler 1e70f7b19e Turn funcs() into funcs(void)
If they really do not take undefined number of arguments.
2018-09-30 14:09:05 +03:00
Arkadiusz Hiler d8200012fb Remove declarations that do no have definitions
There is a couple of leftover header files/declarations, which were
fronting implementations that are long gone.

Let's get rid of them.
2018-09-30 14:09:05 +03:00
Arkadiusz Hiler 00dfb76832 Remove libcap/prctl artifacts
They seem like relics of the pasts, from when we were retaining the
ptrace cap.

Some translations still may need updates.
2018-09-30 13:39:26 +03:00
emersion 98b524abd7
Merge pull request #2733 from ianyfan/swaybar
swaybar: synchronize rendering to output frames
2018-09-30 11:44:27 +02:00
Ian Fan 02dfeea54c swaybar: synchronize rendering to output frames 2018-09-30 10:07:33 +01:00
emersion 4eb3fe4830
Merge pull request #2732 from RyanDwyer/fix-zero-outputs
Fix hotplugging down to zero outputs
2018-09-30 10:03:59 +02:00
Ryan Dwyer 24bcb507ec Fix hotplugging down to zero outputs
When the last output is disconnected, output_disable is called like
usual and evacuates the output to the root->saved_workspaces list. It
then calls root_for_each_container to remove (untrack) the output from
each container's outputs list. However root_for_each_container did not
iterate the saved workspaces, so when the output gets freed the
containers would have a dangling pointer in their outputs list. Upon
reconnect, container_discover_outputs would attempt to use the dangling
pointer, causing a crash.

This makes root_for_each_container check the saved workspaces list,
which fixes the problem.
2018-09-30 11:58:56 +10:00
emersion a53171669a
Merge pull request #2698 from ianyfan/hide-cursor
Only show cursor if pointer configured
2018-09-29 14:32:05 +02:00
PP ae2b70f59e add tap-and-drag setting to sway-input 2018-09-29 11:49:41 +02:00
emersion 351e722b6e
Merge pull request #2729 from RyanDwyer/resize-return-false
Return an error when resizing is a no op
2018-09-29 11:24:54 +02:00
emersion 0f0d0c7f9b
Merge pull request #2635 from RedSoxFan/fix-bg-special
Handle shell special characters in bg file path
2018-09-29 11:23:38 +02:00
Ryan Dwyer 42f1fdf015 Return an error when resizing is a no op 2018-09-29 17:05:55 +10:00
Brian Ashworth 8f09ba7885 Move sticky containers in output_evacuate 2018-09-28 23:47:22 -04:00
Brian Ashworth 0a0cf4540a Fix quote handling for commands
Quotes are now stripped for all arguments and stripped before anything is unescaped
2018-09-28 23:12:24 -04:00
Brian Ashworth af45ee2d8b Handle shell special characters in bg file path
This changes it back so the path given to swaybg is enclosed in quotes.

Additionally, the only character that is escaped in the path stored is
double quotes now. This makes it so we don't need to keep an exhaustive
list of characters that need to be escaped.

The end user will still need to escape these characters in their config
or when passed to swaybg.
2018-09-28 23:12:24 -04:00
Ryan Dwyer 7661c71b33 Update gaps documentation 2018-09-29 12:59:02 +10:00
Ryan Dwyer bb708d0f82 Don't allow negative gaps 2018-09-29 12:58:54 +10:00
Ryan Dwyer 415a48ac63 Make gaps implementation consistent with i3-gaps
This changes our gaps implementation to behave like i3-gaps.

Our previous implementation allowed you to set gaps on a per container
basis. This isn't supported by i3-gaps and doesn't seem to have a
practical use case. The gaps_outer and gaps_inner properties on
containers are now removed as they just read the gaps_inner from the
workspace.

`gaps inner|outer <px>` no longer changes the gaps for all workspaces.
It only sets defaults for new workspaces.

`gaps inner|outer current|workspace|all set|plus|minus <px>` is now
runtime only, and the workspace option is now removed. `current` now
sets gaps for the current workspace as opposed to the current container.

`workspace <ws> gaps inner|outer <px>` is now implemented. This sets
defaults for a workspace.

This also fixes a bug where changing the layout of a split container
from linear to tabbed would cause gaps to not be applied to it until you
switch to another workspace and back.
2018-09-29 11:08:19 +10:00
Drew DeVault dc01e884f7
Merge pull request #2724 from RedSoxFan/update-man-pages
Update man pages - dynamic vars and generic blocks
2018-09-28 22:07:27 +02:00
Brian Ashworth a9d9944e76 sway{,bar,input}.5: changes for generic blocks 2018-09-28 13:30:54 -04:00
Brian Ashworth cc6544c538 sway.5: update set command information 2018-09-28 13:30:54 -04:00
Drew DeVault ca7084cb52
Merge pull request #2723 from ianyfan/swaybar
swaybar: small fixes and clean-ups
2018-09-28 16:44:35 +02:00
Ian Fan 25e1f32738 swaybar: trim function prototypes 2018-09-28 14:09:33 +01:00
Ian Fan 751bb4a376 swaybar: move i3bar definitions into separate file 2018-09-28 13:54:58 +01:00
Ian Fan bcd2a8fe12 swaybar: remove unused focused_output property 2018-09-28 13:54:58 +01:00
Ian Fan 98576b9dda swaybar: fix setting binding mode indicator 2018-09-28 13:48:59 +01:00
Ian Fan 312d009f65 swaybar: fail if bar id is invalid 2018-09-28 13:48:59 +01:00
emersion 02df1e2b1b
Merge pull request #2722 from RyanDwyer/workspace-configs
Rename workspace_outputs to workspace_configs and fix memory leak
2018-09-28 14:45:08 +02:00
Ryan Dwyer 56e9f31b2f Check for NULL output in workspace_valid_on_output 2018-09-28 22:35:38 +10:00
Ryan Dwyer 138d10d5d6 Rename workspace_outputs to workspace_configs and fix memory leak
When we eventually implement `workspace <ws> gaps inner|outer <px>`,
we'll need to store the gaps settings for workspaces before they're
created. Rather than create a workspace_gaps struct, the approach I'm
taking is to rename workspace_outputs to workspace_configs and then add
gaps settings to that.

I've added a lookup function workspace_find_config. Note that we have a
similar thing for outputs (output_config struct and output_find_config).

Lastly, when freeing config it would create a memory leak by freeing the
list items but not the workspace or output names inside them. This has
been rectified using a free_workspace_config function.
2018-09-28 22:35:38 +10:00
emersion 1698260533
Merge pull request #2720 from swaywm/swaylock-shadow
Add support for building swaylock without PAM
2018-09-28 14:17:37 +02:00
Drew DeVault c977349120 Add support for building swaylock without PAM
This involves setuid'ing swaylock, which then forks and drops perms on
the parent process. The child process remains root and listens on a pipe
for requests to validate passwords against /etc/shadow.
2018-09-28 13:53:01 +02:00
Drew DeVault 813de9f7ac
Merge pull request #2716 from sghctoma/fix-swaybar-freebsd
Replace getdelim to make swaybar work on FreeBSD
2018-09-28 04:22:18 -05:00
Ryan Dwyer 5104bd2c59
Merge pull request #2663 from ianyfan/fix-txn-state-leaks
Free transaction state upon destruction by removing pointer indirection
2018-09-28 18:27:01 +10:00
Ian Fan 0dfcadc1cf transaction: do not use pointers for state 2018-09-28 09:18:24 +01:00
Drew DeVault 0b2afee711
Merge pull request #2719 from RyanDwyer/fix-view-is-visible
Fix floating views in tabbed/stacked workspaces not getting frame events
2018-09-28 02:12:18 -05:00