1. 18 Nov, 2020 1 commit
    • xinbo wang's avatar
      fix: magiclamp effect wrong direction. · 44b2a3f8
      xinbo wang authored
      if the dock is on the top,and the dock is not close together with screen edge.
      for example,the dock is 10 pixels taller then sceen edge,the "position" will be "Bottom".
      Autually,the dock is on the top of screen.
      44b2a3f8
  2. 07 Aug, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Prettify license headers · 4ce853e8
      Vlad Zahorodnii authored
      4ce853e8
    • 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.
      1fb9f6f1
  3. 19 Sep, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Use nullptr everywhere · 62a7db70
      Vlad Zahorodnii authored
      Summary:
      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
      62a7db70
  4. 25 Jan, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [effects] Port to new connect syntax · 253ff428
      Vlad Zahorodnii authored
      Summary:
      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
      regressions.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, broulik, graesslin, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D18368
      253ff428
  5. 14 Jul, 2018 1 commit
  6. 30 Jun, 2018 1 commit
  7. 20 Apr, 2018 1 commit
    • Vlad Zahorodnii's avatar
      [effects/magiclamp] Don't reset timeline · 913f92ae
      Vlad Zahorodnii authored
      Summary:
      Resetting timeline while animating a window causes some visual "glitches",
      see videos below. Even though we can't use `QTimer::toggleDirection`,
      that's safe to delete code which resets timeline because `prePaintScreen`
      figures out correct direction of the timeline.
      
      Before
      
      {F5809835, layout=center, size=full}
      
      After
      
      {F5809850, layout=center, size=full}
      
      Test Plan:
      * Set duration to 5000
      * Furiously click an icon in the task manager
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D12253
      913f92ae
  8. 15 Apr, 2017 1 commit
    • Martin Flöser's avatar
      [effects] Use arg="true" in the kcfg files · 2132b1e0
      Martin Flöser authored
      Summary:
      By changing all kcfg to have arg="true" we can pass in the same
      KSharedConfigPtr into all effects. This allows to have fake config in
      the tests and in the planned effect demo mode.
      
      Also it means that we don't have to hardcode the name kwinrc into the
      files. In the configs - where we cannot access the effectshandler - we
      use the define KWIN_CONFIG which gets generated based on the compile
      time arguments.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3571
      2132b1e0
  9. 15 Nov, 2016 1 commit
  10. 15 Aug, 2016 1 commit
    • Martin Flöser's avatar
      Introduce an EffectsHandler::animationsSupported -> bool · 142aab2e
      Martin Flöser authored
      Summary:
      A new method to tell the effects system whether the compositor scene
      is able to drive animations. E.g. on software emulation (llvmpipe) it's
      better to not do any animations at all.
      
      This information can be used by effects to adjust their behavior, e.g.
      PresentWindows could skip transitions or effects can use it in their
      supported check to completely disable themselves.
      
      As a first step all scripted effects are considered to be unsupported
      if animations are not supported. They inherit AnimationEffect and are
      all about driving animations.
      
      The information whether animations are supported comes from the Scene.
      It's implemented in the following way:
       * XRender: animations are always supported
       * QPainter: animations are never supported
       * OpenGL: animations are supported, except for software emulation
      
      In addition - for easier testing - there is a new env variable
      KWIN_EFFECTS_FORCE_ANIMATIONS to overwrite the selection.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2386
      142aab2e
  11. 25 Mar, 2014 1 commit
  12. 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
      advantages:
      * 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
      methods.
      
      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
      average.
      
      REVIEW: 115073
      76efe517
  13. 24 Jul, 2013 1 commit
  14. 12 Mar, 2013 1 commit
  15. 06 Mar, 2013 1 commit
  16. 27 Feb, 2013 1 commit
    • Martin Flöser's avatar
      Reduce usage of QCursor::pos() and ::setPos() · b99e1c0a
      Martin Flöser authored
      Where possible it is changed to Cursor::pos(), where we cannot use the
      Cursor class (e.g. Aurorae) we can at least try to limit the usage to
      prevent roundtrips to the X server.
      
      REVIEW: 109178
      b99e1c0a
  17. 25 Nov, 2012 1 commit
    • Martin Flöser's avatar
      Introduce a templated animationTime overload for the KConfigXT case · 18cccad8
      Martin Flöser authored
      This method can be used to get the animationTime in case a configuration
      class generated through KConfigXT is used. In general the configuration
      stores the magic value 0 for a property "duration". This magic value
      indicates that a hard-coded default value should be used.
      
      So the common logic to test the stored value for 0 and then either pass
      the stored value or the default value to animationTime is encapsulated
      in this method in a generic way.
      
      A MyEffect can use it in the following way:
      animationTime<MyEffectConfig>(200);
      
      BUG: 310646
      FIXED-IN: 4.10
      REVIEW: 107460
      18cccad8
  18. 29 Sep, 2012 1 commit
    • Martin Flöser's avatar
      Introduce dedicated OpenGL1 and OpenGL2 compositing types · 6d2dfe06
      Martin Flöser authored
      The CompositingType enum turns into flags and two new values are
      introduced: OpenGL1Compositing and OpenGL2Compositing.
      
      Those new values are or-ed to OpenGLCompositing so that a simple check
      for the flag OpenGLCompositing works in case of one of those two new
      values. To make the generic check for OpenGL compositing easier a method
      in EffectsHandler is introduced to just check for this.
      
      The scenes now return either OpenGL1Compositing or OpenGL2Compositing
      depending on which Scene implementation. None returns OpenGLCompositing.
      6d2dfe06
  19. 19 Sep, 2012 1 commit
  20. 12 Mar, 2012 1 commit
  21. 01 Dec, 2011 1 commit
  22. 29 Aug, 2011 1 commit
    • Martin Flöser's avatar
      Only call active effects in the effect chain · fe4329a2
      Martin Flöser authored
      Each effect is able to declare itself as currently being active,
      that is transforming windows or painting or screen or doing anything
      during the current rendered frame.
      
      This change eliminates the hottest path inside KWin identified by
      callgrind.
      
      REVIEW: 102449
      fe4329a2
  23. 14 Mar, 2011 1 commit
    • Martin Flöser's avatar
      Drop KWin::TimeLine from kwineffects · f213b7da
      Martin Flöser authored
      The KWin::TimeLine class was only a small wrapper around QTimeLine
      without adding anything to QTimeLine what is not present in QTimeLine.
      The initial idea was to make it possible to provide more curve shapes.
      This is now obsoleted by Qt shipping more useful curves with QTimeLine.
      
      So let's clean up a little bit and use QTimeLine directly instead of
      the small wrapper.
      
      All effects are adjusted to use QTimeLine directly.
      f213b7da
  24. 06 Mar, 2011 2 commits
  25. 27 Feb, 2011 1 commit
  26. 31 Jan, 2011 1 commit
  27. 01 Jan, 2011 2 commits
  28. 25 Nov, 2009 2 commits
  29. 30 Oct, 2009 1 commit
  30. 01 Apr, 2009 1 commit
  31. 08 Mar, 2009 1 commit
    • Martin Flöser's avatar
      New way to determine in which direction to animate the magic lamp. Based on... · 3c449d81
      Martin Flöser authored
      New way to determine in which direction to animate the magic lamp. Based on the assumption that icon geometry is part of a panel. Using the panel to find the position is more safe as a the height of a vertical panel is greater than the width. This might not be true for the icon geometry. If the panel is autohidden we still have to use the icon geometry using the assumption that it will border one screen edge. For the unlikely case of bordering two screen edges the wrong animation might be used but it won't be distorted.
      There's still the possiblity of distortion if someone places the panel between two screens. But that's hardly possible to catch as it would require to animate parts of the window in one direction and the rest in another direction.
      BUG: 183059
      BUG: 183099
      
      svn path=/trunk/KDE/kdebase/workspace/; revision=936880
      3c449d81
  32. 05 Feb, 2009 1 commit
  33. 14 Jan, 2009 1 commit
  34. 30 Aug, 2008 1 commit
    • Luboš Luňák's avatar
      Add a global configuration option for animation speed. See description · 2a875936
      Luboš Luňák authored
      of Effect::animationTime() for how-to-use.
      TODO: Effects need to reload config after doing the change in the kcm.
      NOTE: Default TimeLine constructor now creates invalid object, it is
      necessary to explicitly call setDuration() in order to ensure all
      animations respect this setting.
      
      CCMAIL: kwin@kde.org
      
      
      svn path=/trunk/KDE/kdebase/workspace/; revision=854690
      2a875936
  35. 22 Aug, 2008 1 commit
  36. 04 Aug, 2008 1 commit