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. 26 Nov, 2019 1 commit
  3. 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
  4. 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
  5. 11 Sep, 2019 1 commit
  6. 09 Jul, 2019 1 commit
  7. 27 May, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [effects/screenshot] Upload data to xpixmap in chunks · 67444e36
      Vlad Zahorodnii authored
      xcb_put_image doesn't handle big images well. Contrary to XPutImage, the
      caller must manually split the data in such a way that each xcb_put_image
      request doesn't exceed the maximum request length. Not doing so will result
      in libxcb shutting down the connection.
      CCBUG: 338489
      CCBUG: 388182
      Test Plan: Take a screenshot of an active fullscreen client on a 4K monitor.
      Reviewers: #kwin, davidedmundson
      Reviewed By: #kwin, davidedmundson
      Subscribers: davidedmundson, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D21370
  8. 05 Mar, 2019 1 commit
  9. 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
  10. 11 Nov, 2018 1 commit
    • Bhushan Shah's avatar
      effects: attempt to screenshot on OpenGL ES 2.0 instead of failing · e455e349
      Bhushan Shah authored
      Current code path was attempting to use both framebuffer blit and
      glReadPixels on OpenGL ES, instead change the code to use framebuffer
      blit and glGetTexImage on OpenGL and glReadPixels on the OpenGLES as it
      doesn't have glGetTexImage available.
      Test Plan: tested on Nexus 5X.
      Reviewers: #kwin, davidedmundson, graesslin
      Reviewed By: #kwin, graesslin
      Subscribers: kwin
      Tags: #kwin
      Maniphest Tasks: T10011
      Differential Revision: https://phabricator.kde.org/D16802
  11. 05 Jun, 2018 1 commit
  12. 25 Jan, 2017 1 commit
    • Martin Flöser's avatar
      Add support for skip close animation to OnScreenMessage · d38bce77
      Martin Flöser authored
      This change adds support for marking the OnScreenMessage as it should
      skip close animation. The screenshot effect is adjusted to use the
      on screen message instead of the custom effect frame.
      Test Plan: Message window is not captured when taking screenshot
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D4091
  13. 25 Nov, 2016 3 commits
    • David Edmundson's avatar
      Don't register a new service for screenshots · aae24bb0
      David Edmundson authored
      If you're going to have kwin in the service name anyway there's
      absolutely no benefit to having clients not use the existing
      Test Plan: Object is still registered.
      Reviewers: #plasma, graesslin
      Reviewed By: #plasma, graesslin
      Subscribers: graesslin, plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D3357
    • Martin Flöser's avatar
      [effects] Cleanup screenshot effect · b42eb9a3
      Martin Flöser authored
      This change cleans up the screenshot effect a little bit.
      * better check whether a screenshot is already being taken
      * proper DBus error messages
      * less duplication of error message strings
      * don't keep the QDBusConnection around
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D3493
    • Martin Flöser's avatar
      Add interactive position selection to screenshot screen under cursor · f9f7b84c
      Martin Flöser authored
      A second interactive selection mode gets added to select a position on
      the screen. This is handled by the same input event filter as for the
      window selection. Just that instead of returning a window, it returns a
      This allows to pick a point on the screen which we need to screenshot
      the screen under the mouse cursor and in future for color picking.
      The screenshot effect provides two new dbus methods to (interactively)
      select a screen or fullscreen. This allows spectacle to screenshot the
      (full) screen with still having the user in control.
      Reviewers: #kwin, #plasma_on_wayland, bgupta
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3475
  14. 22 Nov, 2016 2 commits
    • Martin Flöser's avatar
      [effects] Add a screenshot dbus method which takes a file descriptor · fbab2049
      Martin Flöser authored
      The idea behind this mode is to support applications like spectacle
      (see T4458). The calling application passes a file descriptor (created
      through e.g. a pipe) and the screenshot effect writes the captured image
      into that fd.
      The advantage over the existing variant which writes to a file in the
      /tmp directory is that this is peer-to-peer between the requesting
      application and KWin. No other application can get to that image.
      The change also includes setting SIGPIPE to ignore. It showed that when
      the reading side already cancelled the read prior to KWin writing out
      the image we get a SIGPIPE which results in application termination,
      which is not what we want in case of a Wayland compositor. The sigpipe
      can be ignored as Qt (and libpng) handles that error just fine at
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3412
    • Martin Flöser's avatar
      [effects] Show info message in interactive window screenshot mode · cfdc1acb
      Martin Flöser authored
      While taking an interactive screenshot we should inform the user about
      what's going on, how to take the screenshot and how to cancel it.
      For this the effect creates an EffectFrame with the required
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D3403
  15. 17 Nov, 2016 1 commit
    • Martin Flöser's avatar
      [effects] Add interactive window selection mode to ScreenshotEffect · 27376e39
      Martin Flöser authored
      EffectsHandler gains a new method to startInteractiveWindowSelection
      which just delegates to the one in Platform. That way a window can be
      selected and returned to an Effect.
      The screenshot effect makes use of this new functionality and provides
      an interactive window screenshot mode which saves to a temporary file.
      Note that this is not yet the variant intended for use in spectacle.
      Test Plan: Took a screenshot on Wayland
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3367
  16. 16 Nov, 2016 1 commit
    • Martin Flöser's avatar
      [effects] Show a notification when a screenshot got saved to file · adfaac4d
      Martin Flöser authored
      Inform the user about the path to where a screenshot got saved through a
      notification. This is helpful on the one hand that the user sees that
      the screenshot got saved and from a security perspective that the user
      is informed when a screenshot is taken through the dbus interface. It
      doesn't prevent non-authorized screenshot taking, but at least the user
      is informed about it.
      Reviewers: #kwin, #plasma, #vdg
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D3376
  17. 07 Nov, 2016 1 commit
    • Martin Flöser's avatar
      [effects] Support capture cursor image in Screenshot effect · 8c163f2b
      Martin Flöser authored
      The screenshot methods to blit the screen so far did not capture the
      cursor image. But sometimes it is useful to also capture the cursor
      This change extends the exported methods to take an optional bool
      argument whether to capture the screen. The default is not changed and
      still not captures the cursor.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3118
  18. 20 Oct, 2016 1 commit
    • Martin Flöser's avatar
      Add a PlatformCursorImage to Platform and EffectsHandler · ea52ef9e
      Martin Flöser authored
      There are several effects (screenshot, zoom) which need access to the
      cursor image and cursor hotspot. So far these effects used X11
      unconditionally to get the cursor which obviously does not work on
      This change adds a new class PlatformCursorImage to kwinglobals which
      wraps what a cursor is (image and hotspot) and adds a new virtual method
      to Platform to provide such a PlatformCursorImage. By default it's the
      cursor image the Platform tracks. On X11/standalone platform this new
      virtual method is overriden and provides a PlatformCursorImage from X11
      using the code previously used in screenshot effect.
      Screenshot effect and zoom are adjusted to use the new API instead of
      Test Plan:
      Zoom effect tested on Wayland, now gets the proper cursor icon.
      X11 functionality not yet tested.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3093
  19. 17 Oct, 2016 1 commit
  20. 14 Oct, 2016 1 commit
    • Martin Flöser's avatar
      [effects] Delay taking screenshot into next rendering cycle · e9b25f17
      Martin Flöser authored
      For windows the screenshot effect already delayed the rendering into the
      next cycle. But for the fullscreen variants which save to a file the
      Screenshot effect did try to take the shot directly.
      This can be problematic as e.g. the OpenGL context might not be bound at
      all. Also this makes it impossible to screenshot multiple screens
      together in the Wayland case.
      This change delays the DBus replies, schedules the geometry and takes
      the screenshot in the next rendering pass. It does not fix the
      multiscreen wayland problem yet.
      Reviewers: #kwin
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D3052
  21. 17 Nov, 2015 1 commit
  22. 11 Nov, 2015 1 commit
    • Martin Flöser's avatar
      Handle conflicts between epoxy and manually resolved function pointers · ac1dbac8
      Martin Flöser authored
      For the functions from GL_FOO_robustness we want to resolve it by
      ourselves in order to add a custom implementation if it's not available.
      Unfortunately once epoxy.h is included this breaks as epoxy defines the
      names and so through the preprocessor epoxy always wins.
      So we need different names: all functions from robustness get a "kwin"
      prefix and the usage is changed everywhere in kwin source code.
      REVIEW: 125883
  23. 03 Nov, 2015 1 commit
  24. 24 Jun, 2015 1 commit
  25. 30 Dec, 2014 1 commit
  26. 04 Dec, 2014 1 commit
  27. 22 Nov, 2014 1 commit
  28. 16 Apr, 2014 1 commit
    • Martin Flöser's avatar
      [effects] Get xcb_connection_t* and rootWindow through EffectsHandler API · 4230a0d3
      Martin Flöser authored
      So far the effects could just use the connection() and rootWindow()
      provided by kwinglobals. Thus an internal detail from KWin core is
      accessed directly.
      To be more consistent with the rest of the API it's wrapped through the
      EffectsHandler and with a convenient method in Effect.
      The connection() is provided as xcbConnection() to free the very generic
      name connection which could create confusion once we provide a wayland
      connection to the Effects.
      The rootWindow() is provided as x11RootWindow() to indicate that it is
      for the X11 world.
      REVIEW: 117597
  29. 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
  30. 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
  31. 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
  32. 29 Nov, 2013 1 commit
  33. 24 Sep, 2013 1 commit
  34. 02 Sep, 2013 2 commits
  35. 24 Jul, 2013 1 commit
  36. 20 May, 2013 1 commit