1. 01 Sep, 2020 1 commit
    • Vlad Zahorodnii's avatar
      effects: Disable blur and contrast effect when screen is locked · ed113171
      Vlad Zahorodnii authored
      The results of the blur and the background contrast effect will never
      be seen if the screen locker is active.
      In order to avoid wasting computational resources, we could temporarily
      disable the blur effect until the screen is unlocked.
      Furthermore, given that the blur effect shrinks the clip region, it is
      guaranteed that the compositor will have to render the desktop window
      behind the lockscreen window. With this change, all windows behind the
      screen locker will be properly clipped away.
  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. 14 Jul, 2020 1 commit
  4. 30 Apr, 2020 1 commit
  5. 26 Nov, 2019 1 commit
  6. 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
  7. 09 Jul, 2019 1 commit
  8. 15 Feb, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [effects] Make sure that all effects reset the streaming buffer · 0d741533
      Vlad Zahorodnii authored
      The streaming buffer is shared so we have to reset it before rendering
      something. Otherwise, it's basically undefined behavior.
      For example, if the streaming buffer had been used for rendering a
      geometry with some color, then the Background Contrast effect may crash
      in GLVertexBuffer::bindArrays, it all depends on whether there is any
      bounded GLShader. To fix that, the buffer has to be reset.
      BUG: 356141
      Reviewers: #kwin, davidedmundson
      Reviewed By: #kwin, davidedmundson
      Subscribers: davidedmundson, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D19034
  9. 27 Jan, 2019 1 commit
    • Martin Flöser's avatar
      Add windowsystem plugin for KWin's qpa · 02a05610
      Martin Flöser authored
      KWindowSystem provides a plugin interface to have platform specific
      implementations. So far KWin relied on the implementation in
      KWayland-integration repository.
      This is something I find unsuited, for the following reasons:
       * any test in KWin for functionality set through the plugin would fail
       * it's not clear what's going on where
       * in worst case some code could deadlock
       * KWin shouldn't use KWindowSystem and only a small subset is allowed
      to be used
      The last point needs some further explanation. KWin internally does not
      and cannot use KWindowSystem. KWindowSystem (especially KWindowInfo) is
      exposing information which KWin sets. It's more than weird if KWin asks
      KWindowSystem for the state of a window it set itself. On X11 it's just
      slow, on Wayland it can result in roundtrips to KWin itself which is
      But due to using Plasma components we have a few areas where we use
      KWindowSystem. E.g. a Plasma::Dialog sets a window type, the slide in
      direction, blur and background contrast. This we want to support and
      need to support. Other API elements we do not want, like for examples
      the available windows. KWin internal windows either have direct access
      to KWin or a scripting interface exposed providing (limited) access -
      there is just no need to have this in KWindowSystem.
      To make it more clear what KWin supports as API of KWindowSystem for
      internal windows this change implements a stripped down version of the
      kwayland-integration plugin. The main difference is that it does not use
      KWayland at all, but a QWindow internal side channel.
      To support this EffectWindow provides an accessor for internalWindow and
      the three already mentioned effects are adjusted to read from the
      internal QWindow and it's dynamic properties.
      This change is a first step for a further refactoring. I plan to split
      the internal window out of ShellClient into a dedicated class. I think
      there are nowadays too many special cases. If it moves out there is the
      question whether we really want to use Wayland for the internal windows
      or whether this is just historic ballast (after all we used to use
      qwayland for that in the beginning).
      As the change could introduce regressions I'm targetting 5.16.
      Test Plan:
      new test case for window type, manual testing using Alt+Tab
      for the effects integration. Sliding popups, blur and contrast worked fine.
      Reviewers: #kwin
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D18228
  10. 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
  11. 17 May, 2018 1 commit
  12. 02 Dec, 2017 1 commit
  13. 29 Sep, 2017 1 commit
    • David Edmundson's avatar
      Don't reload background contrast effect on screen resize · 55d21942
      David Edmundson authored
      Similar to the Blur patch. Arguably rven less reason as this doesn't
      have a texture the size of the workspace.
      We don't need to delete and recreate the entire effect every time the
      screen changes; This deletes the wayland global which causes quite a bit
      of extra work for the clients.
      Test Plan:
      Changed resolution under X, and scale under wayland
      Panel looked the same and nothing exploded
      Reviewers: #plasma, graesslin
      Reviewed By: #plasma, graesslin
      Subscribers: graesslin, plasma-devel, kwin, #kwin
      Tags: #plasma
      Differential Revision: https://phabricator.kde.org/D7937
  14. 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
  15. 28 Apr, 2017 1 commit
    • David Edmundson's avatar
      Support scaling in BackgroundContrast effect · f445a99a
      David Edmundson authored
      Background contrast reads pixels from the framebuffer
      we need to convert from compositor to framebuffer co-ordinates
      when an output is scaled
      Test Plan:
      Ran the manual test in kwindowsystem. Moved window over dolphin.
      Visually checked output
      Reviewers: #plasma
      Subscribers: plasma-devel, kwin, #kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D4949
  16. 15 Mar, 2017 1 commit
    • Marco Martin's avatar
      store contrast matrix per-window · 063587db
      Marco Martin authored
      as different windows can have different contrast region parameters,
      store color matrices per window
      Test Plan: logout window doesn't break panel anymore
      Reviewers: #plasma, graesslin
      Reviewed By: #plasma, graesslin
      Subscribers: broulik, plasma-devel, kwin, #kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D5048
  17. 18 Oct, 2016 1 commit
    • Martin Flöser's avatar
      Adjust blur and contrast for multi-output rendering on Wayland · bef9c9c8
      Martin Flöser authored
      The glCopyTex(Sub)Image calls are adjusted to take the per output
      rendering into account. In addition contrast effect sets the model view
      projection matrix in each call to ensure it's on the correct screen.
      Blur probably needs more changes for the cached texture to work, but
      it's a start.
      Test Plan: Blur and Background contrast work on multi-screen wayland
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3101
  18. 09 Aug, 2016 1 commit
  19. 25 Feb, 2016 1 commit
  20. 09 Feb, 2016 1 commit
  21. 01 Oct, 2015 1 commit
  22. 03 Sep, 2015 1 commit
  23. 21 May, 2015 1 commit
  24. 30 Dec, 2014 1 commit
  25. 27 Nov, 2014 1 commit
    • Martin Flöser's avatar
      Remove displayWidth and displayHeight from the compositor · bf4ba546
      Martin Flöser authored
      Instead of getting size from displayWidth() and displayHeight() use
      the information we have from Screens. This means there is only one
      place to have the information and by that we can ensure that all
      components use the same data to rely on. displayWidth/displayHeight
      seem to provide the wrong information when unplugging an output
      without disabling the output. This results in rendering artefacts.
      But KWin::Screens has the correct information available.
  26. 22 Nov, 2014 1 commit
  27. 11 Jun, 2014 1 commit
  28. 11 Apr, 2014 1 commit
  29. 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
  30. 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
  31. 07 Mar, 2014 1 commit
    • Martin Flöser's avatar
      Migrate effects from displayWidth()/displayHeight() to virtualScreenSize()/virtualScreenGeometry() · 3f0ff9b8
      Martin Flöser authored
      Rational behind this change is that displayWidth and displayHeight are
      X specific API calls in kwinglobals. For the future it's easier to only
      rely on functionality which goes through the EffectsHandler API which
      allows easier adjustments in KWin core.
      displayWidth() and displayHeight() are only used to get the size or the
      complete rect of all screens. This is also provided by:
      effects->virtualScreenGeometry() or
      REVIEW: 116021
  32. 03 Feb, 2014 1 commit
  33. 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
  34. 23 Jan, 2014 6 commits