This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Correct origin calculation of command line window in TUI mode


On Wednesday 21 July 2010 22:02:13, Balazs Kezes wrote:
> The locator's (a small bar between source and command window) origin (the first
> row's index) is not updated in tui_resize_all and this outdated data is used to
> calculate the command window's origin. This patch fixes this by updating it.

Hmmm, I've tried all three patches together, and I still get a messed
up cmd window after a couple of resizes (e.g., start
maxized/unmaximize/maximize).  With just the "call tui_resize_all"
patch applied, and the one below in addition, I get somewhat better
result than with them all applied.  Do you see something like that too?

Makes me wonder where's the code that calculates all the initial
sub window sizes for first display, and whether we could make more reuse
out of it.

> 
> --
> Balazs
> 
> Index: tui-win.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/tui/tui-win.c,v
> retrieving revision 1.47
> diff -c -p -r1.47 tui-win.c
> *** tui-win.c	17 May 2010 22:21:43 -0000	1.47
> --- tui-win.c	21 Jul 2010 20:56:49 -0000
> *************** tui_resize_all (void)
> *** 712,717 ****
> --- 712,718 ----
>   	  else
>   	    new_height = first_win->generic.height + split_diff;
> 
> + 	  locator->origin.y = new_height + 1;
>   	  make_invisible_and_set_new_height (first_win, new_height);
>   	  TUI_CMD_WIN->generic.origin.y = locator->origin.y + 1;
>   	  TUI_CMD_WIN->generic.width += width_diff;
> 


-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]