1. 02 Apr, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Make it possible to have a separate cursor for the tablet · 6abd23ed
      Aleix Pol Gonzalez authored
      Summary:
      As is KWin only had 1 Cursor which was a singleton. This made it impossible for
      us to properly implement the tablet (as in drawing tablets) support and show where
      we're drawing.
      This patch makes it possible to have different Cursors in KWin, it makes all the
      current code still follow the mouse but the tablet can still render a cursor.
      
      Test Plan: Tests pass, been using it and works as well as before but with beautiful tablet cursors.
      
      Reviewers: #kwin, cblack, davidedmundson
      
      Reviewed By: #kwin, cblack, davidedmundson
      
      Subscribers: davidedmundson, cblack, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D28155
      6abd23ed
  2. 22 Jul, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Run clang-tidy with modernize-use-override check · 8af2fa73
      Vlad Zahorodnii authored
      Summary:
      Currently code base of kwin can be viewed as two pieces. One is very
      ancient, and the other one is more modern, which uses new C++ features.
      
      The main problem with the ancient code is that it was written before
      C++11 era. So, no override or final keywords, lambdas, etc.
      
      Quite recently, KDE compiler settings were changed to show a warning if
      a virtual method has missing override keyword. As you might have already
      guessed, this fired back at us because of that ancient code. We had
      about 500 new compiler warnings.
      
      A "solution" was proposed to that problem - disable -Wno-suggest-override
      and the other similar warning for clang. It's hard to call a solution
      because those warnings are disabled not only for the old code, but also
      for new. This is not what we want!
      
      The main argument for not actually fixing the problem was that git
      history will be screwed as well because of human factor. While good git
      history is a very important thing, we should not go crazy about it and
      block every change that somehow alters git history. git blame allows to
      specify starting revision for a reason.
      
      The other argument (human factor) can be easily solved by using tools
      such as clang-tidy. clang-tidy is a clang-based linter for C++. It can
      be used for various things, e.g. fixing coding style(e.g. add missing
      braces to if statements, readability-braces-around-statements check),
      or in our case add missing override keywords.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, apol, romangg, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D22371
      8af2fa73
  3. 17 Sep, 2017 1 commit
  4. 25 Jan, 2017 1 commit
    • Martin Flöser's avatar
      Support modifier-only-shortcuts when capslock is on · 5a87fa3f
      Martin Flöser authored
      Summary:
      So far we didn't trigger modifier-only-shortcuts when capslock was
      enabled. In fact we even ensured that the shortcuts did not trigger.
      This seems not to be what our users expect. Meta should still trigger
      if capslock is on.
      
      This change modifies the logic to determine which modifier is currently
      pressed by using the modifiersRelevantForGlobalShortcuts. The difference
      to the "normal" modifiers is that this excludes capslock from modifiers
      and excludes consumed modifiers. The latter is not really relevant as
      modifier-only-shortcuts do not trigger if multiple keys are pressed,
      which is required to have a modifier consumed.
      
      BUG: 375355
      FIXED-IN: 5.8.6
      
      Test Plan: Only with adjusted autotest
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D4241
      5a87fa3f
  5. 22 Jan, 2017 1 commit
  6. 21 Jan, 2017 1 commit
    • Martin Flöser's avatar
      [autotests] Add test case for modifier only trigger when capslock enabled · 5dc942ac
      Martin Flöser authored
      This extends the testCapsLock to ensure that modifier only shortcut
      trigger when capslock is enabled. So far the test only ensured that
      capslock doesn't trigger the shift modifier only shortcut.
      
      As the test shows currently when capslock is on, the meta key doesn't
      trigger any more.
      
      This test case goes into Plasma/5.9 branch and not in Plasma/5.8 as a
      fix will most likely need the new xkbcommon 0.7 code paths which we do
      not have in Plasma/5.8.
      
      CCBUG: 375355
      5dc942ac
  7. 06 Oct, 2016 2 commits
  8. 19 Aug, 2016 1 commit
    • Martin Flöser's avatar
      Ensure modifier locks and latches don't trigger the mod only shortcut · ec98f498
      Martin Flöser authored
      Summary:
      If caps lock is on the shift key should not trigger. Similar pressing
      caps lock should neither on activation press nor on deactivation press
      trigger the shortcut. Related to that are latched modifiers aka sticky
      modifiers: if the modifier is still on after releasing the key the
      shortcut should not trigger. We must assume the user wanted to use the
      modifier to activate the modifier, not to activate the shortcut.
      
      This change ensures that we don't track for modifier only shortcuts if
      a modifier is active before press or after release.
      
      The added test case demonstrates for caps lock, latched modifiers is
      currently still untested. (Needs a way to mock it).
      
      Test Plan: See test case for caps lock.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2467
      ec98f498
  9. 18 Aug, 2016 1 commit
    • Martin Flöser's avatar
      Introduce env variable KWIN_XKB_DEFAULT_KEYMAP to force default layout creation · ea22b8f1
      Martin Flöser authored
      Summary:
      The Xkb class loads keyboard layouts from the users configuration. This
      makes tests fail locally if the user has a layout which behaves
      differently to the one the test expects. E.g. on a German layout the
      right alt key is different to the one of US layout.
      
      In order to have a more stable test base the env variable
      KWIN_XKB_DEFAULT_KEYMAP forces the loading of the default keymap, thus
      tests have a common layout set.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2466
      ea22b8f1
  10. 16 Aug, 2016 2 commits
  11. 15 Aug, 2016 1 commit
  12. 13 Aug, 2016 3 commits