[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    D6234: KGlobalAccel: port to KKeyServer's new method symXModXToKeyQt, to fix numpad keys
From:       Martin_Flöser <noreply () phabricator ! kde ! org>
Date:       2017-06-16 18:41:22
Message-ID: 20170616184122.108946.19816FE598D6A2B4 () phabricator ! kde ! org
[Download RAW message or body]

graesslin added a comment.


  I need to point out that this creates a functional difference to Wayland and \
according to the latest rules of Plasma such changes are no longer allowed unless the \
implementation is done first for Wayland.  
  Personally I am not really comfortable with such a large change to X11 nowadays. \
The code will be pretty much untested till the release and recent changes showed me \
that this is not a good idea. Especially I am no longer able to test the code (that's \
why I sent a mail to frameworks to step down as kglobalaccel maintainer, but so far \
nobody else stepped up).  
  So personally I am rather inclined to give you a -1 on it as I just think it's too \
dangerous. The kglobalaccel code is not good, but it works mostly. Proper fix will be \
in Wayland.

INLINE COMMENTS

> kglobalaccel_x11.cpp:278-287
> -	if ((keyModQt & Qt::SHIFT) && !KKeyServer::isShiftAsModifierAllowed( keyCodeQt ) \
>                 ) {
> -#ifdef KDEDGLOBALACCEL_TRACE
> -		qCDebug(KGLOBALACCELD) << "removing shift modifier";
> -#endif
> -        if (keyCodeQt != Qt::Key_Tab) { // KKeySequenceWidget does not map \
>                 shift+tab to backtab
> -            static const int FirstLevelShift = 1;
> -            keySymX = xcb_key_symbols_get_keysym(m_keySymbols, keyCodeX, \
> FirstLevelShift);

The shift handling code has shown regressions whenever it was touched. Also on \
Wayland I needed several tries to get it right. I would prefer if it were not touched \
any more.

This is not as simple as it looks. There are besties out there like Alt+Shift+Backtab \
as a global shortcut and a generic implementation breaks quickly there. It is quite \
likely that this change would break Alt+(Shift)+Tab in KWin.

REPOSITORY
  R268 KGlobalAccel

REVISION DETAIL
  https://phabricator.kde.org/D6234

To: dfaure, graesslin
Cc: #frameworks


[Attachment #3 (unknown)]

<table><tr><td style="">graesslin added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D6234" rel="noreferrer">View \
Revision</a></tr></table><br /><div><div><p>I need to point out that this creates a \
functional difference to Wayland and according to the latest rules of Plasma such \
changes are no longer allowed unless the implementation is done first for \
Wayland.</p>

<p>Personally I am not really comfortable with such a large change to X11 nowadays. \
The code will be pretty much untested till the release and recent changes showed me \
that this is not a good idea. Especially I am no longer able to test the code \
(that&#039;s why I sent a mail to frameworks to step down as kglobalaccel maintainer, \
but so far nobody else stepped up).</p>

<p>So personally I am rather inclined to give you a -1 on it as I just think \
it&#039;s too dangerous. The kglobalaccel code is not good, but it works mostly. \
Proper fix will be in Wayland.</p></div></div><br /><div><strong>INLINE \
COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px \
solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; \
border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div \
style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a \
style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D6234#inline-25676" rel="noreferrer">View \
Inline</a><span style="color: #4b4d51; font-weight: \
bold;">kglobalaccel_x11.cpp:278-287</span></div> <div style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; background: rgba(251, 175, 175, .7);">  <span style="color: \
#aa4000">if</span> <span class="p">((</span><span class="n">keyModQt</span> <span \
style="color: #aa2211">&amp;</span> <span class="n">Qt</span><span style="color: \
#aa2211">::</span><span class="n">SHIFT</span><span class="p">)</span> <span \
style="color: #aa2211">&amp;&amp;</span> <span style="color: #aa2211">!</span><span \
class="n">KKeyServer</span><span style="color: #aa2211">::</span><span \
class="n">isShiftAsModifierAllowed</span><span class="p">(</span> <span \
class="n">keyCodeQt</span> <span class="p">)</span> <span class="p">)</span> <span \
class="p">{</span> </div><div style="padding: 0 8px; margin: 0 4px; background: \
rgba(251, 175, 175, .7);"><span style="color: #304a96">#ifdef \
KDEDGLOBALACCEL_TRACE</span> </div><div style="padding: 0 8px; margin: 0 4px; \
background: rgba(251, 175, 175, .7);">    <span class="n">qCDebug</span><span \
class="p">(</span><span class="n">KGLOBALACCELD</span><span class="p">)</span> <span \
style="color: #aa2211">&lt;&lt;</span> <span style="color: #766510">&quot;removing \
shift modifier&quot;</span><span class="p">;</span> </div><div style="padding: 0 8px; \
margin: 0 4px; background: rgba(251, 175, 175, .7);"><span style="color: \
#304a96">#endif</span> </div><div style="padding: 0 8px; margin: 0 4px; background: \
rgba(251, 175, 175, .7);">        <span style="color: #aa4000">if</span> <span \
class="p">(</span><span class="n">keyCodeQt</span> <span style="color: \
#aa2211">!=</span> <span class="n">Qt</span><span style="color: \
#aa2211">::</span><span class="n">Key_Tab</span><span class="p">)</span> <span \
class="p">{</span> <span style="color: #74777d">// KKeySequenceWidget does not map \
shift+tab to backtab</span> </div><div style="padding: 0 8px; margin: 0 4px; \
background: rgba(251, 175, 175, .7);">            <span style="color: \
#aa4000">static</span> <span style="color: #aa4000">const</span> <span style="color: \
#aa4000">int</span> <span class="n">FirstLevelShift</span> <span style="color: \
#aa2211">=</span> <span style="color: #601200">1</span><span class="p">;</span> \
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, \
.7);">            <span class="n">keySymX</span> <span style="color: \
#aa2211">=</span> <span class="n">xcb_key_symbols_get_keysym</span><span \
class="p">(</span><span class="n">m_keySymbols</span><span class="p">,</span> <span \
class="n">keyCodeX</span><span class="p">,</span> <span \
class="n">FirstLevelShift</span><span class="p">);</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">The \
shift handling code has shown regressions whenever it was touched. Also on Wayland I \
needed several tries to get it right. I would prefer if it were not touched any \
more.</p>

<p style="padding: 0; margin: 8px;">This is not as simple as it looks. There are \
besties out there like Alt+Shift+Backtab as a global shortcut and a generic \
implementation breaks quickly there. It is quite likely that this change would break \
Alt+(Shift)+Tab in KWin.</p></div></div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R268 KGlobalAccel</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D6234" \
rel="noreferrer">https://phabricator.kde.org/D6234</a></div></div><br \
/><div><strong>To: </strong>dfaure, graesslin<br /><strong>Cc: </strong>Frameworks<br \
/></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic