1. 22 Nov, 2020 1 commit
  2. 10 Nov, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Drop Toplevel::windowId() · e398a7cd
      Vlad Zahorodnii authored
      A window id generated by WaylandServer may reference an X11 window
      with the same id, which can result in undefined behavior.
      
      The main reason why we needed windowId() was because of the task
      switcher. However, since tabbox uses internal ids now, the window id
      property can be dropped.
      e398a7cd
  3. 23 Oct, 2020 1 commit
  4. 07 Aug, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Prettify license headers · 4ce853e8
      Vlad Zahorodnii authored
      4ce853e8
    • Vlad Zahorodnii's avatar
      Switch to SPDX license markers · 1fb9f6f1
      Vlad Zahorodnii authored
      The main advantage of SPDX license identifiers over the traditional
      license headers is that it's more difficult to overlook inappropriate
      licenses for kwin, for example GPL 3. We also don't have to copy a
      lot of boilerplate text.
      
      In order to create this change, I ran licensedigger -r -c from the
      toplevel source directory.
      1fb9f6f1
  5. 18 Jun, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Update cached client size when the client geometry has changed · 23113d38
      Vlad Zahorodnii authored and Vlad Zahorodnii's avatar Vlad Zahorodnii committed
      The usage of geometryShapeChanged() is highly discouraged because it is
      emitted when geometry of any kind has been changed, e.g. buffer geometry,
      frame geometry, etc.
      
      This change ports DecoratedClientImpl to the clientGeometryChanged()
      signal, so the cached client size will be updated only after the client
      geometry has actually changed.
      23113d38
  6. 21 May, 2020 1 commit
    • Vlad Zahorodnii's avatar
      [decoration] Fix propagation of client size · 621b2e1c
      Vlad Zahorodnii authored and David Edmundson's avatar David Edmundson committed
      Even though the frame geometry and the client geometry have a connection
      between themselves, it doesn't mean that the frame geometry will change
      if the client geometry has changed and vice versa. For example, it can be
      the case when the border size changes. The frame geometry won't change,
      but the client geometry will.
      
      In general, similar to the frameGeometryChanged signal, we need another
      signal that is emitted when the client geometry has been changed that
      can be used then in DecoratedClientImpl.
      
      Unfortunately, 5.19 release is around the corner and I would prefer not
      to do any geometry-related changes in order to avoid introducing new
      regressions.
      
      In order to fix the propagation of the client size to decorations, this
      change ports DecoratedClientImpl from frameGeometryChanged to a signal
      that is emitted whenever geometry of any kind has been changed.
      
      BUG: 419080
      FIXED-IN: 5.19.0
      621b2e1c
  7. 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
  8. 22 Feb, 2020 4 commits
    • Nicolas Fella's avatar
      Revert "[kcm/effects] Clip ListView" · 7159684c
      Nicolas Fella authored
      Bad merge
      
      This reverts commit b7130442.
      7159684c
    • Nicolas Fella's avatar
      [kcm/effects] Clip ListView · b7130442
      Nicolas Fella authored
      Summary:
      Otherwise the content overflows the frame when scrolling.
      
      QQC2 scrollview docs say "ScrollView does not automatically clip its contents. If it is not used as a full-screen item, you should consider setting the clip property to true"
      
      Test Plan:
      Before:
      {F8121150}
      
      After:
      {F8121152}
      
      Reviewers: #kwin, #plasma, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27558
      b7130442
    • Nicolas Fella's avatar
      Revert "[kcm/effects] Clip ListView" · cdc5ea19
      Nicolas Fella authored
      Bad merge
      
      This reverts commit 5babf52d.
      cdc5ea19
    • Nicolas Fella's avatar
      [kcm/effects] Clip ListView · 5babf52d
      Nicolas Fella authored
      Summary:
      Otherwise the content overflows the frame when scrolling.
      
      QQC2 scrollview docs say "ScrollView does not automatically clip its contents. If it is not used as a full-screen item, you should consider setting the clip property to true"
      
      Test Plan:
      Before:
      {F8121150}
      
      After:
      {F8121152}
      
      Reviewers: #kwin, #plasma, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27558
      5babf52d
  9. 12 Feb, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Introduce Toplevel::frameGeometryChanged signal · 15af09c7
      Vlad Zahorodnii authored
      Summary:
      Currently we have two signals that are emitted when the Toplevel's geometry
      changes - geometryShapeChanged() and geometryChanged(). The former signal
      is used primarily to invalidate cached window quads and the latter is
      sort of emitted when the frame geometry changes. But it's not that easy. We
      have a bunch of connects that link those signals together...
      
      The worst part about all of this is that the window quads cache gets
      invalidated every time a geometry update occurs, for example when user
      moves a window around on the screen.
      
      This change introduces a new signal and deprecates the existing geometryChanged
      signal. frameGeometryChanged is similar to geometryChanged except that it is
      emitted when an _actual_ geometry change has occurred.
      
      We do still emit geometryShapeChanged signal. However, in long term, we
      need to get rid of this signal or come up with something that makes sense
      and doesn't require us to waste computational resources.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, romangg, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26863
      15af09c7
  10. 28 Jan, 2020 1 commit
  11. 04 Mar, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Resurrect show tooltips option · 82b3e2a6
      Vlad Zahorodnii authored
      Summary:
      In KDE 4, there was a very handy option to disable decoration tooltips.
      Decoration tooltips were lost in transition to KDE Plasma 5, and so
      the option.
      
      Given that decoration tooltips were brought back to KDE Plasma 5, "Show
      decoration button tooltips" option can be still useful for people(like me)
      who may wish to disable them because of personal preference.
      
      Reviewers: #kwin, broulik, mart
      
      Reviewed By: #kwin, mart
      
      Subscribers: ngraham, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D19152
      82b3e2a6
  12. 20 Feb, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Don't destroy DecorationRenderer in setup/finish compositing · 9a68cbd9
      Vlad Zahorodnii authored
      Summary:
      Currently, KWin/Wayland crashes when the compositor is reinitialized.
      The reason for that is ShellClient's DecorationRenderer gets destroyed
      when the scene is already gone, thus there is no current OpenGL context.
      Client works around that issue by destroying scene-specific DecorationRender
      in finishCompositing. Such a workaround could be applied to ShellClient
      as well, but it would make code more confusing because DecoratedClientImpl
      also tries to destroy DecorationRenderer.
      
      A better approach would be to notify DecoratedClientImpl that
      compositing is about to be finished, so it can destroy the decoration
      renderer when the scene is still alive. This not only fixes the
      previously mentioned issue in ShellClient, but also makes code a little
      bit tidier.
      
      Test Plan:
      Start Plasma on Wayland session, change any compositor settings (e.g.
      animation speed).
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D18921
      9a68cbd9
  13. 07 Oct, 2018 1 commit
    • David Edmundson's avatar
      [wayland] Use pending maximize mode in decoration updates · 29a49f86
      David Edmundson authored
      Summary:
      The change to make maximize mode asynchronous featured the comment
      
      >Things are a bit complex with borders. Technically we
      >shouldn't update them till we get a response, but we also need to have
      >the correct geometry of the full size window in our request. For now
      >they behave as before, updating when we request the change.
      
      We call setNoBorder when we request the geometry but decoratedClient
      also checks the maximise mode, in order to follow the scheme above we
      need this to operate on the requested state not current state.
      
      X is unaffected.
      
      This fixes the borders being restored correct after maximize/restore.
      
      Test Plan:
      Chose a theme with visible borders
      Maximised a window and back
      They restored
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D15991
      29a49f86
  14. 10 Jun, 2018 1 commit
  15. 22 Apr, 2018 1 commit
    • Алексей Шилин's avatar
      Improve tooltips behavior · 5a14b6a6
      Алексей Шилин authored
      Summary:
      Window buttons tooltips used to appear on hover immediately. As
      the result, they mostly appeared when not needed e.g. when user
      was closing a window, or when the mouse pointer slightly touched
      a button while being moved elsewhere.
      
      This commit changes the tooltips behavior to WakeUp-FallAsleep
      approach used by Widgets.
      
      BUG: 392765
      FIXED-IN: 5.13
      
      Reviewers: #kwin, graesslin, broulik, #plasma
      
      Reviewed By: #kwin, graesslin, #plasma
      
      Subscribers: zzag, broulik, kwin, hein
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D12404
      5a14b6a6
  16. 07 Feb, 2018 1 commit
    • Martin Flöser's avatar
      Make it possible to compile 5.12 branch with a kdecoration from master · 8245a74b
      Martin Flöser authored
      Summary:
      KDecoration has two new pure virtual methods. Due to that one cannot
      build KWin in the stable branch. This makes bug fixing rather cumbersome
      as one also needs to switch the kdecoration branch.
      
      This rather unusual change for a stable branch improves the
      compatibility by adding the new virtual methods without doing anything
      and without marking them as override, so that the code can compile with
      a kdecoration from 5.12 and a kdecoration from master.
      
      Test Plan: 5.12 branch compiles with kdecoration master branch
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D10296
      8245a74b
  17. 18 Jan, 2018 1 commit
  18. 01 Sep, 2017 1 commit
  19. 29 Jul, 2017 1 commit
    • Martin Flöser's avatar
      Replace Workspace::slotWindowQuickTileFoo by a quickTileWindow with argument · 64da6c8d
      Martin Flöser authored
      Summary:
      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
      changes.
      
      Test Plan: Affected test cases still pass
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D6783
      64da6c8d
  20. 11 Jan, 2017 1 commit
    • Kai Uwe Broulik's avatar
      Restore global menu support · 93938d60
      Kai Uwe Broulik authored
      This brings back global menu support in KWin.
      The DBusMenu infrastructure is different that we just read the DBus service name and
      menu object path from the windows rather than passing around window IDs on DBus which
      won't work on Wayland.
      
      Differential Revision: https://phabricator.kde.org/D3089
      93938d60
  21. 10 Aug, 2016 1 commit
    • Martin Flöser's avatar
      Cache the clientSize in DecoratedClientImpl · eed4bf32
      Martin Flöser authored
      Summary:
      So far whenever the window geometry changed the widthChanged and
      heightChanged signals were emitted even if they did not change.
      E.g. while moving a window this resulted in the signal being emitted
      after every step, although from decoration point of view nothing
      changed.
      
      The decoration performed costly tasks like re-layout the window buttons.
      
      With this change the client size is cached and the widthChanged signal
      is only emitted if the width actually changed. Same for heightChanged.
      
      This results in the decoration only re-layouting the buttons if the
      window is resized horizontally. All other geometry changes no longer
      result in a re-layout.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2389
      eed4bf32
  22. 09 Jun, 2016 2 commits
  23. 02 Jun, 2016 1 commit
  24. 23 May, 2016 1 commit
  25. 17 May, 2016 1 commit
    • Martin Flöser's avatar
      Make Toplevel::window() no longer virtual and introduce ::windowId() · 24bdfc63
      Martin Flöser authored
      Summary:
      Toplevel::window() is the actual X11 window. This makes it difficult
      to use as the generic identifier for both X11 and Wayland. The Wayland
      ShellClient already had a windowId() which is now added to Toplevel as
      a virtual method. On X11 (Toplevel default) it returns the window().
      
      The method window() now returns XCB_WINDOW_NONE for classes without
      the Toplevel::m_client, such as ShellClient. Thus it allows to properly
      check whether we are on Wayland or X11.
      
      The code is adjusted to use windowId where a generic id is needed and
      to properly check whether the window is valid before using it where
      a window() is used.
      
      This also fixes at least one additional unknown issue in
      Workspace::setActiveClient
      
      where the windowId of a Wayland client was passed to X11.
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Projects: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1527
      24bdfc63
  26. 11 May, 2016 1 commit
    • Martin Flöser's avatar
      Delay maximize button click to next event cycle · 6cd0d5a5
      Martin Flöser authored
      Summary:
      The delay to next cycle dance is needed for Aurorae. Maximizing a
      window can result in the decoration being destroyed, in which case
      QtQuick can trigger a crash.
      
      A test case is added to simulate the situation and ensure that maximize
      still works also after the change.
      
      BUG: 362772
      FIXED-IN: 5.6.5
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Projects: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1586
      6cd0d5a5
  27. 18 Jan, 2016 1 commit
  28. 18 Dec, 2015 1 commit
  29. 20 Oct, 2015 1 commit
  30. 08 May, 2015 1 commit
  31. 31 Mar, 2015 1 commit
    • Mika Allan Rauhala's avatar
      Adapt to KDecoration API changes · 3389c756
      Mika Allan Rauhala authored and Martin Flöser's avatar Martin Flöser committed
      Adapt to API changes introduced by b62e8888cd39301e00ad98dfe791fa66676408fb.
      It adds DecoratedClient::color(group, role) for getting colors that are
      not included in QPalette. Breeze used to read these colors from
      kdeglobals, breaking per window color schemes. KWin now handles reading
      these colors along with QPalette loading with DecorationPalette.
      
      REVIEW: 122883
      3389c756
  32. 08 Jan, 2015 1 commit
  33. 02 Dec, 2014 3 commits