Commit Graph

3995 Commits

Author SHA1 Message Date
Ryan Dwyer
0bf0a4fa40 Don't unescape \\ in criteria 2018-05-11 10:42:24 +10:00
Ryan Dwyer
3b0c26d149 Overhaul criteria implementation
The criteria struct now uses properties for each token type rather than
the list_t list of tokens. The reason for this is that different token
types have different data types: pcre, string and number to name a few.
This solution should be more flexible moving forward. A bonus of this is
that criteria is now easier to understand when looking at the struct
definition.

The criteria parser has been rewritten because the previous one didn't
support valueless pairs (eg. [class="foo" floating]).

Criteria now has types. Types at the moment are CT_COMMAND,
CT_ASSIGN_WORKSPACE and CT_ASSIGN_OUTPUT. i3 uses types as well.
Previously the assign command was creating a criteria with 'move to
workspace <name>' as its command, but this caused the window to appear
briefly on the focused workspace before being moved to the assigned
workspace. It now creates the view directly in the assigned workspace.

Each view will only execute a given criteria once. This is achieved by
storing a list of executed criteria in the view. This is the same
strategy used by i3.

Escaping now works properly. Previously you could do things like
[class="Fire\"fox"] and the stored value would be 'Fire\"fox', but it
should be (and now is) 'Fire"fox'.

The public functions in criteria.c are now all prefixed with criteria_.

Xwayland views now listen to the set_title, set_class and
set_window_type events and criteria will be run when these happen. XDG
shell has none of these events so it continues to update the title in
handle_commit.

Each view type's get_prop function has been split into get_string_prop
and get_int_prop because some properties like the X11 window ID and
window type are numeric.

The following new criteria tokens are now supported:

