[evince] shell: Unbind Ctrl-Left and Ctrl-Right from the scrolledwindow



commit 10e877d8684fd3743540f245b1b6606ebdcdb67f
Author: José Aliste <jose aliste gmail com>
Date:   Tue Feb 27 13:48:01 2018 -0300

    shell: Unbind Ctrl-Left and Ctrl-Right from the scrolledwindow
    
    Bug #727529 was introduced when fixing #676040. The rational of
    the latter fix is to forward keypress events to the focused
    widget before processing Application shortcuts. This allows that
    if, for e.g., you Ctrl+left on the search entry, then you jump
    between words instead of the default Rotate left action. This is
    the intended behavior.
    
    But GtkScrolledWindow binds Ctrl-Left and Ctrl-Right. Hence,
    these actions are handled instead of the Rotate left and Rotate right shortcuts defined by the 
application in the case the horizontal scrollbar is visible.
    
    This is not intended, so unbinding these shortcuts
    with CSS allows to Ctrl left and ctrl right to rotate independent of whether
    the scrollbars are visible or not.
    
    This solves
    https://bugzilla.gnome.org/show_bug.cgi?id=727529

 shell/evince.css |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/shell/evince.css b/shell/evince.css
index 394d480..e4d4117 100644
--- a/shell/evince.css
+++ b/shell/evince.css
@@ -51,6 +51,15 @@ iconview {
     -gtk-key-bindings: MoveCursor;
 }
 
+@binding-set HorizontalScroll {
+    unbind "<Control>Right";
+    unbind "<Control>Left";
+}
+
+scrolledwindow {
+    -gtk-key-bindings: HorizontalScroll;
+}
+
 evpresentationview {
     background-color: black;
 }


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