aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-05 12:36:50 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-05 22:29:37 +1000
commit228c478e8d11dd14972b237574146fd0d2d6b96c (patch)
tree819dfc4d6151ebb28d7db5b862d0ac4314d82fc3 /sway/desktop
parentMerge pull request #1918 from RyanDwyer/title-scissor (diff)
downloadsway-228c478e8d11dd14972b237574146fd0d2d6b96c.tar.gz
sway-228c478e8d11dd14972b237574146fd0d2d6b96c.tar.zst
sway-228c478e8d11dd14972b237574146fd0d2d6b96c.zip
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)
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/xdg_shell_v6.c3
-rw-r--r--sway/desktop/xwayland.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 5880e9a9..fcee8ce9 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -176,8 +176,7 @@ static void handle_commit(struct wl_listener *listener, void *data) {
176 // TODO: Let floating views do whatever 176 // TODO: Let floating views do whatever
177 view_update_size(view, xdg_shell_v6_view->pending_width, 177 view_update_size(view, xdg_shell_v6_view->pending_width,
178 xdg_shell_v6_view->pending_height); 178 xdg_shell_v6_view->pending_height);
179 container_update_title(view->swayc, 179 view_update_title(view, false);
180 view->wlr_xdg_surface_v6->toplevel->title);
181 view_damage(view, false); 180 view_damage(view, false);
182} 181}
183 182
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index a1e672ce..b4eda71f 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -223,7 +223,7 @@ static void handle_commit(struct wl_listener *listener, void *data) {
223 view_update_size(view, xwayland_view->pending_width, 223 view_update_size(view, xwayland_view->pending_width,
224 xwayland_view->pending_height); 224 xwayland_view->pending_height);
225 view_damage(view, false); 225 view_damage(view, false);
226 container_update_title(view->swayc, view->wlr_xwayland_surface->title); 226 view_update_title(view, false);
227} 227}
228 228
229static void handle_unmap(struct wl_listener *listener, void *data) { 229static void handle_unmap(struct wl_listener *listener, void *data) {