1. 17 Oct, 2016 3 commits
    • Martin Flöser's avatar
      Fix shortcut triggering with shift+letter · 78a2732a
      Martin Flöser authored
      Summary:
      A shortcut with e.g. shift+w could not be triggered as shift is
      considered as consumed. It transforms the keysym to an uppercase variant
      thus it is consumed.
      
      This change checks for the condition that shift is pressed and is the
      only consumed modifier. If the current keysym is a letter the shift is
      removed from the consumed modifier again to still support the shortcut.
      
      BUG: 370341
      FIXED-IN: 5.8.2
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3015
      78a2732a
    • Martin Flöser's avatar
      [kwinrules] Hide all autogroup related widgets · db95b968
      Martin Flöser authored
      Summary:
      Window tabs which are required for autogroup are currently not supported
      in KWin. Thus exposing autogroup related window rules does not make any
      sense.
      
      This change hides the options again in the hope that we can bring the
      feature back in future.
      
      BUG: 370301
      FIXED-IN: 5.8.2
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2996
      db95b968
    • Martin Flöser's avatar
      Support LEDs in Xkb and libinput · 4c7752c9
      Martin Flöser authored
      Summary:
      The Xkb implementation starts to track the state of the LEDs in the
      keymap and emits a signal whenever the LEDs change. This signal is
      connected to a method in LibInput::Connection which updates the led
      state on all devices and uses it to init the state of the led when a new
      device gets connected.
      
      BUG: 369214
      FIXED-IN: 5.8.2
      
      Test Plan: Connected a keyboard with LEDs and enabled NumLock and ScrollLock.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2943
      4c7752c9
  2. 11 Oct, 2016 2 commits
  3. 10 Oct, 2016 1 commit
    • Martin Flöser's avatar
      Add event filter for key press/release events while KWin grabbed keyboard on root window · 66d1a0cc
      Martin Flöser authored
      Summary:
      The modifier-only-shortcuts break as soon as KWin grabs the keyboard
      (e.g. alt+tab, present windows, etc.). The investigation shows that in
      that case KWin does not get any raw key events any more and thus gets
      confused about the state of the hold modifiers. E.g. alt+tab has the
      alt key pressed, but we miss the release as the keyboard is grabbed.
      
      This change addresses the problem by installing an additional event
      filter for key press and release event which only filters for key events
      on the root window. That way we can be sure that it only operates when
      KWin grabbed the keyboard on the root window.
      
      Note: the problem only exists when grabbing on the root window. If the
      grab is on another window (e.g. moving a window) we still do get all
      events.
      
      The problem also seems to not happen if another application grabbed
      keys on the root window. E.g. for key combinations grabbed by
      kglobalaccel the correct sequence of key press/release as raw events
      are reported. Also while the screen is locked the evemts are reported
      and kscreenlocker grabs the keyboard on the root window.
      
      Test Plan:
      Used Alt+Tab and Present Windows and tried to activate launcher
      afterwards.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2980
      66d1a0cc
  4. 06 Oct, 2016 4 commits
    • Martin Flöser's avatar
      Only trigger mod-only-shortcuts if global shortcuts are enabled · db2ff13d
      Martin Flöser authored
      Summary:
      KWin supports blocking global shortcuts when a window is active through
      window specific rules. This change ensures that the modifier only
      shortcuts also honor the blocking of global shortcuts. If global
      shortcuts are disabled, they won't trigger any more.
      
      BUG: 370146
      FIXED-IN: 5.8.1
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2952
      db2ff13d
    • Martin Flöser's avatar
      Workaround xkbcommon behavior concerning consumed modifiers · 421824b6
      Martin Flöser authored
      Summary:
      If a key could be turned into a keysym with a modifier xkbcommon
      considers the modifier as consumed even if not pressed.
      E.g. Alt+F3 considers alt as consumed as there is a keysym gnerated with
      Ctrl+Alt+F3 (vt switching).
      
      This change tries to workaround the problem by ignoring the consumed
      modifiers if there are more modifiers consumed than active. It's
      possible that this will create regressions for other shortcuts - we need
      to test it in the wild. Although this might cause regressions I'm aiming
      for Plasma/5.8 branch with the change. It only affects Wayland and fixes
      quite important shortcuts from window manager perspective (desktop
      switching (ctrl+f1 to ctrl+f4), desktop grid (ctrl+f8), present windows
      (ctrl+f9, ctrl+10), cube (ctrl+f11), user actions (alt+f3), close window
      (alt+f4)). If it causes regressions they need to be fixed as well in the
      Plasma/5.8 branch.
      
      A new API entry point for xkbcommon was proposed, but is not yet merged
      and there is no release with it yet. Once that is available the
      workaround should get removed and replaced by the new API call.
      
      BUG: 368989
      FIXED-IN: 5.8.1
      
      Test Plan: Going to restart session now with the change
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2945
      421824b6
    • Martin Flöser's avatar
      Only repeat one key · 3bc60893
      Martin Flöser authored
      Summary:
      So far KWin tried to repeat all pressed keys which should repeat. But
      this is not how X11 and e.g. QtWayland handle it. There only one key -
      the last one which got pressed - repeats. And this makes sense as the
      key is used to generate a keysym and that one KWin caches. Thus the
      logic so far resulted in incorrect keysyms to be generated during the
      repeat. E.g. pressing a, pressing b, releasing b would repeat b instead
      of the hold a as b was the last generated keysym.
      
      This change addresses this problem and let's only one key repeat at a
      time. When the currently repeating key gets released the repeat timer is
      stopped and other hold keys won't repeat any more. This also matches the
      behavior of X11 and QtWayland.
      
      BUG: 369091
      FIXED-IN: 5.8.1
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2941
      3bc60893
    • Martin Flöser's avatar
      Test case for mod only shortcut with global shortcuts disabled · 26ad65b1
      Martin Flöser authored
      KWin supports disabling global shortcuts while a specific window is
      active through window rules. This blocks global shortcuts but does not
      block the modifier-only-shortcuts as the new test case shows.
      
      CCBUG: 370146
      26ad65b1
  5. 05 Oct, 2016 4 commits
  6. 04 Oct, 2016 4 commits
  7. 02 Oct, 2016 1 commit
  8. 29 Sep, 2016 1 commit
  9. 28 Sep, 2016 1 commit
  10. 24 Sep, 2016 2 commits
  11. 20 Sep, 2016 1 commit
  12. 16 Sep, 2016 2 commits
    • Martin Flöser's avatar
      Fix whether a panel is supposed to have a strut in ShellClient · 7d93b585
      Martin Flöser authored
      Summary:
      The PanelBehavior was incorrectly mapped to hasStrut resulting in too
      many modes creating a strut for the panel.
      
      CCBUG: 368499
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2788
      7d93b585
    • Tobias C. Berner's avatar
      Include <errno.h> in waylandclipboard.cpp · 7b0676eb
      Tobias C. Berner authored
      Summary:
      `errno.h` needs to be includes, as `errno`, `EAGAIN` and `EWOULDBLOCK` are used.
      
      Without:
      > --- helpers/xclipboardsync/CMakeFiles/org_kde_kwin_xclipboard_syncer.dir/all ---
      > /wrkdirs/usr/ports/x11-wm/plasma5-kwin/work/kwin-5.7.95/helpers/xclipboardsync/waylandclipboard.cpp:110:25: error: use of undeclared identifier 'errno'
      >         if (n == -1 && (errno == EAGAIN || errno == EWOULDBLOCK) && ++retryCount < 1000) {
      >                         ^
      > /wrkdirs/usr/ports/x11-wm/plasma5-kwin/work/kwin-5.7.95/helpers/xclipboardsync/waylandclipboard.cpp:110:34: error: use of undeclared identifier 'EAGAIN'
      >         if (n == -1 && (errno == EAGAIN || errno == EWOULDBLOCK) && ++retryCount < 1000) {
      >                                  ^
      > /wrkdirs/usr/ports/x11-wm/plasma5-kwin/work/kwin-5.7.95/helpers/xclipboardsync/waylandclipboard.cpp:110:44: error: use of undeclared identifier 'errno'
      >        if (n == -1 && (errno == EAGAIN || errno == EWOULDBLOCK) && ++retryCount < 1000) {
      >                                           ^
      > /wrkdirs/usr/ports/x11-wm/plasma5-kwin/work/kwin-5.7.95/helpers/xclipboardsync/waylandclipboard.cpp:110:53: error: use of undeclared identifier 'EWOULDBLOCK'
      >        if (n == -1 && (errno == EAGAIN || errno == EWOULDBLOCK) && ++retryCount < 1000) {
      >                                                    ^
      > 4 errors generated.
      > *** [helpers/xclipboardsync/CMakeFiles/org_kde_kwin_xclipboard_syncer.dir/waylandclipboard.cpp.o] Error code 1
      
      Reviewers: graesslin
      
      Reviewed By: graesslin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2794
      7b0676eb
  13. 15 Sep, 2016 6 commits
    • Sebastian Kügler's avatar
      parent qaction in test · 99f491e7
      Sebastian Kügler authored and Martin Flöser's avatar Martin Flöser committed
      Summary:
      My compiler doesn't seem to like this constructor, it bails out with the
      following error:
      
      /home/sebas/kf5/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp:
      In member function ‘void GlobalShortcutsTest::testConsumedShift()’:
      /home/sebas/kf5/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp:79:40:
      error: no matching function for call to ‘QAction::QAction()’
           QScopedPointer<QAction> action(new QAction);
                                              ^~~~~~~
      
      Using this as first argument fixes the build on my machine.
      
      Test Plan: screenedges test fails, others pass. (this screenedges test failure seems unrelated)
      
      Reviewers: graesslin
      
      Reviewed By: graesslin
      
      Subscribers: luebking, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2782
      99f491e7
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 38a59332
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      38a59332
    • Jonathan Esk-Riddell's avatar
      Update version number for 5.7.95 · 1cb2bd99
      Jonathan Esk-Riddell authored
      GIT_SILENT
      1cb2bd99
    • Martin Flöser's avatar
      Pass Qt::Key to GlobalShortcutsManager::processKey · 7dfe4085
      Martin Flöser authored
      So far this method translated the keysym to Qt::Key. This is no longer
      needed as the only method which invokes processKey has access to the
      translated key. Thus saving one translation for every key press.
      
      Reviewed-By: bshah
      7dfe4085
    • Martin Flöser's avatar
      Better handling for forwarding key events to Wayland Server · 8fdcc24b
      Martin Flöser authored
      A new protected method is added to InputEventFilter to forward a
      QKeyEvent to the Wayland server. Several input filters need to forward
      the event to have a proper state of the events. E.g. the TabBox filter,
      but also the internal window filter and effects filter. It's important
      to update all events even if the events are not forwarded to a surface.
      
      This new method takes care of the general handling like ignoring key
      repeats, etc.
      
      Reviewed-By: bshah
      8fdcc24b
    • Martin Flöser's avatar
      Pass all key events during Alt+Tab to the Wayland Seat · c70df62c
      Martin Flöser authored
      When Alt+(Shift)+Tab is grabbed we have the modifier press key being
      passed to the Wayland server as key events are not yet grabbed. As KWin
      grabbed the release event the Wayland server considered the key still as
      pressed when going into the next application.
      
      This change ensures that all events are also passed to the wayland
      server. As no surface has focus we can be sure that it won't be passed
      to the application, but it ensures that the events are processed
      correctly.
      
      Reviewed-By: bshah
      c70df62c
  14. 14 Sep, 2016 8 commits
    • Martin Flöser's avatar
      Require frameworks 5.26 · cd053bf8
      Martin Flöser authored
      cd053bf8
    • Martin Flöser's avatar
      [autotests/integration] Test case for window larger than screen · e1bcda92
      Martin Flöser authored
      If a window gets opened which will be too large with decorations it
      should get a configure event with a smaller size. This currently
      doesn't happen as the test highlights.
      
      CCBUG: 366632
      e1bcda92
    • Martin Flöser's avatar
      [wayland] Fix release of TabBox on Wayland · c71b002b
      Martin Flöser authored
      Summary:
      The interaction is changed to trigger the check for release from the
      TabBoxInputFilter instead of reacting on modifier changes. That way
      it's possible to check for the relevant modifiers getting released
      instead of getting all modifiers in. Also this means that the checks
      are only performed when relevant.
      
      BUG: 368590
      
      Reviewers: #kwin, #plasma_on_wayland, bshah
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2773
      c71b002b
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · b56a28e1
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      b56a28e1
    • Martin Flöser's avatar
      Fix interaction between decoration and fullscreen ShellClient · ded90756
      Martin Flöser authored
      Summary:
      A fullscreen ShellClient still had a decoration which was caused by
      a combination of several bugs:
      * when going to/from fullscreen the decoration was not update
      * noBorder did not return true for a fullscreen window
      * wl_shell emits fullscreen changed and maximized changed
      
      Comparing to X11 Client both is done. So ShellClient needs to do the
      same. This ensures that the correct geometry is requested when going
      to fullscreen.
      
      BUG: 366764
      
      Reviewers: #kwin, #plasma_on_wayland, bshah
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2751
      ded90756
    • Martin Flöser's avatar
      [effects] Repaint expandedGeometry in HighlightWindowsEffect · d910217b
      Martin Flöser authored
      Summary:
      The highlight windows effect tried to trigger repaints with the shadow
      included by having an hardcoded pixel offset. This of course breaks if
      the shadow is larger than the hardcoded value.
      
      The reason presented on why it was done like that is no longer true and
      in the effects the actual visible area including decorations and shadows
      is available through the expandedGeometry.
      
      BUG: 368495
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2748
      d910217b
    • Martin Flöser's avatar
      Remove not-wanted modifiers prior to evaluating global shortcuts · 42358716
      Martin Flöser authored
      Summary:
      When triggering global shortcuts we are more interested in the hold
      keys than the currently active modifiers. E.g. capslock should not
      be seen as "shift is hold". Similar we need to remove consumed
      modifiers. Shift+5 is % and not Shift+% - the shift modifier is
      consumed and needs to be removed from shortcut evaluation.
      
      To support this we need to have the actual state directly from
      xkbcommon. Thus a new method is added which exposes the modifiers
      relevant for global shortcut matching. In addition on every key press
      all consumed modifiers are calculated and kept so that they can be
      used for shortcut matching.
      
      In addition a workaround is added for Backtab. Similar workaround
      exists in kglobalaccel for X11. The problem is that our shortcuts are
      stored incorrectly: Shift+Tab instead of Backtab. Thus a mapping back
      is required. To make everything worse KWin registers the wrong key
      sequence "Alt+Shift+Backtab" which doesn't make any sense and is
      broken on X11 at least.
      
      The workaround supports both special cases. The one for Backtab should
      be turned into Shift+Tab and also KWin's special case of adding shift
      to backtab.
      
      CCBUG: 368581
      
      Reviewers: #kwin, #plasma_on_wayland, bshah
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2768
      42358716
    • Martin Flöser's avatar
      Fix updating layer when setting a ShellClient to fullscreen · 64126a97
      Martin Flöser authored
      Summary:
      The call to update the layer was performed before adjusting to
      fullscreen. Thus the layer didn't get updated at all as it still
      evaluated to "not fullscreen".
      
      Reviewers: #kwin, #plasma_on_wayland, bshah
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2758
      64126a97