[gnome-control-center/wip/hadess/degraded-power-profile: 3/6] power: Fix keynav not working




commit d35c816508286480238976f1773ebc1384cc32c4
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jul 15 13:08:05 2021 +0200

    power: Fix keynav not working
    
    gnome-control-center/panels/power/cc-power-panel.c: In function ‘keynav_failed_cb’:
    gnome-control-center/panels/power/cc-power-panel.c:892:50: warning: statement with no effect 
[-Wunused-value]
      892 |   direction == GTK_DIR_UP ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD;
          |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~

 panels/power/cc-power-panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index 96558c778..d31d16d22 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -888,7 +888,7 @@ keynav_failed_cb (CcPowerPanel *self, GtkDirectionType direction, GtkWidget *lis
   if (direction != GTK_DIR_UP && direction != GTK_DIR_DOWN)
     return FALSE;
 
-  direction == GTK_DIR_UP ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD;
+  direction = GTK_DIR_UP ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD;
 
   return gtk_widget_child_focus (GTK_WIDGET (self), direction);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]