<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/120319/">https://git.reviewboard.kde.org/r/120319/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On September 23rd, 2014, 5:01 p.m. CEST, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Qt cannot "distiguish" because there's nothing to distinguish - the driver generates synthetic wheel event for the inertia.
You can btw. turn that <censored> off.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Seems an issue with inertial scrolling on X11 as well https://bugs.freedesktop.org/show_bug.cgi?id=38909
Otherwise i'd have opted for "the driver shall please stop this when you hit a key".</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">On a random note, I can't find that setting in systemsettings?
If there's a config GUI for this, aligning to it seems reasonable, BUT does no way fix the actual issue w/ inertia (ie. "you don't have control over your input device")</p></pre>
 </blockquote>




 <p>On September 23rd, 2014, 5:41 p.m. CEST, <b>René J.V. Bertin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You may not believe it, but I actually prefer the UE with the feature on. Probably because it saves me some movements, which is always good (less RSI).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Yes, I imagine that the issue can occur on Linux as well if inertial scrolling works the same way there. It just never bit me on Linux - and yet I run that on underpowered machines ...
Might be a thought to define the modifier key to get wheelMouseZooms in that case, or at least make that possible somewhere in systemsettings?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You're right, I haven't been able to find the setting in systemsettings. The setting <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">is</em> part of the standard settings, though, no idea why it slipped through and remained a hidden setting. But because it's part of the standard settings I went with aligning to it, instead of hacking in a new switch as in Konsole.
NB, seems likely that Konsole offers its own switch because the authors didn't go the length I did to find out about the one in <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">kdeglobalrc</code>?</p></pre>
 </blockquote>





 <p>On September 23rd, 2014, 8:24 p.m. CEST, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">UX isn't my concern - but doing that in the driver is simply idiotic.
(Sorry, but hey - Peter H. shares that opinion ;-)
What eg. happens when you reached the end of the document? The driver keeps scrolling and you don't even notice that.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Either the view provides inertic scrolling or you purchase a rodant that can alter between swing and precise wheel (w/o trying to advertise here, eg. Logitech M500 is an affordable device with this capability)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Choosing another modifier won't help, but at best move the problem around (ok, there's no META key on OSX, but it is indeed used for shortcuts on linux/windows - often global ones. So instead of scaling the text, you end up scaling the entire desktop ;-)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">While I personally don't use text scaling in kate (this way), if there's no present UI for the global config, it can hardly be used and we can't (?) introduce config GUI for the kate part in SC4, I assume (kate devs will know better)
Also simply disabling a feature because it is <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">one</em> occasion of a driver issue doesn't sound too reasonable - what if I'd in general like to scale the text this way but am still annoyed by the driver behavior?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">One way to deal with this is to measure the time between the last unmodified wheel event and the now modified wheel event. If that is too low to be reasonably caused by a human being (ie. the scroll "started" unmodified and suddenly a modifier kicks in) one could ignore the modifier.
That would however have to apply to all items.
Stupid question: how does (Qt)WebKit behave (eg. in qt-assistant?) in this regard?</p></pre>
 </blockquote>





 <p>On September 23rd, 2014, 9:13 p.m. CEST, <b>René J.V. Bertin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I use Apple's Magic Trackpad, no spamming intended, but I wouldn't want to change for anything else anymore... </p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">ok, there's no META key on OSX</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">There is. META is mapped to Ctrl by default on OS X (and CTRL to Command, which is the real Meta key), but there is a setting to switch that back. I presume the default is conceived to reflect the fact that OS X uses the Command key in place of Ctrl for shortcuts. It apparently never occurred to them to define a special code (<code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ACCEL</code>) for the standard accelerator "opcode" ;)</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Also simply disabling a feature because it is one occasion of a driver issue doesn't sound too reasonable </p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">How do you think I found the global setting and how to read it out? It's used exactly this way in KTextEdit (see <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KTextEdit::wheelEvent</code>) which again raises the question why the setting isn't exposed in systemsettings.</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">what if I'd in general like to scale the text this way but am still annoyed by the driver behavior?</li>
