Skip to content

Commit

Permalink
#2203 implement window scratchpad
Browse files Browse the repository at this point in the history
  • Loading branch information
koekeishiya committed Apr 3, 2024
1 parent fbd5055 commit 896091a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -2338,7 +2338,7 @@ static void handle_domain_window(FILE *rsp, struct token domain, char *message)
char *label;
struct token token = get_token(&message);
if (token_is_valid(token) && token_equals(token, ARGUMENT_WINDOW_SCRATCHPAD_RECOVER)) {
window_manager_recover_scratchpad_windows();
window_manager_scratchpad_recover_windows();
} else if (parse_label(rsp, token, LABEL_WINDOW, &label)) {
if (label) {
if (!window_manager_set_scratchpad_for_window(&g_window_manager, acting_window, label)) {
Expand Down
6 changes: 4 additions & 2 deletions src/window_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -2433,13 +2433,15 @@ bool window_manager_remove_scratchpad_for_window(struct window_manager *wm, stru
return false;
}

void window_manager_recover_scratchpad_windows(void)
void window_manager_scratchpad_recover_windows(void)
{
int window_count;
uint32_t *window_list = window_manager_existing_application_window_list(NULL, &window_count);
if (!window_list) return;

scripting_addition_order_window_in(window_list, window_count);
if (scripting_addition_order_window_in(window_list, window_count)) {
space_manager_refresh_application_windows(&g_space_manager);
}
}

static void window_manager_validate_windows_on_space(struct space_manager *sm, struct window_manager *wm, struct view *view, uint32_t *window_list, int window_count)
Expand Down
2 changes: 1 addition & 1 deletion src/window_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ bool window_manager_toggle_scratchpad_window_by_label(struct window_manager *wm,
bool window_manager_toggle_scratchpad_window(struct window_manager *wm, struct window *window, int forced_mode);
bool window_manager_set_scratchpad_for_window(struct window_manager *wm, struct window *window, char *label);
bool window_manager_remove_scratchpad_for_window(struct window_manager *wm, struct window *window, bool unfloat);
void window_manager_recover_scratchpad_windows(void);
void window_manager_scratchpad_recover_windows(void);
void window_manager_wait_for_native_fullscreen_transition(struct window *window);
void window_manager_validate_and_check_for_windows_on_space(struct space_manager *sm, struct window_manager *wm, uint64_t sid);
void window_manager_correct_for_mission_control_changes(struct space_manager *sm, struct window_manager *wm);
Expand Down

0 comments on commit 896091a

Please sign in to comment.