diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-11-21 19:51:57 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2024-01-18 18:36:54 +0300 |
commit | 6d7b1321db54155cf78305dbafdcfc7de9b78415 (patch) | |
tree | acf9f02681b1d5a40416be5f4151641920176a93 /sway/tree/view.c | |
parent | scene_graph: Port layer_shell (diff) | |
download | sway-6d7b1321db54155cf78305dbafdcfc7de9b78415.tar.gz sway-6d7b1321db54155cf78305dbafdcfc7de9b78415.tar.zst sway-6d7b1321db54155cf78305dbafdcfc7de9b78415.zip |
scene_graph: Port container server side decorations
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index d349e5fa..7af2fd3f 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "sway/scene_descriptor.h" | 27 | #include "sway/scene_descriptor.h" |
28 | #include "sway/server.h" | 28 | #include "sway/server.h" |
29 | #include "sway/surface.h" | 29 | #include "sway/surface.h" |
30 | #include "sway/sway_text_node.h" | ||
30 | #include "sway/tree/arrange.h" | 31 | #include "sway/tree/arrange.h" |
31 | #include "sway/tree/container.h" | 32 | #include "sway/tree/container.h" |
32 | #include "sway/tree/view.h" | 33 | #include "sway/tree/view.h" |
@@ -1337,7 +1338,13 @@ void view_update_title(struct sway_view *view, bool force) { | |||
1337 | view->container->title = title ? strdup(title) : NULL; | 1338 | view->container->title = title ? strdup(title) : NULL; |
1338 | 1339 | ||
1339 | // Update title after the global font height is updated | 1340 | // Update title after the global font height is updated |
1340 | container_update_title_textures(view->container); | 1341 | if (view->container->title_bar.title_text && len) { |
1342 | sway_text_node_set_text(view->container->title_bar.title_text, | ||
1343 | view->container->formatted_title); | ||
1344 | container_arrange_title_bar(view->container); | ||
1345 | } else { | ||
1346 | container_update_title_bar(view->container); | ||
1347 | } | ||
1341 | 1348 | ||
1342 | ipc_event_window(view->container, "title"); | 1349 | ipc_event_window(view->container, "title"); |
1343 | 1350 | ||
@@ -1404,6 +1411,7 @@ void view_set_urgent(struct sway_view *view, bool enable) { | |||
1404 | return; | 1411 | return; |
1405 | } | 1412 | } |
1406 | clock_gettime(CLOCK_MONOTONIC, &view->urgent); | 1413 | clock_gettime(CLOCK_MONOTONIC, &view->urgent); |
1414 | container_update_itself_and_parents(view->container); | ||
1407 | } else { | 1415 | } else { |
1408 | view->urgent = (struct timespec){ 0 }; | 1416 | view->urgent = (struct timespec){ 0 }; |
1409 | if (view->urgent_timer) { | 1417 | if (view->urgent_timer) { |