diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-06-14 19:02:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-14 19:02:15 -0400 |
commit | 4e663ab44f5320f20ec2376f24ea1eb3b458f2c2 (patch) | |
tree | dcb3b74f1dde93bce8657b7509662ffd7db667d0 /sway/handlers.c | |
parent | Merge pull request #1234 from 4e554c4c/tray (diff) | |
parent | Merge branch 'master' into server-decoration (diff) | |
download | sway-74e1c0e674bc5ecbf67c6d4106991877afcacb96.tar.gz sway-74e1c0e674bc5ecbf67c6d4106991877afcacb96.tar.zst sway-74e1c0e674bc5ecbf67c6d4106991877afcacb96.zip |
Implement KDE's server-side decoration protocol
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index a912b991..39261e3d 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -345,6 +345,8 @@ static bool handle_view_created(wlc_handle handle) { | |||
345 | swayc_t *current_ws = swayc_active_workspace(); | 345 | swayc_t *current_ws = swayc_active_workspace(); |
346 | bool return_to_workspace = false; | 346 | bool return_to_workspace = false; |
347 | struct wl_client *client = wlc_view_get_wl_client(handle); | 347 | struct wl_client *client = wlc_view_get_wl_client(handle); |
348 | struct wl_resource *resource = wlc_surface_get_wl_resource( | ||
349 | wlc_view_get_surface(handle)); | ||
348 | pid_t pid; | 350 | pid_t pid; |
349 | struct panel_config *panel_config = NULL; | 351 | struct panel_config *panel_config = NULL; |
350 | struct background_config *background_config = NULL; | 352 | struct background_config *background_config = NULL; |
@@ -483,6 +485,14 @@ static bool handle_view_created(wlc_handle handle) { | |||
483 | if (workspace && workspace->fullscreen) { | 485 | if (workspace && workspace->fullscreen) { |
484 | set_focused_container(workspace->fullscreen); | 486 | set_focused_container(workspace->fullscreen); |
485 | } | 487 | } |
488 | for (int i = 0; i < decoration_state.csd_resources->length; ++i) { | ||
489 | struct wl_resource *res = decoration_state.csd_resources->items[i]; | ||
490 | if (res == resource) { | ||
491 | list_del(decoration_state.csd_resources, i); | ||
492 | server_decoration_enable_csd(handle); | ||
493 | break; | ||
494 | } | ||
495 | } | ||
486 | } else { | 496 | } else { |
487 | swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT); | 497 | swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT); |
488 | wlc_handle *h = malloc(sizeof(wlc_handle)); | 498 | wlc_handle *h = malloc(sizeof(wlc_handle)); |