</ul>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The only solution in that case would be to configure the feature to use another key or key combination, one that works for you and your workflow and doesn't risk to get triggered unexpectedly. </p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Stupid question: how does (Qt)WebKit behave (eg. in qt-assistant?) in this regard?</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Not so stupid: Qt does exactly the same thing, and it doesn't appear to be optional in any way there. This is probably why <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KTextEdit</code> overrides the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">wheelEvent</code> it inherits from the parent Qt widget.</p></pre>
 </blockquote>





 <p>On September 23rd, 2014, 9:20 p.m. CEST, <b>René J.V. Bertin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">BTW:</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What eg. happens when you reached the end of the document? The driver keeps scrolling and you don't even notice that.</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">But the view knows. On iOS and newer OS X versions it actually bounces when this happens. Which is why I learned that I prefer the inertial scrolling, because I tried switching it off to get rid of the bouncing and felt like handicapped.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">BTW, the OS X driver's inertial feature can be stopped very easily: swipe to get the view to scroll; place back 2 fingers and the scrolling stops at once. Exactly as it did with the big thumb trackball I had before.</p></pre>
 </blockquote>





 <p>On August 23rd, 2015, 2:29 p.m. CEST, <b>Dominik Haumann</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Did you reach any consensus about this patch? If this is not going in, it should be discarded.</p></pre>
 </blockquote>





 <p>On September 1st, 2015, 4:08 p.m. CEST, <b>René J.V. Bertin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Good question, I guess that we both forgot about the whole thing ... Thomas?</p></pre>
 </blockquote>





 <p>On September 1st, 2015, 4:31 p.m. CEST, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I still oppose the idea to try to fix this in client code.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">a) the setting is KDE4/support only, ie. deprecated code anyway
b) there's apparently no config GUI for that setting?!
   => secret workaround
c) You suggested that (all?) Qt5 applications suffer from this problem (where we cannot even involve this solution -> problem globally remains. Let alone gtk+ etc. clients)
d) The setting can no more be used to prevent eg. accelerated scrolling (which it originally selected)
e) There may be random custom handling of modifiers on wheel events everywhere - and they all needed to be stripped/made configurable at least.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Let alone that faking scroll inertia in the server is silly itfp.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">a) The server must either simply stop faking inertia with the next keyboard/crossing event (while apparently that's not simple on evdev) or (rather) scrolling inertia has to be done in the client (w/o faking input events)
b) Eg. when I scroll and move the mouse to another window or just scrollview while the inertia faking is going on, I suddenly scroll the other window/view? (the view is not "fixable" on serverside inertia faking)
c) Do I really want scrolling inertia on the destkop to change virtual desktops?</p></pre>
 </blockquote>





 <p>On September 1st, 2015, 5:02 p.m. CEST, <b>René J.V. Bertin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">a) yay, stable release code that actually allows you to get some work done without fearing whatever tomorrow's update might break. Fixing naggles in KDE4 is like showing love to unknown hordes of users who stick with LTS or non-Linux distributions for good reasons.
b) So? If that's really a serious issue for you (you know what vi[m] is, right? :P) then there's always the possibility to add a setting to Kate that is first-time initialised off the global setting and then maintained independently.
c) I haven't checked with Qt5 for this since I created the RR, nor KF5 applications so I don't know to what extent my claim still stands, nor why the proposed fix wouldn't work there. (I'd hope there's something comparable, in fact, I seem to recall that Qt also has a "should the mouse wheel zoom" setting.) But we're talking about a KDE4 application here in which the issue is particularly noticeable (to me). KDE. 4. Not GTk or anything else.
d) eh? The setting I use is called <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KGlobalSettings::wheelMouseZooms()</code>. I don't see what that has got to do with accelerated scrolling, nor how checking the setting prevents that kind of scrolling?
e) again, so? This is a patch for Kate. It's not intented to cure all pain in the world, but it could show how this issue can be tackled to others who're bothered by it in a random other application.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">a) I don't agree and also think neither of us gets to dictate what the server may not or must do. Besides ... what server, on platforms that don't use X11?
b) I don't know what happens to you, but in my case on OS X this is not possible because the inertial scrolling stops as soon as I move the pointer. It does not when I press or release a key, and I think that's rightly so. I could in fact find a use for such an event in Kate (like the accelerated scrolling you mentioned).
c) ditto. (In fact, you actually want to disable virtual desktop change coupled to mouse <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">movement</em> that's not part of a multi-touch gesture, trust me ;))</p></pre>
 </blockquote>





 <p>On September 1st, 2015, 5:30 p.m. CEST, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">a) and will see maybe one more release - at best.
b) this typically means "my secret pet feature workaround with no use for anyone else" - if it's so important, it must be exposed to the common user.
c) kdeglobals is gone (ok, deprecated to kdelibs support) and this setting isn't invoked by any QPA - what you set here has no whatsoever impact on plain Qt5 applications.
d) look up the code, the comment describes the history of the feature.
e) this means you seriously want to fix clients one-by-one by stripping features instead of simply addressing to core culprit?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">--</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">a) I don't dictate, but merely state sane behavior. If OSX btw. fakes this through a common input lib, it could just as well fix it there (despite the feature belongs into the clients)
b) I frankly would have to try, but then the solution is simple: slightly move the mouse before pressing a modifier...
c) what "ditto"? if i'm above the desktop and rotate the wheel by one/two/three iteration/s, I expect to end up one/two/three desktops ahead, not 13 or 25. I'm talking about a mouse wheel, not a touch device (which isn't controllable itr. anyway)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You may have a point though in that altering the font scale (or anything like that) is of no use from a touch device, because it can/does not generate clean wheel clicks.
However, the proper™ solution is then to base this behavior on the nature of the input device and/or eg. ignore scroll events for such behavior when many™ of them occur in short™ time.
Not some obscure and deprecated setting that you luckily happen to know.</p></pre>
 </blockquote>





 <p>On September 1st, 2015, 6:40 p.m. CEST, <b>René J.V. Bertin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I've got better things to do than keep up a tit-for-tat dialogue, but I do not agree that simulating inertial scrolling is anything but the "event server's" business. That's not any less the case than that it's some server's role to provide access to any other kind of events, or fonts.
What's more, that event server probably has access to lower-level information from the input device anyway, and can use that information to determine whether simulation is needed or not (a trackball wouldn't require it). And above all, it can provide the simulated events in a consistent manner across all clients.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">But I'm not going to insist ... nor feel inclined to discard this request because there's only been feedback from a single person who has failed to come up with (AFAIC) convincingly valid arguments against my change.</p></pre>
 </blockquote>





 <p>On September 1st, 2015, 7:37 p.m. CEST, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">that event server probably has access to lower-level information from the input device anyway</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Which it can (and does) easily pass downstream while it completely lacks (by nature) private client detail informations.</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">it can provide the simulated events in a consistent manner across all clients</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What apparently leads to glitches.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You however completely ignored any technical issues - and suggestions.
