diff options
-rw-r--r-- | perl-install/NEWS | 3 | ||||
-rwxr-xr-x | perl-install/standalone/drakclock | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 0288aeb90..bd616cffd 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,6 @@ +- drakclock: + o fix the display of the clock (mga#11776) + Version 17.75 - 17 March 2017 - diskdrake: diff --git a/perl-install/standalone/drakclock b/perl-install/standalone/drakclock index c9fcf0c46..deb192bd5 100755 --- a/perl-install/standalone/drakclock +++ b/perl-install/standalone/drakclock @@ -319,7 +319,7 @@ sub determine_radian { sub draw { my ($widget, $event) = @_; $cairo = $event; - Repaint(); + Repaint(undef, 1); 0; } @@ -340,7 +340,7 @@ sub time_to_rad { } sub Repaint { - my ($o_update_time) = @_; + my ($o_update_time, $skip_redraw) = @_; my ($sec, $min, $hour) = localtime(time()); time_to_rad($sec, $min, $hour) if $o_update_time; ($midx, $midy) = ($drawing_area->get_allocated_width/2, $drawing_area->get_allocated_height/2); @@ -353,7 +353,9 @@ sub Repaint { DrawHour(); DrawMin(); DrawSec(); - $drawing_area->queue_draw; + # Only redraw the clock if there are changes. + # This highly decreases the CPU usage. + $drawing_area->queue_draw unless $skip_redraw; 1; } |