1. 19 Aug, 2017 1 commit
    • Martin Flöser's avatar
      Send QKeyEvent with Qt::Key as expected by Qt to internal windows · 70bc9524
      Martin Flöser authored
      KWin passes the current keysym converted to a Qt::Key in the QKeyEvent.
      The current keysym does not always change when a key gets released, so
      when pressing a shortcut the release carry a Qt::Key which could be
      considered as wrong.
      QtWayland transforms the actual pressed/released key into a keysym and
      passes that through the QKeyEvent. This change does the same for the
      internal windows. A new QKeyEvent is created and adjusted in a way that
      it matches what Qt expects.
      Why not change everything to how Qt expects it? The key is used at
      various places and in KWin internally we expect the behavior how it is
      currently implemented. So it's better to use Qt's expectation only when
      interacting with Qt.
      Also the change carries a workaround for a bug in QKeySequenceEdit
      (see QTBUG-62102) and transforms Super to Meta. As this adjustment only
      makes sense for the internal windows we need to send in an adjusted
      QKeyEvent anyway, so another argument for using the Qt behavior only in
      this place.
      Test Plan:
      Can set a shortcut on Wayland and it can be used to activate
      the window.
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel
      Tags: #plasma
      Differential Revision: https://phabricator.kde.org/D6828
  2. 18 Aug, 2017 1 commit
    • David Edmundson's avatar
      Track outputs in kwin integration tests · 34de2c2b
      David Edmundson authored
      Split from the last review, as in order to track output's removed (in
      any way that's useful) the registry needs to be on the heap and the change grew.
      Test Plan:
      Every test that previously passed on my system still does
      Though currently that's not every test (for some reason) which was
      my main motivation for splitting.
      Reviewers: #plasma, graesslin
      Reviewed By: #plasma, graesslin
      Subscribers: plasma-devel, kwin, #kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D7377
  3. 13 Aug, 2017 3 commits
  4. 12 Aug, 2017 1 commit
    • Martin Flöser's avatar
      Implement the shortcut caption suffix for Wayland windows · bbca8c66
      Martin Flöser authored
      The generation of the shortcut caption part is moved from Client to
      AbstractClient. The ShellClient also has a captionSuffix and implements
      the full part in caption.
      Overall this needs more refactoring to support more sharing between the
      two implementations. But one step at a time.
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel
      Tags: #plasma
      Differential Revision: https://phabricator.kde.org/D7093
  5. 09 Aug, 2017 2 commits
  6. 08 Aug, 2017 2 commits
  7. 02 Aug, 2017 1 commit
  8. 31 Jul, 2017 2 commits
  9. 29 Jul, 2017 1 commit
    • Martin Flöser's avatar
      Replace Workspace::slotWindowQuickTileFoo by a quickTileWindow with argument · 64da6c8d
      Martin Flöser authored
      Thanks to std::bind we don't need that many different slots to setup the
      global shortcut connections. Instead we can have one shared
      implementation which takes the argument and passes it to the window.
      To support std::bind arguments in kwinbindings the initShortcut method
      and dependencies are adjusted as well as a new macro is added.
      As I don't want to include abstract_client.h in workspace.h a new enum
      is created for the quick tiling flags used in Workspace. This caused a
      larger refactoring as the change to an enum class also caused quite some
      Test Plan: Affected test cases still pass
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D6783
  10. 28 Jul, 2017 2 commits
  11. 27 Jul, 2017 3 commits
  12. 26 Jul, 2017 1 commit
  13. 25 Jul, 2017 2 commits
    • Martin Flöser's avatar
      [autotests] Try to make PlasmaWindowTest::testCreateDestroyX11PlasmaWindow more robust · f5f14475
      Martin Flöser authored
      The test was racing on build.kde.org and failing due to that. We have
      a condition there where we wait for some parts being transmitted through
      X and some through Wayland. The test assumed X is faster and failed due
      to that.
    • Martin Flöser's avatar
      Implement support for window shortcuts for Wayland windows · c29d6093
      Martin Flöser authored
      Moves most of the implementation from Client to AbstractClient, so that
      it can be used for both Client and ShellClient. Only the X11 specific
      code is kept in Client.
      Not yet implemented is updating the window caption.
      Unfortunately the testing of this feature showed that setting a window
      shortcut is not working on Wayland at all (the Qt widget doesn't properly
      catch the shortcut). So this feature is currently only of erm theoretical
      Test Plan: Added new test case. No testing in real world as explained.
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D6818
  14. 23 Jul, 2017 3 commits
    • Martin Flöser's avatar
      [autotests] Extend X11ClientTest::testFullscreenLayerWithActiveWaylandWindow · a1af59e9
      Martin Flöser authored
      Unfortunately still doesn't trigger the actual bug.
    • Martin Flöser's avatar
      Reset last_active_client when a ShellClient is removed · bd158a63
      Martin Flöser authored
      The last_active_client is set when an AbstractClient gets activated. For
      the X11 case the last_active_client was getting reset to nullptr when
      the last_active_client gets destroyed. But for the ShellClient that did
      not yet happen. This could result in a crash.
      This change addresses the problem and adds a test case which triggered
      the crash. The condition of the crash are difficult to generate though -
      it took me about an hour to write the test for the crash.
      1. Wayland client must be active
      2. Explicit focus to null (no active client)
      3. destroy Wayland window
      4. X11 client which sets focus on itself without interaction with window
      Test Plan: test case no longer crashes
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D6852
    • Martin Flöser's avatar
      [autotest] Add a test case for X11 fullscreen windows when an Wayland window is there · dcbfa086
      Martin Flöser authored
      KWin cannot handle the layering correctly when a Wayland window is active
      and there is a fullscreen X11 window. This test tries to simulate the
      situation, but it does not show it.
      Nevertheless it's a good test, so let's add it.
      CCBUG: 375759
  15. 21 Jul, 2017 1 commit
  16. 20 Jul, 2017 3 commits
  17. 18 Jul, 2017 2 commits
  18. 17 Jul, 2017 1 commit
    • Martin Flöser's avatar
      Properly swap the quick tile side when pressing the shortcut again · 139b4dc8
      Martin Flöser authored
      The quick tile shortcuts have a feature of moving the window to the next
      screen if one presses the same shortcut again.
      E.g. if a window is quick tiled to the left on the right most screen,
      quick tile again to left should move it to the left screen and quick tile
      right. Thus it swaps the borders.
      This wasn't handled correctly, especially not for modes like top and
      bottom. If a window is quick tiled to the top an impossible mode was
      generated: Left | Right. Doesn't make sense.
      This change fixes the mode swapping and extends our quick tile testing
      to cover the situation.
      BUG: 382313
      FIXED-IN: 5.10.4
      Test Plan: Extended test case
      Reviewers: #plasma, #kwin
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D6708
  19. 11 Jul, 2017 2 commits
    • Martin Flöser's avatar
      Implement support for restricted move area on Wayland · 672cae9a
      Martin Flöser authored
      This change implements a missing TODO to generate the restricted move
      area for windows with struts (aka panel) on Wayland.
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel
      Tags: #plasma
      Differential Revision: https://phabricator.kde.org/D6611
    • Martin Flöser's avatar
      Restrict move resize area only on the screen the strut window is on · 14c8440f
      Martin Flöser authored
      By allowing panels between screens in 5.8 to have a strut we created a
      "regression" in KWin. KWin always was wrong, just we didn't notice as
      neither Plasma nor previously Kicker set a strut on panels between shared
      screen edges.
      The strut is created from the edge of the overall screen setup. This
      means a panel on the left edge of a screen on the right has the strut
      starting from the left screen. KWin uses the strut to restrict the move
      resize area: a window decoration is not allowed to go below a strut. Thus
      it becomes impossible to move the window from the right to the left
      This change tries to solve this problem by only restricting the move area
      on the screen the window with the strut is on. E.g. if the window is on
      the right screen, the left screen is not affected. Thus it's possible
      again to move a window from one screen to the other as the added test
      case shows.
      Unfortunately there are still corner cases where this won't work
      correctly. If the window is on both screens this won't work. It is also a
      rather heavy change for KWin and thus it's targeted for master and not
      for the 5.10 or the 5.8 branch. If we notice that the patch works well
      and doesn't create further issues, it should be considered for
      BUG: 371199
      CCBUG: 370510
      FIXED-IN: 5.11
      Test Plan: Added test case
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D6562
  20. 08 Jul, 2017 1 commit
  21. 06 Jul, 2017 1 commit
    • Martin Flöser's avatar
      [qpa] Prevent crash due to Surface getting null · 962a2e39
      Martin Flöser authored
      This is a regression due to changes in Breeze to support Qt 5.8+ behavior
      change. KWin's own QPA operates like < Qt 5.7 and breeze was programmed
      against that. Due to that it can happen now that Breeze hits code paths
      in which KWin does not have a surface.
      To trigger one only needed to open the user actions menu twice.
      This change adds a test case which simulates the problem and fixes all
      crashes happening in the code path.
      Most likely shadows are now broken for KWin's own windows, this change is
      only to prevent the crash and thus is for 5.10 branch, while shadow
      fixing will go to master branch.
      BUG: 382063
      FIXED-IN: 5.10.4
      Test Plan: New test case
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D6533
  22. 01 Jul, 2017 1 commit
    • Martin Flöser's avatar
      Restore active client after ending showing desktop · 113be5fa
      Martin Flöser authored
      Showing desktop requests focus on the desktop window. This means the
      active window is reset. When ending showing desktop the state was not
      This change addresses this problem by requesting focus to the best
      BUG: 375993
      FIXED-IN: 5.10.4
      Test Plan: New autotest and manual testing
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D6420
  23. 25 Jun, 2017 1 commit
  24. 24 Jun, 2017 2 commits