* id (X11 window ID)
* instance
* tiling
* workspace
2018-05-11 09:38:53 +10:00
Drew DeVault
8d99edf787
Merge pull request #1948 from RyanDwyer/focus-parent-border
Highlight all child borders when using focus parent
2018-05-10 19:27:57 -04:00
Ryan Dwyer
83e314bf51 Highlight all child borders when using focus parent 2018-05-11 09:20:46 +10:00
Drew DeVault
fbddd34b47
Merge pull request #1923 from emersion/full-damage-tracking
Implement full damage tracking
2018-05-10 18:46:14 -04:00
emersion
44fcc06efd
Fix damage tracking on HiDPI 2018-05-10 23:22:00 +01:00
emersion
90614f3a63
Accumulate surface damage even if whole=true 2018-05-10 23:03:51 +01:00
emersion
c0f5d740a5
Damage container when updating title 2018-05-10 23:03:51 +01:00
emersion
70b80b4698
Damage container on focus 2018-05-10 23:03:50 +01:00
emersion
bec80f1551
Damage borders when damaging view 2018-05-10 23:03:50 +01:00
emersion
98f7ee8f59
Render borders with damage 2018-05-10 23:03:50 +01:00
emersion
c8a9ea3903
Implement full damage tracking 2018-05-10 23:02:37 +01:00
Drew DeVault
3bab37858a
Merge pull request #1932 from emersion/fix-layer-shell-exclusive
layer-shell: use usable_area when arranging non-exclusive layer surfaces
2018-05-10 08:19:03 -04:00
emersion
64bd4d5685
Merge pull request #1950 from RyanDwyer/fix-font-height-reload
Use reasonable default for font height
2018-05-10 12:31:58 +01:00
Ryan Dwyer
497793b5b7 Use reasonable default for font height
Fixes #1949
2018-05-10 21:24:00 +10:00
emersion
3d29e73e72
layer-shell: use usable_area when arranging non-exclusive layer surfaces 2018-05-10 12:19:38 +01:00
emersion
94cf3f1b17
Merge pull request #1947 from dlrobertson/fix_null_deref
Fix null deref in server_init
2018-05-09 20:05:10 +01:00
Dan Robertson
4ebd6f3507
Fix null deref in server_init
If the backend fails to be created, log an error and immidiately return
from server_init.
2018-05-09 16:32:55 +00:00
Drew DeVault
7d707e6865
Merge pull request #1945 from RyanDwyer/fix-title-scissor
Fix titles on rotated outputs
2018-05-09 07:58:23 -04:00
Drew DeVault
98fe969e96
Merge branch 'master' into fix-title-scissor 2018-05-09 07:42:51 -04:00
Drew DeVault
baa34e0f1c
Merge pull request #1944 from RyanDwyer/swaybar-respect-pango
Swaybar: Respect pango_markup config
2018-05-09 07:42:24 -04:00
Ryan Dwyer
4922d269b8 Fix titles on rotated outputs
If the output is rotated, the scissor box needs to be transformed in the
opposite rotation.
2018-05-09 16:41:54 +10:00
Ryan Dwyer
e012b05b00 Swaybar: Respect pango_markup config
Makes swaybar respect the user's pango_markup configuration in the
workspace buttons and binding mode indicator.
2018-05-09 14:54:22 +10:00
emersion
22b873332f
Merge pull request #1942 from VincentVanlaer/xwayland-lazy
Update xwayland start for new API
2018-05-08 23:05:08 +01:00
Drew DeVault
8fa53df670
Merge pull request #1933 from emersion/swaybg-asser-side-effects
swaybg: remove assertions with side-effects
2018-05-07 14:02:17 -04:00
emersion
ef063953e8
Merge pull request #1934 from emersion/update-layer-shell
Update layer-shell protocol
2018-05-07 18:27:32 +01:00
emersion
026b68a108
Update layer-shell protocol 2018-05-07 17:28:42 +01:00
emersion
a3ecfcfc2c
swaybg: remove assertions with side-effects 2018-05-07 17:26:21 +01:00
Vincent Vanlaer
95dac2a069 Update xwayland start for new API
https://github.com/swaywm/wlroots/pull/959
2018-05-07 14:23:44 +02:00
Drew DeVault
73cc92213f
Merge pull request #1920 from yorickvP/master
meson.build: Try looking for `pam` when `libpam` isn't found.
2018-05-06 08:52:27 -04:00
Yorick van Pelt
f31b2e1b33
meson.build: Look for '-lpam', not '-llibpam'.
See #1920 for more information.
2018-05-06 14:10:09 +02:00
Drew DeVault
eda57e7761
Merge pull request #1927 from atomnuker/revert-libexec
Revert PR #1881
2018-05-05 19:37:13 -04:00
Rostislav Pehlivanov
3b6629af3c Revert "Install swaybar and swaybg under /usr/lib/sway"
This reverts commit f2c209c299.
2018-05-06 00:20:57 +01:00
Rostislav Pehlivanov
b592351eef Revert "exec_always: Search for executables in /usr/lib/sway"
This reverts commit 7709340727.
2018-05-06 00:20:49 +01:00
Rostislav Pehlivanov
2c0c3dc7cc Revert "Make the LIBDIR path configurable"
This reverts commit 1670b46bf6.
2018-05-06 00:19:52 +01:00
Rostislav Pehlivanov
0cdc47ab1e Revert "Meson: Replace option instlibdir with libexecdir"
This reverts commit 830c4ef74c.
2018-05-06 00:19:43 +01:00
Rostislav Pehlivanov
cf602687c6 Revert "command/exec_always: Use wlr_log for logging errors in the child process"
This reverts commit 177c67e6b8.
2018-05-06 00:19:29 +01:00
Rostislav Pehlivanov
ac903c8752 Revert "security.d: Update install paths for swaybar and swaybg"
This reverts commit b4249166f3.
2018-05-06 00:19:12 +01:00
emersion
54265bf65e
Merge pull request #1917 from RyanDwyer/pango-markup
Implement pango support
2018-05-05 23:38:09 +01:00
Ryan Dwyer
556ff5f50e Implement pango support
Implements support for the pango: prefix in the font command.

Closes #1903.
2018-05-06 08:25:22 +10:00
emersion
72ce50737d
Merge pull request #1926 from RyanDwyer/fix-setenv-path
Fix PATH setenv() in exec_always
2018-05-05 23:24:02 +01:00
Ryan Dwyer
1daf69477e Fix PATH setenv() in exec_always 2018-05-06 08:16:34 +10:00
emersion
c96ac2ff2a
Merge pull request #1881 from nbraud/usr-lib
Install swaybar and swaybg under /usr/lib/sway
2018-05-05 20:09:34 +01:00
emersion
786727d8bb
Merge branch 'master' into usr-lib 2018-05-05 20:03:46 +01:00
Drew DeVault
967b14c227
Merge pull request #1924 from nbraud/spelling
swaymsg: Fix spelling in error message
2018-05-05 15:00:40 -04:00
Nicolas Braud-Santoni
30c00b2696
Merge branch 'master' into spelling 2018-05-05 20:42:17 +02:00
Nicolas Braud-Santoni
cb2a3e9036 swaymsg: Fix spelling in error message 2018-05-05 20:40:34 +02:00
Nicolas Braud-Santoni
b4249166f3 security.d: Update install paths for swaybar and swaybg 2018-05-05 17:42:41 +02:00
Nicolas Braud-Santoni
177c67e6b8 command/exec_always: Use wlr_log for logging errors in the child process 2018-05-05 17:22:46 +02:00
Nicolas Braud-Santoni
830c4ef74c Meson: Replace option instlibdir with libexecdir
Derive a value from it, called `rundir` rather than writing join_paths(libexecdir,
'sway') all over the place.
2018-05-05 17:22:46 +02:00