1. 17 Mar, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Fix compiler warnings · cca0e15b
      Aleix Pol Gonzalez authored
      Summary: No need to keep them around for no reason.
      Test Plan: Tested the plugins I thought could be affected. Have been using it for a couple of days without problems
      Reviewers: #kwin, zzag
      Reviewed By: #kwin, zzag
      Subscribers: zzag, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D28062
  2. 19 Sep, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Use nullptr everywhere · 62a7db70
      Vlad Zahorodnii authored
      Because KWin is a very old project, we use three kinds of null pointer
      literals: 0, NULL, and nullptr. Since C++11, it's recommended to use
      nullptr keyword.
      This change converts all usages of 0 and NULL literal to nullptr. Even
      though it breaks git history, we need to do it in order to have consistent
      code as well to ease code reviews (it's very tempting for some people to
      add unrelated changes to their patches, e.g. converting NULL to nullptr).
      Test Plan: Compiles.
      Reviewers: #kwin, davidedmundson, romangg
      Reviewed By: #kwin, davidedmundson, romangg
      Subscribers: romangg, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D23618
  3. 17 Sep, 2019 1 commit
  4. 14 Sep, 2019 1 commit
  5. 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
  6. 25 Jan, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [effects] Port to new connect syntax · 253ff428
      Vlad Zahorodnii authored
      The new connect syntax has several advantages over the old syntax:
      (a) Connecting with the new syntax is faster;
      (b) It is compile time checked.
      There are still a few places where the old connect syntax is used, e.g.
      connecting to QML buttons in the Desktop Grid effect.
      Test Plan:
      Have been testing this patch for ~2 weeks, haven't noticed any
      Reviewers: #kwin, davidedmundson
      Reviewed By: #kwin, davidedmundson
      Subscribers: davidedmundson, broulik, graesslin, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D18368
  7. 12 Sep, 2017 1 commit
    • Martin Flöser's avatar
      [effects] Support xcbConnectionChanged for support properties · 90e77a93
      Martin Flöser authored
      Several effects announce a support property atom on the root window. This
      change forwards the KWin::Application's signal that the xcbConnection
      changed to the EffectsHandler so that the effects can respond to it.
      All effects which announce a support property connect to this new signal
      and re-announce the property. In case the xcb connection died (future
      XWayland crashing case) it is set to XCB_ATOM_NONE by that. In case the
      xcb connection got created (future delayed XWayland startup) the atom is
      set to the proper value.
      In addition all usages of the support properties are guarded, so that no
      nonesense actions are performed if the support property is XCB_ATOM_NONE.
      Test Plan: Only compile tested as we don't have XFree KWin yet
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D7761
  8. 14 Sep, 2016 1 commit
    • Martin Flöser's avatar
      [effects] Repaint expandedGeometry in HighlightWindowsEffect · d910217b
      Martin Flöser authored
      The highlight windows effect tried to trigger repaints with the shadow
      included by having an hardcoded pixel offset. This of course breaks if
      the shadow is larger than the hardcoded value.
      The reason presented on why it was done like that is no longer true and
      in the effects the actual visible area including decorations and shadows
      is available through the expandedGeometry.
      BUG: 368495
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D2748
  9. 13 Sep, 2016 1 commit
    • 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
  10. 24 Jan, 2015 1 commit
  11. 28 Apr, 2014 3 commits
  12. 27 Apr, 2014 1 commit
  13. 04 Apr, 2014 1 commit
  14. 03 Apr, 2014 1 commit
  15. 28 Mar, 2014 1 commit
    • Martin Flöser's avatar
      [kwin] Add a virtual Effect::requestedEffectChainPosition · 3bbc9436
      Martin Flöser authored
      This method replaces the X-KDE-ORDERING property in the Effect's desktop
      files. This change is a preparation step for integrating the new Effect
      Loader which doesn't read the ordering information. Thus it needs to be
      provided by the Effect itself so that the EffectsHandler can properly
      insert it into the chain.
      Also for the built-in Effects on the long run it doesn't make much sense
      to install the desktop files. And binary plugin effects will migrate to
      json metadata which also doesn't have the KService::Ptr. Thus overall it
      simplifies to read this information directly from the Effect.
  16. 14 Mar, 2014 2 commits
  17. 13 Mar, 2014 1 commit
    • Martin Flöser's avatar
      [kwin] Introduce a X-KWin-Internal in kwineffect services · aeb90a24
      Martin Flöser authored
      X-KWin-Internal should be used for effects which are either internal
      to KWin and are configured at a different location in KWin. Examples
       * CoverSwitch - configured in WindowSwitcher KCM, but not FlipSwitch
         as that one has a non WindowSwitcher mode
       * window geometry - configured in moving
      And it should also be used for helper effects to the overall
      kde-workspace module. Examples are:
       * Dashboard - required by Plasma
       * KScreen - required for KScreen
       * Screenshot - required by KSnapshot
      Why a new category and not the already existing NoShow property?
      The idea is to just filter on the effects in the list. Thus it should
      be possible to show them. But NoShow is clearly intended to not be
      shown at all.
      REVIEW: 116754
  18. 27 Feb, 2014 1 commit
  19. 24 Jan, 2014 1 commit
    • Martin Flöser's avatar
      Turn built-in effects into a library kwin links against · 76efe517
      Martin Flöser authored
      As all effects have always been compiled into the same .so file it's
      questionable whether resolving the effects through a library is useful
      at all. By linking against the built-in effects we gain the following
      * don't have to load/unload the KLibrary
      * don't have to resolve the create, supported and enabled functions
      * no version check required
      * no dependency resolving (effects don't use it)
      * remove the KWIN_EFFECT macros from the effects
      All the effects are now registered in an effects_builtins file which
      maps the name to a factory method and supported or enabled by default
      During loading the effects we first check whether there is a built-in
      effect by the given name and make a shortcut to create it through that.
      If that's not possible the normal plugin loading is used.
      Completely unscientific testing [1] showed an improvement of almost 10
      msec during loading all the effects I use.
      [1] QElapsedTimer around the loading code, start kwin five times, take
      REVIEW: 115073
  20. 19 Jan, 2014 2 commits
  21. 29 Nov, 2013 1 commit
  22. 25 Sep, 2013 1 commit
    • Martin Flöser's avatar
      Fix reading of window properties from effects · be3a0cf4
      Martin Flöser authored
      That's what you get for changing code you cannot properly test. The
      calculation was completely messed up. Now reads the correct byte size
      for the byte array. In addition the usages in the effects are improved
      to cast the data into the proper uint32_t values instead of the more
      generic long. After all if the format is 32, the length is 32 and not
      a long.
  23. 08 Sep, 2013 1 commit
    • Thomas Lübking's avatar
      highlight effect: windowAdded false positive exits · 2a5861fa
      Thomas Lübking authored
      When a window is added while the effect is running
      it shall either be highlighted or hidden, but not exit
      the effect what happened, because the property notification
      is invoked to test whether the window has a highlight
      property (questionable since the effect is running, but
      valid - could be different X11 client) and that routine
      exits the effect if no property is found (assuming it was
      REVIEW: 112494
  24. 02 Sep, 2013 1 commit
  25. 09 Jun, 2013 1 commit
  26. 17 May, 2013 2 commits
  27. 26 Jan, 2013 2 commits
  28. 07 Jan, 2013 2 commits
    • Martin Flöser's avatar
      Common way to announce support for specific effects through X11 · 565b4ed6
      Martin Flöser authored
      Instead of each effect, which needs to announce support, having custom
      code to create a property and set it on the root window, there is now a
      common API in EffectsHandler to take care of this.
      The methods takes care of creating the atom if it has not already done
      and set the property on the root window. Furthermore it allows multiple
      effects to announce the same property without getting in conflict with
      each other.
      As a further convenience the property is automatically removed when the
      effect is unloaded, so less things an effect author has to care about.
      REVIEW: 107815
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) · c6d91ac7
      Script Kiddy authored
  29. 24 Dec, 2012 1 commit
  30. 23 Dec, 2012 1 commit
  31. 19 Jul, 2012 1 commit
    • Martin Flöser's avatar
      Getter/setters for opacity, saturation and brightness in WindowPaintData · c7262e8b
      Martin Flöser authored
      The public member variables for opacity, saturation and brightness
      are removed in favor for getter and setters. The variables are
      moved into a private class. Those are now qreal instead of double.
      To make usage inside the effects easier a multiply method is added
      which multiplies the current value with passed in factor and returns
      the new value in a functional programming style.
      This commit is the top-most of a patch series to refactor
      ScreenPaintData and WindowPaintData. Other related commits are:
      * 0811772
      * ebdc7ec
      * 2c8dd8d
      * 7699726
      * 68e0201
      * 611cb09
      REVIEW: 105141
      BUG: 303314
      FIXED-IN: 4.10
  32. 12 Jun, 2012 1 commit
  33. 28 May, 2012 1 commit