From patchwork Thu Jun 16 20:29:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 1990 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A0FBF23E54 for ; Thu, 16 Jun 2011 20:31:45 +0000 (UTC) Received: from mail-vx0-f180.google.com (mail-vx0-f180.google.com [209.85.220.180]) by fiordland.canonical.com (Postfix) with ESMTP id 70ED2A18585 for ; Thu, 16 Jun 2011 20:31:45 +0000 (UTC) Received: by mail-vx0-f180.google.com with SMTP id 12so2092663vxk.11 for ; Thu, 16 Jun 2011 13:31:45 -0700 (PDT) Received: by 10.52.112.106 with SMTP id ip10mr1886190vdb.127.1308256305252; Thu, 16 Jun 2011 13:31:45 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.52.183.130 with SMTP id em2cs211203vdc; Thu, 16 Jun 2011 13:31:44 -0700 (PDT) Received: by 10.216.141.1 with SMTP id f1mr1360060wej.35.1308256302271; Thu, 16 Jun 2011 13:31:42 -0700 (PDT) Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) by mx.google.com with ESMTP id k64si5082015weq.9.2011.06.16.13.31.40; Thu, 16 Jun 2011 13:31:41 -0700 (PDT) Received-SPF: neutral (google.com: 80.12.242.130 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=80.12.242.130; Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.130 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: from monster.dhcp.lxc ([92.134.76.78]) by mwinf5d16 with ME id wkXf1g0031hMfSL03kXgJL; Thu, 16 Jun 2011 22:31:40 +0200 From: Daniel Lezcano To: patches@linaro.org Subject: [PATCH 03/28] fix display when the default display is not the clock Date: Thu, 16 Jun 2011 22:29:32 +0200 Message-Id: <1308256197-29155-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1308256197-29155-1-git-send-email-daniel.lezcano@linaro.org> References: <1308256197-29155-1-git-send-email-daniel.lezcano@linaro.org> Due to an internal error in clocks.c I am investigating, I am temporarly changing the test in the mainloop to have the clock being initialized when the option is set. Signed-off-by: Daniel Lezcano --- powerdebug.c | 44 +++++++++++++++++++++----------------------- 1 files changed, 21 insertions(+), 23 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 4d55f17..3e0272f 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -259,29 +259,27 @@ int mainloop(struct powerdebug_options *options, options->verbose); } - if (options->selectedwindow == CLOCK) { - - if (options->clocks) { - int hrow; - - create_selectedwindow(options->selectedwindow); - if (!findparent_ncurses) { - int command = 0; - - if (enter_hit) - command = CLOCK_SELECTED; - if (refreshwin) - command = REFRESH_WINDOW; - hrow = read_and_print_clock_info( - options->verbose, - highlighted_row, - command); - highlighted_row = hrow; - enter_hit = false; - } else - find_parents_for_clock(clkname_str, - enter_hit); - } + if (options->clocks || options->selectedwindow == CLOCK) { + + int hrow; + + create_selectedwindow(options->selectedwindow); + if (!findparent_ncurses) { + int command = 0; + + if (enter_hit) + command = CLOCK_SELECTED; + if (refreshwin) + command = REFRESH_WINDOW; + hrow = read_and_print_clock_info( + options->verbose, + highlighted_row, + command); + highlighted_row = hrow; + enter_hit = false; + } else + find_parents_for_clock(clkname_str, + enter_hit); } if (options->sensors || options->selectedwindow == SENSOR) {