1. 03 Nov, 2020 1 commit
    • David Redondo's avatar
      Disable bouncy cursor effect during ksplash · 1caf9f61
      David Redondo authored
      Since commit commits.kde.org/plasma-workspace/378309e666f52fc436c75648a9e6ad7d5dcbacdf
      ksmserver sets a desktopname when restoring applications. This causes the effect
      to draw above the splash windows while no cursor is visible.
  2. 23 Oct, 2020 1 commit
  3. 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.
  4. 17 Apr, 2020 1 commit
  5. 28 Feb, 2020 1 commit
  6. 10 Dec, 2019 1 commit
    • David Edmundson's avatar
      [effects/startupfeedback] Port to KConfigWatcher · 5114494b
      David Edmundson authored
      startupfeedback is a special case, rather than loading our own config we
      load settings from klaunchrc.
      In order to reload this means leaking kwin specific calls into the
      launch feedback KCM. Using the new KConfigWatcher syntax, we can use a
      generic solution for all this code.
      Test Plan:
      Changed the value in KCM
      Opened dolphin
      cursor did the right thing
      Reviewers: zzag
      Reviewed By: zzag
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D25834
  7. 01 Nov, 2019 1 commit
  8. 30 Oct, 2019 1 commit
    • Albert Astals Cid's avatar
      Add some const & · e144748c
      Albert Astals Cid authored
      Won't make things go much faster since everything that was
      being passed by value is refcounted but still const & is a bit faster
      than refcounting
      For shared pointers instead of adding const & we move them into the
      destination variable saving some cpu usage but at the same time making
      clear the pointer is being stored by not being const &
      Reviewers: zzag
      Reviewed By: zzag
      Subscribers: zzag, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D25022
  9. 17 Oct, 2019 1 commit
  10. 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
  11. 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
  12. 05 Jun, 2018 1 commit
  13. 24 Apr, 2017 1 commit
    • Martin Flöser's avatar
      Add a KSharedConfigPtr for kcminputrc to KWin::Application · 857d8a9c
      Martin Flöser authored
      There are a few places where KWin needs to read values from kcminputrc.
      As I need to add yet another one it makes more sense to properly
      structure it like in other cases and have only one kcminputrc hold in
      the application. This also allows to better mock the config values in
      the integration tests.
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D5540
  14. 07 Nov, 2016 1 commit
  15. 01 Feb, 2016 1 commit
    • Martin Flöser's avatar
      [effects] Combine all shaders in resources · 613d76f2
      Martin Flöser authored
      One resource is used for shader version 1.10 and one for version 1.40.
      The ideas behind this change is to remove the locating of the shader
      sources and also to fix that user provided shaders could be loaded
      instead of the original ones (possible attack vector on Wayland).
      To simplify the ShaderManager provides a new method call to load the
      shader from the resource. This means the effects don't need to
      duplicate the check for the shader version any more and also don't
      need to duplicate the file reading functionality.
      REVIEW: 126905
  16. 25 Jan, 2016 1 commit
    • Martin Flöser's avatar
      [effects] Port startupfeedback to shader trait api · 712e46e4
      Martin Flöser authored
      The blinking shader is adjusted to use a shader trait vertex shader
      and gets generated with a shader trait variant.
      Overall the code is simplified to ensure that we always have a shader
      bound with the correct mvp matrix when rendering the icon.
  17. 03 May, 2015 1 commit
  18. 17 Mar, 2015 1 commit
  19. 13 Jan, 2015 1 commit
  20. 29 Mar, 2014 1 commit
  21. 26 Mar, 2014 1 commit
    • Martin Flöser's avatar
      [kwin] Port remaining XLib usage in effects to XCB · 1ab37878
      Martin Flöser authored
      Affected effects
      * Blur and Contrast Shader to get atom name
      * Glide effect for the slide atom
      * startupfeedback for cursor size - read from config now and cached
      * showfps used an xsync, replaced by flush
      * logout effect for creating hack items
      REVIEW: 116828
  22. 17 Mar, 2014 1 commit
  23. 10 Mar, 2014 1 commit
    • Martin Flöser's avatar
      [kwin] Remove the legacy OpenGL 1 compositing backend · c7d986c7
      Martin Flöser authored
      KWin already has a de facto OpenGL 2 dependency through QML. Combined
      with the fact that the OpenGL 1 backend is basically unmaintained and
      also unused, it's better to remove it for the new major release.
      This change includes:
       * Removal of cmake option KWIN_BUILD_OPENGL_1_COMPOSITING
       * Removal of KWIN_HAVE_OPENGL_1 compile option and all code
         ifdef'ed with it (partially removal of if-else constructs)
       * Removal of CompositingType::OpenGL1Compositing (flags are kept
         as a core flag should get introduced)
       * Driver recommendation for OpenGL1Compositing changed to XRender
         (should be evaluated whether the drivers can provide GL2)
       * Removal of configuration option "GLLegacy"
       * Removal of fooMatrix function in kwinglutils
       * Removal of ARBBlurShader
       * Removal of legacy code path in GLVertexBuffer
       * Removal of GLShaderManager::disable
       * if-blocks with ShaderManager::instance()->isValid() removed
      REVIEW: 116042
  24. 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
  25. 20 Jan, 2014 1 commit
    • Martin Flöser's avatar
      Reduce timeout of startupfeedback to a sensible default · 7a380fa3
      Martin Flöser authored
      It's 2014 and we don't have to wait half a minute for an application
      to start. In fact we mostly get false positives due to applications
      not handling correctly startup notifications for already running
      instances (e.g. click on link in email).
      So let's reduce to a default which doesn't look like a broken setup.
      REVIEW: 115046
  26. 29 Nov, 2013 1 commit
  27. 23 Nov, 2013 1 commit
    • Martin Flöser's avatar
      Better handling for making the compositing OpenGL context current · b7be3cb6
      Martin Flöser authored
      With QtQuick2 it's possible that the scene graph rendering context either
      lives in an own thread or uses the main GUI thread. In the latter case
      it's the same thread as our compositing OpenGL context lives in. This
      means our basic assumption that between two rendering passes the context
      stays current does not hold.
      The code already ensured that before we start a rendering pass the
      context is made current, but there are many more possible cases. If we
      use OpenGL in areas not triggered by the rendering loop but in response
      to other events the context needs to be made current. This includes the
      loading and unloading of effects (some effects use OpenGL in the static
      effect check, in the ctor and dtor), background loading of texture data,
      lazy loading after first usage invoked by shortcut, etc. etc.
      To properly handle these cases new methods are added to EffectsHandler
      to make the compositing OpenGL context current. These calls delegate down
      into the scene. On non-OpenGL scenes they are noop, but on OpenGL they go
      into the backend and make the context current. In addition they ensure
      that Qt doesn't think that it's QOpenGLContext is current by calling
      doneCurrent() on the QOpenGLContext::currentContext(). This unfortunately
      causes an additional call to makeCurrent with a null context, but there
      is no other way to tell Qt - it doesn't notice when a different context
      is made current with low level API calls. In the multi-threaded
      architecture this doesn't matter as ::currentContext() returns null.
      A short evaluation showed that a transition to QOpenGLContext doesn't
      seem feasible. Qt only supports either GLX or EGL while KWin supports
      both and when entering the transition phase for Wayland, it would become
      extremely tricky if our native platform is X11, but we want a Wayland
      EGL context. A future solution might be to have a "KWin-QPA plugin" which
      uses either xcb or Wayland and hides everything from Qt.
      The API documentation is extended to describe when the effects-framework
      ensures that an OpenGL context is current. The effects are changed to
      make the context current in cases where it's not guaranteed. This has
      been done by looking for creation or deletion of GLTextures and Shaders.
      If there are other OpenGL usages outside the rendering loop, ctor/dtor
      this needs to be changed, too.
  28. 04 Sep, 2013 1 commit
  29. 02 Sep, 2013 2 commits
  30. 13 Aug, 2013 1 commit
  31. 02 Aug, 2013 1 commit
  32. 24 Jul, 2013 2 commits
  33. 12 Mar, 2013 1 commit
  34. 06 Mar, 2013 1 commit
  35. 26 Nov, 2012 1 commit
  36. 25 Oct, 2012 1 commit
    • Martin Flöser's avatar
      Introduce a build option KWIN_BUILD_OPENGL_1_COMPOSITING · cf5de225
      Martin Flöser authored
      If the build option is enabled KWIN_HAVE_OPENGL_1 is passed as a compile
      flag when build against OpenGL.
      This compile flag is meant to replace the KWIN_HAVE_OPENGLES. So far code
      has been ifdefed for special behavior of OpenGL ES 2.0 and to remove
      fixed functionality calls which are not available in OpenGL ES 2.0.
      With this build flag the fixed functionality calls which are only used in
      the OpenGL1 Compositor can be removed and keeping the KWIN_HAVE_OPENGLES
      for the real differences between OpenGL 2.x and OpenGL ES 2.0.
      E.g. a call like glColor4f should be in an
      glColor4f(1.0, 1.0, 1.0, 1.0);
      while a call like glPolygonMode should be in an
      glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
      Building for OpenGL ES 2.0 of course implies that KWIN_HAVE_OPENGL_1 is
      not defined.
  37. 29 Sep, 2012 1 commit
    • Martin Flöser's avatar
      Do not use ShaderManager::isValid to check for OpenGL2 compositing · f9a2ecbf
      Martin Flöser authored
      The main usage of ShaderManager::isValid was to have OpenGL2 specific
      code pathes. Now we have an actual OpenGL2Compositing type and we know
      that the ShaderManager is valid if we have this compositing type and we
      know that it is not valid on OpenGL1Compositing. This gives us a much
      better check and allows us to use the isValid method just for where we
      want to check whether the shaders compiled successfully.
      In addition some effects require OpenGL2, so we do not need to check
      again that the ShaderManager is valid. Such usages are removed.