Skip to content

Commit

Permalink
koekeishiya#574 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
koekeishiya authored and unrevre committed Jun 13, 2020
1 parent abc2d0d commit 459afe1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/window_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1404,10 +1404,9 @@ void window_manager_make_window_floating(struct space_manager *sm, struct window
window_manager_make_window_topmost(wm, window, true);
window->is_floating = true;
} else {
window->is_sticky = false;
window->is_floating = false;
window_manager_set_sticky(window->id, false);
window_manager_make_window_topmost(wm, window, false);
if (window->is_sticky) window_manager_make_window_sticky(sm, wm, window, false);
if ((window_manager_should_manage_window(window)) && (!window_manager_find_managed_window(wm, window))) {
struct view *view = space_manager_tile_window_on_space(sm, window, space_manager_active_space());
window_manager_add_managed_window(wm, window, view);
Expand All @@ -1418,7 +1417,7 @@ void window_manager_make_window_floating(struct space_manager *sm, struct window
void window_manager_make_window_sticky(struct space_manager *sm, struct window_manager *wm, struct window *window, bool should_sticky)
{
if (should_sticky) {
window_manager_make_window_floating(sm, wm, window, true);
if (!window->is_floating) window_manager_make_window_floating(sm, wm, window, true);
window_manager_set_sticky(window->id, true);
window->is_sticky = true;
} else {
Expand Down

0 comments on commit 459afe1

Please sign in to comment.