Reading across https://bugs.freedesktop.org/show_bug.cgi?id=38909 again, it seems the faked events have a higher valuator (scrollDistance) than usual. If that's the same on OSX, it could be used (next to an absurd frequency?) to control the feature.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Relying on a deprecated and hidden config key is no solution at all - I'm sorry if that doesn't convince you.</p></pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I've been ignoring technical issues mostly because they are moot, but I do realise I could have made it clearer that this whole thing concerns OS X primarily. It's not that the issue cannot be reproduced on X11/xcb set-ups, I just don't run into it.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I have not been able to reproduce the issue with Qt 5.4.2 on OS X which somehow manages to dissociate keypresses and simulated inertial scrolling.
So the patch proposed here is only a fix for Kate 4.14 and most likely not required for newer Qt5-based versions. It brings Kate's behaviour in synch with applications that are based on KTextEdit, like all KDE PIM applications, by using the same config key (cf <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KTextBrowser::wheelEvent</code> and <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KTextEdit::wheelEvent</code>). In my world that makes a perfectly fine fix for a branch that is no longer under active development. I don't see a valid reason to make it OS X only though; if you mentioned things that are definitely broken because of it I missed them.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">There's a valid point that could have been made is that my patch should do as the wheelEvent handlers cited above, that is provide an <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">else</code> for when <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">wheelMouseZooms()</code> returns false. Maybe that was implied; if so it wasn't explicit enough. I'll look into that possibility, off the top of my head I'd say that might actually reinstate the accelerated scrolling referred to above (which I think is impossible to obtain in Kate's current implementation).</p></pre>
<br />










<p>- René J.V.</p>


<br />
<p>On September 22nd, 2014, 5:16 p.m. CEST, René J.V. Bertin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for Kate, KDE Software on Mac OS X and kdelibs.</div>
<div>By René J.V. Bertin.</div>


<p style="color: grey;"><i>Updated Sept. 22, 2014, 5:16 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">KDE has a global text editor option that can be used to let Ctrl-MouseWheel events zoom the text font being used. Kate does not respect this setting, which is an omission that can lead to unexpected behaviour.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">On OS X, the feature works slightly differently in the sense that <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Qt::ControlModifier</code> does not designate the control key, but the command (?, Apple) key. In addition, Qt's event handling does not appear to be able to distinguish between scrolling under direct control, and residual scroll movement that's due to simulated inertia. As a result, any attempt to use a keyboard shortcut while a text view has not stopped moving completely will lead to text zooming.
See https://bugreports.qt-project.org/browse/QTBUG-41475 .</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">At first I thought to replace <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Qt::ControlModifier</code> with <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Qt::MetaModifier</code> on OS X but that would probably require changes in many locations, and thus best be preceded by a design decision if the standard shortcut modifier key ought not be referenced via a symbolic platform constant not named after a specific key, instead of being hardcoded (and using a key name).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Therefore, I present a small patch that checks <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KGlobalSettings::wheelMouseZooms()</code> when the platform's <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ControlModifier</code> is held and a wheel event received.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">An alternative solution could introduce a Kate-specific setting (just like Konsole has one), but that would require far more changes.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">On OS X against kdelibs 4.14.1 (git/kde4). The change consists of an additional call to a standard kdelibs function which I do not expect to introduce regressions on any platform.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I looked at kate's git/master code, which lacks a <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">wheelEvent</code> handler suggesting the feature works differently there. However, Qt 5.3.1 applications (like Digia's own Qt Creator) still suffer from the phenomenon described above, so a fix would be beneficial for KF5 too)</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>part/view/kateviewinternal.cpp <span style="color: grey">(a2906f3)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/120319/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>