fix display when the default display is not the clock
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 <daniel.lezcano@linaro.org>
diff --git a/powerdebug.c b/powerdebug.c
index 4d55f17..3e0272f 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -259,29 +259,27 @@
options->verbose);
}
- if (options->selectedwindow == CLOCK) {
+ if (options->clocks || options->selectedwindow == CLOCK) {
- if (options->clocks) {
- int hrow;
+ int hrow;
- create_selectedwindow(options->selectedwindow);
- if (!findparent_ncurses) {
- int command = 0;
+ 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 (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) {