mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-23 04:06:22 +00:00
Only allow swapping active windows
This commit is contained in:
@@ -844,7 +844,7 @@ wins_lost_connection(void)
|
||||
g_list_free(values);
|
||||
}
|
||||
|
||||
gboolean
|
||||
void
|
||||
wins_swap(int source_win, int target_win)
|
||||
{
|
||||
ProfWin *source = g_hash_table_lookup(windows, GINT_TO_POINTER(source_win));
|
||||
@@ -869,7 +869,6 @@ wins_swap(int source_win, int target_win)
|
||||
wins_set_current_by_num(target_win);
|
||||
ui_focus_win(console);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
// target window occupied
|
||||
} else {
|
||||
@@ -894,10 +893,7 @@ wins_swap(int source_win, int target_win)
|
||||
if ((wins_get_current_num() == source_win) || (wins_get_current_num() == target_win)) {
|
||||
ui_focus_win(console);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ gboolean wins_tidy(void);
|
||||
GSList* wins_create_summary(gboolean unread);
|
||||
void wins_destroy(void);
|
||||
GList* wins_get_nums(void);
|
||||
gboolean wins_swap(int source_win, int target_win);
|
||||
void wins_swap(int source_win, int target_win);
|
||||
void wins_hide_subwin(ProfWin *window);
|
||||
void wins_show_subwin(ProfWin *window);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user