1. 14 Sep, 2016 5 commits
    • Martin Flöser's avatar
      Remove not-wanted modifiers prior to evaluating global shortcuts · 42358716
      Martin Flöser authored
      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
    • Martin Flöser's avatar
      Fix updating layer when setting a ShellClient to fullscreen · 64126a97
      Martin Flöser authored
      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
    • Martin Flöser's avatar
      Make WindowPixmap::isValid virtual and override in concrete implementation · 0bb1f2e7
      Martin Flöser authored
      If a buffer gets destroyed the texture created from it is still valid.
      In such a situation the OpenGLWindowPixmap should return true for isValid
      and not false as it did. Similar in QPainter compositor the pixmap is
      valid if there is an image copied from the buffer.
      This change ensures that for example minimizing an XWayland window
      still has a texture during the minimize animation.
      BUG: 368440
      Test Plan:
      Minimize animation plays for X windows and minimized windows
      are shown in present windows.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2724
    • Martin Flöser's avatar
      [autotests/integration] Add a global shortcuts test · cdcee88b
      Martin Flöser authored
      New test case to verify that global shortcut triggering works correctly.
      First test case is to verify that consumed modifiers do not break the
      shortcut. E.g. a shortcut registered for % should trigger on Shift+5 on
      us layout. For that the modifier needs to be consumed, otherwise it's
      Shift+% and doesn't trigger. As the test shows this is currently the
    • Martin Flöser's avatar
      [autotests] Wrap integration tests in dbus-session-run · bf7c6704
      Martin Flöser authored
      Each test needs a dedicated dbus session as the test needs to register
      services (e.g. kglobalaccel) and might fail if that cannot be registered.
      Due to the wrapping in another command the test need to make sure that
      any process they start terminates before them. E.g. the activities test
      must stop kactivitymanagerd in cleanupTestCase, otherwise the test times
  2. 13 Sep, 2016 10 commits
    • Martin Flöser's avatar
      [autotests/integration] Test basic working of Alt+Tab and Alt+Shift+Tab · a69300f7
      Martin Flöser authored
      Dedicated test methods for Alt+Tab and Alt+Shift+Tab. Both open three
      windows and simulate one press with opening the TabBox. Alt+Tab should
      move to the previous window in the chain, Alt+Shift+tab to the last
      window in the chain.
    • Martin Flöser's avatar
      [kcmkwin/compositing] Hide config options which don't make sense if Compositing is required · e8e6e31a
      Martin Flöser authored
      On Wayland compositing is required. It doesn't make any sense to offer
      the user to disable the compositor or to allow windows to block
      The Compositor DBus interface gains a new property whether the platform
      requires compositing. This is queried by the compositing kcm and based
      on that the two mentioned options get hidden and not stored to config
      Test Plan: Opened the KCM on Wayland
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2586
    • Martin Flöser's avatar
      Introduce a config option whether applications are allowed to block compositing · 85302033
      Martin Flöser authored
      From feedback we got it seems that not all users agree to games and
      other applications blocking compositing. Some users prefer to have
      compositing always on even if this gives a small performance penelity.
      This change introduces a dedicated config option to specify whether games
      are allowed to block compositing. By default this option is enabled.
      The setting can be overwritten with a window specific rule. So usecases
      like all windows except this very specific one are supported.
      In the user interface the config option is shown where previously the
      unredirect fullscreen option was shown.
      Test Plan:
      Run a game which should block compositing, verified it blocks.
      Changed the setting, run the game again, verified it doesn't block. And
      once more for with allowing to block.
      Reviewers: #kwin, #plasma_on_wayland, #vdg
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2584
    • Martin Flöser's avatar
      [autotest/integration] Extend the TabBox caps lock test to verify correct shortcut is triggered · c6a84041
      Martin Flöser authored
      Capslock currently modifies the shortcut which is triggered from
      Alt+Tab to Alt+Shift+Tab. This shouldn't be and is not the case on X11.
    • Martin Flöser's avatar
      [autotests/integration] Add new test for triggering TabBox · ca6505e8
      Martin Flöser authored
      First test case highlight a problem that tabbox doesn't close if
      capslock is on.
      CCBUG: 368590
    • Martin Flöser's avatar
      Set componentName to KWIN_NAME on QActions for KGlobalAccel · cb7f9222
      Martin Flöser authored
      By setting the componentName we ensure that test don't grab the shortcut.
      CCBUG: 368675
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 6ae917d7
      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"
    • Martin Flöser's avatar
      [autotests/integration] Extend fullscreen shell client test to verify layers · 95f506ad
      Martin Flöser authored
      As the test shows the layer does not get updated correctly.
    • Martin Flöser's avatar
      Match window role in Rules in a case insensitive manner · 97b59450
      Martin Flöser authored
      We used to have a toLower when reading the rule. This was removed with
      4f7edb8d which turned it into a case sensitive matching to fix a
      But this created another regression: existing rules written lower case
      are no longer matched.
      This change makes the role matching case insensitive again.
      BUG: 367554
      Reviewers: #kwin
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D2574
    • Martin Flöser's avatar
      Support highlighting windows through EffectsHandlerImpl · 2545162f
      Martin Flöser authored
      So far TabBox used highlight windows by passing window ids around through
      an X property. This doesn't work on Wayland where we don't have window
      ids for our TabBox and the Wayland windows.
      This change introduces a new Effect::Feature for HighlightWindows which
      the HighlightWindowsEffect provides. The EffectsHandlerImpl has a new
      method to highlightWindows which it delegates to that effect if it is
      loaded by invoking a new performFeature method.
      The TabBoxHandler now passes the highlighting to the effects system
      instead of updating the x11 property. Thus this works on Wayland and
      at the same time improves the X11 side by no longer having to go through
      the property protocol.
      Test Plan: Verified that Alt+Tab highlights the windows on Wayland correctly.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2630
  3. 12 Sep, 2016 7 commits
    • Martin Flöser's avatar
      [autotest/integration] Extend TestShellClient::testFullscreen with deco · 405702b1
      Martin Flöser authored
      In addition to normal client to fullscreen two more cases are added
      which also go from a server side decorated window to fullscreen.
      This highlights an issue that an incorrect geometry is requested.
      CCBUG: 366764
    • Martin Flöser's avatar
      DebugConsole window does not take keyboard input · 3a3d1b6b
      Martin Flöser authored
      In order to add more tabs which can further help monitoring how KWin
      handles some aspects the DebugConsole is changed to not take keyboard
      input. This means it can only be navigated using pointer device or touch
      This is needed for adding a new tab to monitor clipboard changes. On
      Wayland sometimes windows don't get the clipboard, so it would be
      helpful to have a debug monitor to see when the clipboard changes. But
      for that debug console window may not take keyboard events.
      To support this DebugConsole sets the WA_ShowWithoutActivating attribute
      which gets honored by the InternalWindowEventFilter and does not forward
      key events to such windows.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2620
    • Martin Flöser's avatar
      Don't bind ShellClient::acceptsFocus to whether the window is shown · 9b32615a
      Martin Flöser authored
      A not shown window may accept focus (e.g. when minimized). Given that
      the condition was wrong and broke when making minimized windows not
      This change takes the idea of not passing focus to a closing or unmapped
      window directly into acceptsFocus. Which also means that this condition
      now works for xdg_shell windows.
      BUG: 368673
      Reviewers: #kwin, #plasma_on_wayland, bshah
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2745
    • Martin Flöser's avatar
      Merge branch 'Plasma/5.7' · 156bf258
      Martin Flöser authored
    • Martin Flöser's avatar
      [kwinglutils] Skip ShaderManager::selfTest for NVIDIA Quadro hardware · e9e936b6
      Martin Flöser authored
      The self test fails with NVDIDA 370.23 or newer on Quadro hardware.
      Most likely there is a bug in our code as the same things work later on.
      But without the hardware we are not able to reproduce and investigate
      properly. Given that all we currently can do is to skip the self test.
      We encourage users to investigate this properly and to help us to
      identify the root issue, so that we can fix it.
      CCBUG: 367766
      Reviewers: #kwin
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D2744
    • Martin Flöser's avatar
      [autotests/integration] Add test case for fullscreen to ShellClientTest · e25be658
      Martin Flöser authored
      There are issues with setting ShellClients to fullscreen, so adding an
      autotest to reproduce it. Basic test does not show any issues yet.
    • Martin Flöser's avatar
      [autotests/integration] Extend TestShellClient::tetsMinimizeActiveWindow · ab68697f
      Martin Flöser authored
      Adds QEXPECT_FAIL cases for wantsInput and wantsTabFocus of a minimized
      CCBUG: 368673
  4. 09 Sep, 2016 1 commit
    • Martin Flöser's avatar
      Remove non visible internal windows from the x stacking order · 8d4204ac
      Martin Flöser authored
      KWin always has a few internal windows around which are not visible.
      A QWindow created somewhere, but not shown. Such windows should not
      be part of the stacking order.
      If they are it breaks code which looks at the top most window in the
      stacking order like e.g. SlidebackEffect.
      This change ensures that the stacking order gets updated whenever a
      ShellClient gets hidden and that internal windows with isShown being
      false are excluded from the stacking order.
      BUG: 364483
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2636
  5. 08 Sep, 2016 3 commits
  6. 07 Sep, 2016 1 commit
  7. 06 Sep, 2016 1 commit
  8. 05 Sep, 2016 1 commit
  9. 01 Sep, 2016 1 commit
  10. 31 Aug, 2016 2 commits
    • Martin Flöser's avatar
      Set the restore geometry after placing a ShellClient for the first time · d3741bd5
      Martin Flöser authored
      The restore geometry gets initially set to 0/0xsize before the placement
      is done. When going into updateClientArea and then afterwards into
      AbstractClient::checkWorkspacePosition the geometry restory is used for
      calculating the new position. This results in windows getting moved to
      0/0 when e.g. plugging in a new screen or a panel changes, etc.
      This change ensures that the restore geometry is set correctly after the
      first placement.
      BUG: 366696
      Reviewers: #kwin, #plasma_on_wayland, bshah
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2627
    • Roman Gilg's avatar
      Atomic Mode Setting / Universal Plane preliminary support · 997cf97c
      Roman Gilg authored
      This is Milestone 1 of full support of Atomic Mode Setting (AMS) and
      Universal Planes in the KWin DRM backend.
      With Milestone 1 we can use the primary plane of a DRM output and do an
      AMS commit (this means mode setting aswell as page flipping), if the
      driver supports it. Until now the functionality is only tested on Intel
      graphics. You need the drm-next kernel for most recent DRM kernel
      developments. As boot option set "i915.nuclear_pageflip". Additionally
      at the moment AMS is still hidden behind the environment variable
      KWIN_DRM_AMS. Set it, if you want to try out AMS.
      What needs to be done next: Make it possible to transfer EGL buffers
      directly to planes and implement logic for deciding about using a plane
      or not for a specific buffer.
      You can read more about it on LWN:
      And on Martin's blog:
      I used as model previous work by Daniel Stone for Weston:
      Reviewed-by: mgraesslin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D2370
  11. 30 Aug, 2016 4 commits
    • Martin Flöser's avatar
      Add a Workspace::findToplevel(QWindow*) method · 4c0e33a9
      Martin Flöser authored
      This allows finding the Toplevel for a QWindow which is on Wayland a
      ShellClient and on X11 an Unmanaged. This can be used to simplify
      code when a Toplevel is needed for an internal QWindow without having
      to do platform specific checks.
    • David Edmundson's avatar
      authorizeKAction -> authorizeAction · 8db4a6ff
      David Edmundson authored
    • Martin Flöser's avatar
      [autotests] Extend PlasmaSurface to verify position of OSD windows · f99a456f
      Martin Flöser authored
      This adds a new test case which maps an OSD window and verifies that it's
      positioned correctly. Then an additional screen is added which should not
      affect the position, but as the test case shows: it does affect the
      CCBUG: 366696
    • Martin Flöser's avatar
      Support compose key in xkbcommon integration · a98a1b13
      Martin Flöser authored
      The Xkb class now creates a compose key table and a state object and
      feeds all key presses through the compose state machine.
      Xkb now tracks the latest keysym which is provided through new method
      currentKeysym. This is now used when creating a QKeyEvent instead of
      passing the key code to the xkb state. With that the keysym can also
      be updated through the compose state system.
      This only affects KWin internal usage where text is composed, e.g. the
      present windows effect filter. Wayland clients do not gain compose key
      support, though.
      Minimum xkbcommon version raised to 0.5 as compose key support is new
      in that version.
      Test Plan: Enabled compose key support in keymap and verified through DebugConsole
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2622
  12. 29 Aug, 2016 4 commits