All of lore.kernel.org
 help / color / mirror / Atom feed
* [Powertop] [PATCH] tab_window: null members on construction
@ 2012-12-19 16:06 Sergey Senozhatsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Senozhatsky @ 2012-12-19 16:06 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

introduce tab_window ctor and null memebers during construction. show_tab() may be
called before window_refresh() [which sets ypad_pos and xpad_pos to 0], causing prefresh()
call with uninit win->ypad_pos, win->xpad_pos args.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

---

 src/display.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/display.h b/src/display.h
index b450f8b..9af3ec0 100644
--- a/src/display.h
+++ b/src/display.h
@@ -53,6 +53,14 @@ public:
 	short int xpad_pos, ypad_pos; 
 	WINDOW *win;
 
+	tab_window() {
+		cursor_pos = 0;
+		cursor_max = 0;
+		xpad_pos =0;
+		ypad_pos = 0;
+		win = NULL;
+	}
+
 	virtual void cursor_down(void) { 
 		if (cursor_pos < cursor_max ) cursor_pos++; repaint(); 
 	} ;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Powertop] [PATCH] tab_window: null members on construction
@ 2013-01-31 22:45 Kristen Carlson Accardi
  0 siblings, 0 replies; 2+ messages in thread
From: Kristen Carlson Accardi @ 2013-01-31 22:45 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]

On Wed, 19 Dec 2012 19:06:52 +0300
Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com> wrote:

> introduce tab_window ctor and null memebers during construction.
> show_tab() may be called before window_refresh() [which sets ypad_pos
> and xpad_pos to 0], causing prefresh() call with uninit
> win->ypad_pos, win->xpad_pos args.
> 
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>
> 
> ---
> 
>  src/display.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/display.h b/src/display.h
> index b450f8b..9af3ec0 100644
> --- a/src/display.h
> +++ b/src/display.h
> @@ -53,6 +53,14 @@ public:
>  	short int xpad_pos, ypad_pos; 
>  	WINDOW *win;
>  
> +	tab_window() {
> +		cursor_pos = 0;
> +		cursor_max = 0;
> +		xpad_pos =0;
> +		ypad_pos = 0;
> +		win = NULL;
> +	}
> +
>  	virtual void cursor_down(void) { 
>  		if (cursor_pos < cursor_max ) cursor_pos++;
> repaint(); } ;
> 
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop

applied, thanks.

Kristen

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-31 22:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19 16:06 [Powertop] [PATCH] tab_window: null members on construction Sergey Senozhatsky
  -- strict thread matches above, loose matches on Subject: below --
2013-01-31 22:45 Kristen Carlson Accardi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.