Skip to content

Commit

Permalink
#566 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
koekeishiya committed Jun 11, 2020
1 parent f71ced5 commit 2aef010
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ static EVENT_CALLBACK(EVENT_HANDLER_WINDOW_RESIZED)
if (!was_fullscreen && is_fullscreen) {
window_manager_make_floating(&g_window_manager, window, false);
border_enter_fullscreen(window);

struct view *view = window_manager_find_managed_window(&g_window_manager, window);
if (view) {
space_manager_untile_window(&g_space_manager, view, window);
Expand All @@ -516,7 +517,7 @@ static EVENT_CALLBACK(EVENT_HANDLER_WINDOW_RESIZED)
} else if (was_fullscreen && !is_fullscreen) {
uint32_t did = window_display_id(window);

while (display_manager_display_is_animating(did)) {
do {

//
// NOTE(koekeishiya): Window has exited native-fullscreen mode.
Expand All @@ -525,15 +526,16 @@ static EVENT_CALLBACK(EVENT_HANDLER_WINDOW_RESIZED)
//

usleep(100000);
}
} while (display_manager_display_is_animating(did));

if (window_manager_should_manage_window(window) && !window_manager_find_managed_window(&g_window_manager, window)) {
struct view *view = space_manager_tile_window_on_space(&g_space_manager, window, window_space(window));
window_manager_add_managed_window(&g_window_manager, window, view);
}

border_exit_fullscreen(window);
window_manager_make_floating(&g_window_manager, window, window->is_floating);
} else if (was_fullscreen == is_fullscreen) {
} else if (!was_fullscreen == !is_fullscreen) {
if (g_mouse_state.current_action == MOUSE_MODE_MOVE && g_mouse_state.window == window) {
g_mouse_state.window_frame.size = window_ax_frame(g_mouse_state.window).size;
}
Expand Down

0 comments on commit 2aef010

Please sign in to comment.