summaryrefslogtreecommitdiff
path: root/src/gui/curses
diff options
context:
space:
mode:
authorraspbeguy <raspbeguy@hashtagueule.fr>2017-01-22 08:48:38 +0100
committerSébastien Helleu <flashcode@flashtux.org>2017-01-22 09:27:16 +0100
commit1b23cd3a477e281b9880ef0e2981ff0d878d71b5 (patch)
treef8e04744b4f30848bcd9a73545e9f66c5df4d551 /src/gui/curses
parent2f2b04e13903e0c1c64ef53f925892905a209695 (diff)
downloadweechat-1b23cd3a477e281b9880ef0e2981ff0d878d71b5.zip
core: add resize of window parents (closes #893)
Diffstat (limited to 'src/gui/curses')
-rw-r--r--src/gui/curses/gui-curses-window.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index 965cc5846..05bd4e407 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -1874,7 +1874,7 @@ gui_window_split_vertical (struct t_gui_window *window, int percentage)
*/
void
-gui_window_resize (struct t_gui_window *window, int percentage)
+gui_window_resize (struct t_gui_window_tree *tree, int percentage)
{
struct t_gui_window_tree *parent;
int old_split_pct, add_bottom, add_top, add_left, add_right;
@@ -1882,12 +1882,12 @@ gui_window_resize (struct t_gui_window *window, int percentage)
if (!gui_init_ok)
return;
- parent = window->ptr_tree->parent_node;
+ parent = tree->parent_node;
if (parent)
{
old_split_pct = parent->split_pct;
- if (((parent->split_horizontal) && (window->ptr_tree == parent->child2))
- || ((!(parent->split_horizontal)) && (window->ptr_tree == parent->child1)))
+ if (((parent->split_horizontal) && (tree == parent->child2))
+ || ((!(parent->split_horizontal)) && (tree == parent->child1)))
{
parent->split_pct = percentage;
}
@@ -1916,7 +1916,7 @@ gui_window_resize (struct t_gui_window *window, int percentage)
*/
void
-gui_window_resize_delta (struct t_gui_window *window, int delta_percentage)
+gui_window_resize_delta (struct t_gui_window_tree *tree, int delta_percentage)
{
struct t_gui_window_tree *parent;
int old_split_pct, add_bottom, add_top, add_left, add_right;
@@ -1924,12 +1924,12 @@ gui_window_resize_delta (struct t_gui_window *window, int delta_percentage)
if (!gui_init_ok)
return;
- parent = window->ptr_tree->parent_node;
+ parent = tree->parent_node;
if (parent)
{
old_split_pct = parent->split_pct;
- if (((parent->split_horizontal) && (window->ptr_tree == parent->child2))
- || ((!(parent->split_horizontal)) && (window->ptr_tree == parent->child1)))
+ if (((parent->split_horizontal) && (tree == parent->child2))
+ || ((!(parent->split_horizontal)) && (tree == parent->child1)))
{
parent->split_pct += delta_percentage;
}