diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-27 21:59:38 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-27 22:02:00 +1000 |
commit | d3dd7e5bae374cb890f80836d872229a37ef639f (patch) | |
tree | f96102bdb4bbc030a9e7033b13178acf74413bea | |
parent | Add shell criteria token (diff) | |
download | sway-d3dd7e5bae374cb890f80836d872229a37ef639f.tar.gz sway-d3dd7e5bae374cb890f80836d872229a37ef639f.tar.zst sway-d3dd7e5bae374cb890f80836d872229a37ef639f.zip |
Rename view_get_type to view_get_shell
-rw-r--r-- | include/sway/tree/view.h | 2 | ||||
-rw-r--r-- | sway/criteria.c | 4 | ||||
-rw-r--r-- | sway/tree/view.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 0fb8f1b3..a8bf4955 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -201,7 +201,7 @@ const char *view_get_window_role(struct sway_view *view); | |||
201 | 201 | ||
202 | uint32_t view_get_window_type(struct sway_view *view); | 202 | uint32_t view_get_window_type(struct sway_view *view); |
203 | 203 | ||
204 | const char *view_get_type(struct sway_view *view); | 204 | const char *view_get_shell(struct sway_view *view); |
205 | 205 | ||
206 | void view_configure(struct sway_view *view, double ox, double oy, int width, | 206 | void view_configure(struct sway_view *view, double ox, double oy, int width, |
207 | int height); | 207 | int height); |
diff --git a/sway/criteria.c b/sway/criteria.c index 9317a180..dec5fed7 100644 --- a/sway/criteria.c +++ b/sway/criteria.c | |||
@@ -56,7 +56,7 @@ static bool criteria_matches_view(struct criteria *criteria, | |||
56 | } | 56 | } |
57 | 57 | ||
58 | if (criteria->shell) { | 58 | if (criteria->shell) { |
59 | const char *shell = view_get_type(view); | 59 | const char *shell = view_get_shell(view); |
60 | if (!shell || regex_cmp(shell, criteria->shell) != 0) { | 60 | if (!shell || regex_cmp(shell, criteria->shell) != 0) { |
61 | return false; | 61 | return false; |
62 | } | 62 | } |
@@ -284,7 +284,7 @@ static char *get_focused_prop(enum criteria_token token) { | |||
284 | value = view_get_instance(view); | 284 | value = view_get_instance(view); |
285 | break; | 285 | break; |
286 | case T_SHELL: | 286 | case T_SHELL: |
287 | value = view_get_type(view); | 287 | value = view_get_shell(view); |
288 | break; | 288 | break; |
289 | case T_TITLE: | 289 | case T_TITLE: |
290 | value = view_get_class(view); | 290 | value = view_get_class(view); |
diff --git a/sway/tree/view.c b/sway/tree/view.c index d72a2235..d91182ed 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -107,7 +107,7 @@ uint32_t view_get_window_type(struct sway_view *view) { | |||
107 | return 0; | 107 | return 0; |
108 | } | 108 | } |
109 | 109 | ||
110 | const char *view_get_type(struct sway_view *view) { | 110 | const char *view_get_shell(struct sway_view *view) { |
111 | switch(view->type) { | 111 | switch(view->type) { |
112 | case SWAY_VIEW_XDG_SHELL_V6: | 112 | case SWAY_VIEW_XDG_SHELL_V6: |
113 | return "xdg_shell_v6"; | 113 | return "xdg_shell_v6"; |
@@ -657,7 +657,7 @@ static size_t parse_title_format(struct sway_view *view, char *buffer) { | |||
657 | const char *app_id = view_get_app_id(view); | 657 | const char *app_id = view_get_app_id(view); |
658 | const char *class = view_get_class(view); | 658 | const char *class = view_get_class(view); |
659 | const char *instance = view_get_instance(view); | 659 | const char *instance = view_get_instance(view); |
660 | const char *shell = view_get_type(view); | 660 | const char *shell = view_get_shell(view); |
661 | size_t title_len = title ? strlen(title) : 0; | 661 | size_t title_len = title ? strlen(title) : 0; |
662 | size_t app_id_len = app_id ? strlen(app_id) : 0; | 662 | size_t app_id_len = app_id ? strlen(app_id) : 0; |
663 | size_t class_len = class ? strlen(class) : 0; | 663 | size_t class_len = class ? strlen(class) : 0; |