1. 23 Sep, 2017 2 commits
  2. 18 Sep, 2017 1 commit
  3. 17 Sep, 2017 1 commit
  4. 08 Sep, 2017 1 commit
  5. 07 Sep, 2017 1 commit
    • Martin Flöser's avatar
      Delay syncing internal window geometry to end of cycle · e0f95fd9
      Martin Flöser authored
      The syncing of the window geometry to the internal geometry can
      unfortunately cause a freeze in very special conditions:
      1. create QML component
      2. a Plasma::Dialog gets created
      3. It creates the DialogShadows
      4. This triggers QGlobalStatic creation which locks a non-recursive
      5. The creation of DialogShadows creates a Registry and triggers a
      roundtrip on the Wayland server
      6. KWin processes all Wayland events
      7. This triggers the creation of a ShellClient
      8. The ShellClient has a PlasmaShellSurface which requested a position
      9. The new geometry does not match the geometry of the Plasma::Dialog
      10. ShellClient syncs the geometry to the Plasma::Dialog
      11. Plasma::Dialog updates the theme because window geometry changed
      12. This accesses the DialogShadows...
      which is still in the non recursive mutex and we have a freeze.
      By delaying the sync to the end of cycle we jump out of this deadly
      BUG: 384441
      Test Plan:
      The freeze doesn't hit any more. It's possible that some test
      cases need adjustments.
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D7712
  6. 01 Sep, 2017 3 commits
    • Martin Flöser's avatar
      Provide a virtual Scene::qpainterRenderBuffer() -> QImage* method · c398db3c
      Martin Flöser authored
      Needed by testing of QPainter scene to access the back buffer. Exposed
      as a virtual method in Scene, so that the test does not have to cast to
    • Martin Flöser's avatar
    • Martin Flöser's avatar
      Add <number> to Wayland captions if the caption is the same · 6685288d
      Martin Flöser authored
      Bringing another caption feature from X11 to Wayland. If we have
      multiple windows with the same caption, starting from the second window
      a suffix <number> is added.
      E.g. if we have three windows with caption "foo", the naming is:
       * foo
       * foo <2>
       * foo <3>
      The change tries to use as much shared code between the X11 and Wayland
      implementation. Unfortunately it's not possible to share completely as
      the X11 implementation does X11 specific things like editing the visible
      By sharing the code the numbering also works cross windowing system.
      That is if a window is called "foo" on X11, a new window on Wayland with
      caption "foo" will get adjusted to "foo <2>" and vice versa.
      The change also eliminates a duplicated signal for captionChanged in
      ShellClient (found by test case).
      By using the shared implementation on X11 side a bug gets fixed which
      got introduced with the support of "unresponsive", this is no longer
      considered and the numbering still works even if there is a window which
      is unresponsive.
      Test Plan: New test case and manual testing
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D7425
  7. 30 Aug, 2017 1 commit
    • David Edmundson's avatar
      ARGB buffers are premultiplied · b57a525e
      David Edmundson authored
      D7460 in kwayland assumes all WL_SHM_FORMAT_ARGB8888 buffers have
      opacity premultipied RGB values.
      Kwin tests need updating to do the same.
      Rendering code did not need changing.
      Test Plan: Tests now pass
      Reviewers: #plasma, graesslin
      Reviewed By: #plasma, graesslin
      Subscribers: plasma-devel, kwin, #kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D7607
  8. 24 Aug, 2017 1 commit
    • David Edmundson's avatar
      Send output enter/leave events to surfaces · f0971532
      David Edmundson authored
      A surface has an API to know which screen(s) it's on, this is useful
      especially for knowing the scale it should render at.
      In practice Qt currently doesn't do anything with this information; but
      that's set to change.
      Test_helpers is changed as we need to create output objects in order for
      wl_surface to map them.
      Closes task T4467
      Test Plan:
      Attached unit test.
      As mentioned above, it doesn't have any real world impact currently, so not a lot
      to test.
      Reviewers: #plasma, graesslin
      Reviewed By: #plasma, graesslin
      Subscribers: johanhelsing, graesslin, plasma-devel, kwin, #kwin
      Tags: #kwin
      Maniphest Tasks: T4467
      Differential Revision: https://phabricator.kde.org/D7359
  9. 21 Aug, 2017 1 commit
    • Martin Flöser's avatar
      Use xcb-icccm to read the name property · c87230c3
      Martin Flöser authored
      The KWindowSystem call which we used doesn't work on Wayland as it's only
      implemented in the xcb variant and cannot be made available for Wayland
      in an easy way as it is still XLib based.
      This change turns the optional XCB-ICCCM dependency in a required one
      and thus can use the functionality provided by said library to implement
      what KWindowSystem provided.
      BUG: 382789
      Test Plan: New test case which failed with old code
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D7046
  10. 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
  11. 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
  12. 13 Aug, 2017 3 commits
  13. 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
  14. 09 Aug, 2017 2 commits
  15. 08 Aug, 2017 2 commits
  16. 02 Aug, 2017 1 commit
  17. 31 Jul, 2017 2 commits
  18. 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
  19. 28 Jul, 2017 2 commits
  20. 27 Jul, 2017 3 commits
  21. 26 Jul, 2017 1 commit
  22. 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
  23. 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
  24. 21 Jul, 2017 1 commit
  25. 20 Jul, 2017 2 commits