Skip to content

Instantly share code, notes, and snippets.

@xymostech
Created March 10, 2013 01:28
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xymostech/5126666 to your computer and use it in GitHub Desktop.
Save xymostech/5126666 to your computer and use it in GitHub Desktop.
Make Chromium not scroll on ctrl-zoom. Use these patch files on the source directory, and then build.
--- content/browser/web_contents/web_contents_view_gtk.cc.orig 2013-03-09 20:16:51.437945192 -0500
+++ content/browser/web_contents/web_contents_view_gtk.cc 2013-03-09 20:16:56.151278267 -0500
@@ -56,6 +56,8 @@
// See tab_contents_view_views.cc for discussion of mouse scroll zooming.
gboolean OnMouseScroll(GtkWidget* widget, GdkEventScroll* event,
WebContentsImpl* web_contents) {
+ return FALSE;
+
if ((event->state & gtk_accelerator_get_default_mod_mask()) !=
GDK_CONTROL_MASK) {
return FALSE;
--- content/browser/web_contents/web_contents_impl.cc.orig 2013-03-09 20:19:02.324604707 -0500
+++ content/browser/web_contents/web_contents_impl.cc 2013-03-09 20:19:04.264604601 -0500
@@ -1285,6 +1285,8 @@
bool WebContentsImpl::PreHandleWheelEvent(
const WebKit::WebMouseWheelEvent& event) {
+ return false;
+
if (delegate_ &&
event.wheelTicksY &&
(event.modifiers & WebKit::WebInputEvent::ControlKey)) {
@s10wen
Copy link

s10wen commented Mar 23, 2013

Would be real nice to see a 'disable Chrome zoom' feature added, rather than spend 4 hours compiling cc @paulirish

https://productforums.google.com/forum/#!msg/chrome/-rtDLZmN9bk/iVmQz1r5bZUJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment