1. 22 Nov, 2020 1 commit
  2. 07 Aug, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Prettify license headers · 4ce853e8
      Vlad Zahorodnii authored
    • 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.
  3. 28 Jan, 2020 1 commit
  4. 22 Jul, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Run clang-tidy with modernize-use-override check · 8af2fa73
      Vlad Zahorodnii authored
      Currently code base of kwin can be viewed as two pieces. One is very
      ancient, and the other one is more modern, which uses new C++ features.
      The main problem with the ancient code is that it was written before
      C++11 era. So, no override or final keywords, lambdas, etc.
      Quite recently, KDE compiler settings were changed to show a warning if
      a virtual method has missing override keyword. As you might have already
      guessed, this fired back at us because of that ancient code. We had
      about 500 new compiler warnings.
      A "solution" was proposed to that problem - disable -Wno-suggest-override
      and the other similar warning for clang. It's hard to call a solution
      because those warnings are disabled not only for the old code, but also
      for new. This is not what we want!
      The main argument for not actually fixing the problem was that git
      history will be screwed as well because of human factor. While good git
      history is a very important thing, we should not go crazy about it and
      block every change that somehow alters git history. git blame allows to
      specify starting revision for a reason.
      The other argument (human factor) can be easily solved by using tools
      such as clang-tidy. clang-tidy is a clang-based linter for C++. It can
      be used for various things, e.g. fixing coding style(e.g. add missing
      braces to if statements, readability-braces-around-statements check),
      or in our case add missing override keywords.
      Test Plan: Compiles.
      Reviewers: #kwin, davidedmundson
      Reviewed By: #kwin, davidedmundson
      Subscribers: davidedmundson, apol, romangg, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D22371
  5. 20 Feb, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Don't destroy DecorationRenderer in setup/finish compositing · 9a68cbd9
      Vlad Zahorodnii authored
      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
  6. 10 Jun, 2018 1 commit
  7. 22 Apr, 2018 1 commit
    • Алексей Шилин's avatar
      Improve tooltips behavior · 5a14b6a6
      Алексей Шилин authored
      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
  8. 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
      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
  9. 18 Jan, 2018 1 commit
  10. 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
  11. 10 Aug, 2016 1 commit
    • Martin Flöser's avatar
      Cache the clientSize in DecoratedClientImpl · eed4bf32
      Martin Flöser authored
      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
      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
  12. 02 Jun, 2016 1 commit
  13. 23 May, 2016 1 commit
  14. 11 May, 2016 1 commit
    • Martin Flöser's avatar
      Delay maximize button click to next event cycle · 6cd0d5a5
      Martin Flöser authored
      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
  15. 18 Jan, 2016 1 commit
  16. 18 Dec, 2015 2 commits
  17. 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
  18. 11 Nov, 2014 2 commits
  19. 23 Oct, 2014 1 commit
  20. 25 Jul, 2014 3 commits
    • Martin Flöser's avatar
      Implement borderingScreenEdges for the DecoratedClientImpl · a903fb2c
      Martin Flöser authored
      Uses the QuickTileMode of the Client to indicate which borders to
      remove. This could be extended to be in general when a window borders
      the screen edge and not just for quick tile mode.
    • Martin Flöser's avatar
      Destroy DecorationRenderer in setup/finish compositing · c8c0bace
      Martin Flöser authored
      So far the DecorationRenderer got destroyed and recreated after
      the signal compositing toggled was emitted. But that's too late for
      e.g. the OpenGL Textures to be destroyed. So lets trigger the destroy
      directly in setup/finish compositing. The new renderer will still be
      created after the compositing toggled is emitted - we don't want to
      have it recreated for the still active compositer type.
    • Martin Flöser's avatar
      Initial import of support for new KDecoration2 based decorations · 0030eb7f
      Martin Flöser authored
      NOTE: this is not working completely yet, lots of code is still ifdefed
      other parts are still broken.
      The main difference for the new decoration API is that it is neither
      QWidget nor QWindow based. It's just a QObject which processes input
      events and has a paint method to render the decoration. This means all
      the workarounds for the QWidget interception are removed. Also the paint
      redirector is removed. Instead each compositor has now its own renderer
      which can be optimized for the specific case. E.g. the OpenGL compositor
      renders to a scratch image which gets copied into the combined texture,
      the XRender compositor copies into the XPixmaps.
      Input events are also changed. The events are composed into QMouseEvents
      and passed through the decoration, which might accept them. If they are
      not accpted we assume that it's a press on the decoration area allowing
      us to resize/move the window. Input events are not completely working
      yet, e.g. wheel events are not yet processed and double click on deco
      is not yet working.
      Overall KDecoration2 is way more stateful and KWin core needs more
      adjustments for it. E.g. borders are allowed to be disabled at any time.