Commit graph

79 commits

Author SHA1 Message Date
Ryan Dwyer 664169fbf1 Implement stacked layout 2018-05-22 08:27:24 +10:00
Brian Ashworth 0273c6438c Fix hide_edge_borders smart for tabs and stacks 2018-05-21 13:18:18 -04:00
Ryan Dwyer 5ab4930185 Fix tab border issues 2018-05-21 20:16:56 +10:00
Ryan Dwyer efc07fb3d4 Don't track damage for views on inactive tabs 2018-05-21 20:16:56 +10:00
Ryan Dwyer c08f9bf257 Implement tabbed layout 2018-05-21 20:16:56 +10:00
Ryan Dwyer c4ea2b51f6 Fix hide_edge_borders constraints
When checking if a border is on the edge, the check should be done
against the workspace rather than the output.
2018-05-21 13:59:01 +10:00
Ryan Dwyer ebb0d051db Fix many border opacity issues 2018-05-17 08:29:14 +10:00
Ryan Dwyer 69ac7f73e7 Destroy marks textures when view destroyed 2018-05-17 08:29:14 +10:00
Ryan Dwyer b351d0a64a Set textures to null when destroying 2018-05-17 08:29:14 +10:00
Ryan Dwyer 5384fdcbc6 Don't show marks which start with an underscore 2018-05-17 08:29:14 +10:00
Ryan Dwyer 0e2cc0af30 Implement show_marks 2018-05-17 08:29:14 +10:00
Ryan Dwyer fc96f004d2 Don't steal focus when a view changes its title
Fixes #1989
2018-05-16 20:29:04 +10:00
Ryan Dwyer 22d38600d0 Implement marks 2018-05-15 11:18:27 +10:00
Brian Ashworth 9ba0dca7ba
Merge branch 'master' into fix-1975 2018-05-14 09:06:23 -04:00
emersion 95a10dd4f3
Kill wl_shell 2018-05-14 13:26:10 +01:00
Brian Ashworth 3488fbc859 Fix y and height for a hidden top normal border 2018-05-14 01:46:53 -04:00
Brian Ashworth 34b864fb17
Merge branch 'master' into fix-1975 2018-05-14 00:28:21 -04:00
Brian Ashworth 6ff7c52736 Fix titles and detect edges for hide_edge_borders 2018-05-14 00:20:34 -04:00
Ryan Dwyer 92b8497a0b Fix crash when launching programs from dmenu 2018-05-14 11:48:15 +10:00
Ryan Dwyer bffcb496cc Revert "Revert "Merge pull request #1953 from RyanDwyer/criteria-focused""
This reverts commit ac0e62584f.

This reimplements the criteria __focused__ commit in preparation for
fixing a known bug.
2018-05-14 11:38:09 +10:00
Ryan Dwyer 1e9aaa54a8 Revert "Revert "Merge pull request #1943 from RyanDwyer/criteria-improvements""
This reverts commit 32a572cecf.

This reimplements the criteria overhaul in preparation for fixing a
known bug.
2018-05-14 11:38:09 +10:00
Drew DeVault b2dec12368
Merge pull request #1970 from emersion/xdg-shell-stable
Add xdg-shell stable support
2018-05-13 13:45:15 -04:00
emersion 88d9d43b36
Add xdg-shell stable support 2018-05-13 16:38:56 +01:00
Heghedus Razvan 789a877b37 Fix crash when using pango markup font
The characters & < > ' " needs to be escaped when using pango markup

Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2018-05-13 17:53:45 +03:00
Brian Ashworth 2adf23c2a3 Only count views for hide_edge_borders smart 2018-05-12 12:56:26 -04:00
Brian Ashworth ec60e24f75
Merge branch 'master' into edge-borders 2018-05-12 12:43:34 -04:00
Brian Ashworth e3625d8f33 Count descendant views for hide_edge_borders smart 2018-05-12 12:37:48 -04:00
Drew DeVault 32a572cecf Revert "Merge pull request #1943 from RyanDwyer/criteria-improvements"
This reverts commit 3e1bf721c6, reversing
changes made to 2217518bd5.
2018-05-12 08:52:54 -04:00
Drew DeVault ac0e62584f Revert "Merge pull request #1953 from RyanDwyer/criteria-focused"
This reverts commit 2511adffc2, reversing
changes made to 3e1bf721c6.
2018-05-12 08:52:48 -04:00
Ryan Dwyer 4717c71da5
Merge branch 'master' into fix-crash-on-fullscreen 2018-05-12 17:52:51 +10:00
Ryan Dwyer 94e42f9857 Implement __focused__ criteria 2018-05-12 12:34:12 +10:00
Brian Ashworth 3db7fc2bb2 Implement hide_edge_borders 2018-05-11 18:44:56 -04:00
Dudemanguy911 935bda0f33 fix crash on fullscreen toggle 2018-05-11 07:42:56 -05: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
emersion bec80f1551
Damage borders when damaging view 2018-05-10 23:03:50 +01:00
Ryan Dwyer 936226845f Add extra check for view title being NULL 2018-05-05 22:29:37 +10:00
Ryan Dwyer 5d6d24e71a Move code for re-arranging after font height change into a common place 2018-05-05 22:29:37 +10:00
Ryan Dwyer da7d6642d3 Refactor parse_title_format() 2018-05-05 22:29:37 +10:00
Ryan Dwyer 228c478e8d Implement title_format
This implements the title_format command, with a new placeholder %shell
which gets substituted with the view type (xwayland, xdg_shell_v6 or
wl_shell).

Example config:

    for_window [title=".*"] title_format %title (class=%class instance=%instance shell=%shell)
2018-05-05 22:29:37 +10:00
Ryan Dwyer b667298a0a Render titles 2018-05-03 15:12:00 +10:00
Dillen Meijboom b45e2bd95e Fixed #1888 GCC cannot compile due to uninitialized variables (#1889) 2018-05-02 10:40:45 +01:00
Ryan Dwyer 83952c5201 Restore view_update_position() 2018-05-01 07:46:57 -04:00
Ryan Dwyer fa5de2876e Move docblock and fix indenting of switch/case. 2018-05-01 07:46:57 -04:00
Ryan Dwyer 630ba30e3c Implement borders
Implements rendering of borders. Title text is still to do.

Implements the following configuration directives:

* client.focused
* client.focused_inactive
* client.unfocused
* client.urgent
* border
* default_border
2018-05-01 07:46:57 -04:00
Ryan Dwyer 91f97fc21a Fix segfault in view_unmap()
If the last remaining view on a workspace is unmapped and the workspace
is not visible, parent will be a C_OUTPUT. Call the arrange_output()
function in this case.
2018-05-01 17:18:20 +10:00
Ryan Dwyer 167c2e1aa9 Refactor arrange_windows()
Replaces arrange_windows() with arrange_root(), arrange_output(),
arrange_workspace() and arrange_children_of().

Also makes fullscreen views save and restore their dimensions, which
allows it to preserve any custom resize and is also a requirement for
floating views once they are implemented.
2018-04-28 11:26:14 +10:00
Ryan Dwyer dfc26c664f Update wording about unmanaged/unmapped views 2018-04-24 20:14:22 +10:00
Ryan Dwyer 30a7488936 Add assert to view_execute_criteria() 2018-04-24 20:08:32 +10:00
Ryan Dwyer 72767e1cc3 Implement criteria commands
Implements the following commands:

* for_window [...] <cmdlist>
* assign [...] <workspace>
2018-04-24 20:08:32 +10:00
emersion a41057714f
Update for wlroots#885 2018-04-21 19:12:49 +01:00