Title: [237617] trunk/Source/WebCore
- Revision
- 237617
- Author
- [email protected]
- Date
- 2018-10-30 19:29:53 -0700 (Tue, 30 Oct 2018)
Log Message
[GTK] Scrollbars not following gtk-primary-button-warps-slider setting
https://bugs.webkit.org/show_bug.cgi?id=191067
Patch by Jim Mason <[email protected]> on 2018-10-30
Reviewed by Michael Catanzaro.
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::handleMousePressEvent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (237616 => 237617)
--- trunk/Source/WebCore/ChangeLog 2018-10-31 02:29:21 UTC (rev 237616)
+++ trunk/Source/WebCore/ChangeLog 2018-10-31 02:29:53 UTC (rev 237617)
@@ -1,3 +1,13 @@
+2018-10-30 Jim Mason <[email protected]>
+
+ [GTK] Scrollbars not following gtk-primary-button-warps-slider setting
+ https://bugs.webkit.org/show_bug.cgi?id=191067
+
+ Reviewed by Michael Catanzaro.
+
+ * platform/gtk/ScrollbarThemeGtk.cpp:
+ (WebCore::ScrollbarThemeGtk::handleMousePressEvent):
+
2018-10-30 Alexey Proskuryakov <[email protected]>
Clean up some obsolete MAX_ALLOWED macros
Modified: trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp (237616 => 237617)
--- trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp 2018-10-31 02:29:21 UTC (rev 237616)
+++ trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp 2018-10-31 02:29:53 UTC (rev 237617)
@@ -772,13 +772,19 @@
ScrollbarButtonPressAction ScrollbarThemeGtk::handleMousePressEvent(Scrollbar&, const PlatformMouseEvent& event, ScrollbarPart pressedPart)
{
+ gboolean warp_slider = FALSE;
switch (pressedPart) {
case BackTrackPart:
case ForwardTrackPart:
- if (event.button() == LeftButton)
- return ScrollbarButtonPressAction::CenterOnThumb;
- if (event.button() == RightButton)
- return ScrollbarButtonPressAction::Scroll;
+ g_object_get(gtk_settings_get_default(),
+ "gtk-primary-button-warps-slider",
+ &warp_slider, nullptr);
+ // The shift key or middle/right button reverses the sense.
+ if (event.shiftKey() || event.button() != LeftButton)
+ warp_slider = !warp_slider;
+ return warp_slider ?
+ ScrollbarButtonPressAction::CenterOnThumb:
+ ScrollbarButtonPressAction::Scroll;
break;
case ThumbPart:
if (event.button() != RightButton)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes