1. 10 Jan, 2020 1 commit
  2. 09 Jan, 2020 4 commits
    • David Edmundson's avatar
      [colormanager] Fix build on older glib · 92855469
      David Edmundson authored
      Summary:
      Copies the approach we do for various GL calls not existing on the
      system headers.
      
      See D25962
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26553
      92855469
    • Vlad Zahorodnii's avatar
      [scene] Fix decoration texture bleeding · af71763b
      Vlad Zahorodnii authored
      Summary:
      Quite long time ago, window decorations were painted on real X11 windows.
      The nicest thing about that approach is that we get both contents of the
      client and the frame window at the same time. However, somewhere around
      KDE 4.2 - 4.3 times, decoration rendering architecture had been changed
      to what we have now.
      
      I've mentioned the previous decoration rendering design because it didn't
      have a problem that the new design has, namely the texture bleeding issue.
      
      In the name of better performance, opengl scene puts all decoration parts
      to an atlas. This is totally reasonable, however we must be super cautious
      about things such as the GL_LINEAR filter.
      
      The GL_LINEAR filter may need to sample a couple of neighboring texels
      in order to produce the final texel value. However, since all decoration
      parts now live in a single texture, we have to make sure that we don't
      sample texels that belong to another decoration part.
      
      This patch fixes the texture bleeding problem by padding each individual
      decoration part in the atlas. There is another solution for this problem
      though. We could render a window into an offscreen texture and then map
      that texture on the transformed window geometry. This would work well and
      we definitely need an offscreen rendering path in the opengl scene,
      however it's not feasible at the moment since we need to break the window
      quads API. Also, it would be great to have as less as possible stuff going
      on between invocation of Scene::Window::performPaint() and getting the
      corresponding pixel data on the screen.
      
      There is a good chance that the new padding stuff may make you vomit. If
      it does so, I'm all ears for the suggestions how to make the code more
      nicer.
      
      BUG: 257566
      BUG: 360549
      CCBUG: 412573
      FIXED-IN: 5.18.0
      
      Reviewers: #kwin
      
      Subscribers: fredrik, kwin, fvogt
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25611
      af71763b
    • David Edmundson's avatar
      Avoid texture bleed rendering X11 window · d1cfcf4c
      David Edmundson authored
      Summary:
      We currently see a gap on transformed windows between the window and the
      top decoration.
      
      This is partly the atlas bleed on the decoration, and partly a bleed on
      the window content itself.
      
      On X11, the window we composite is the frame window - which is a larger
      texture containing a transparent border where the frame normally would
      be. When we sample with a linear filter we include these texels. Hence
      GL_CLAMP_TO_EDGE doesn't work.
      
      Vlad's patch to composite the correct window, not the frame was my
      preferred approach, but we had to revert it as it caused an issue with
      xwayland :(
      
      Half pixel correction nearly worked, but caused blurry fonts.
      
      This patch resolves it in the fragment shader used by effects doing
      transforms. We pass the real texture geometry of the window to the
      client with a half pixel correction. Any samples outside the outer half
      pixel are then clamped within bounds.
      
      Arguably a hack, but solves the problem in a comparatively
      non-invasive way.
      
      BUG: 360549
      BUG: 257566
      
      Test Plan:
      X11:
      Using Vlad's atlas padding for decoration
      Slowed animations, wobbled a dark window over a light background
      No artifacts
      
      Wayland:
      This isn't needed. Now tested that everything still renders the same.
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, jgrulich, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25737
      d1cfcf4c
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 0b1e9cfb
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      0b1e9cfb
  3. 08 Jan, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Use geometry conversion helpers from AbstractClient in InternalClient · 976730a4
      Vlad Zahorodnii authored
      Summary:
      mapFromClient and mapToClient are equivalent to clientRectToFrameRect and
      frameRectToClientRect, respectively.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26508
      976730a4
    • Roman Gilg's avatar
      [platforms/drm] Allow running without outputs · 2632e418
      Roman Gilg authored
      Summary:
      Set outputs enablement also when none outputs are present. This patch is
      similar to earlier attempt at D17985.
      
      BUG: 402827
      BUG: 389551
      BUG: 398680
      BUG: 413758
      
      Test Plan:
      Starting without outputs, manual disconnects and DPMS changes. There is still
      an issue when an output gets disconnected while the DPMS is off. But it's an
      improvement already.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T10016
      
      Differential Revision: https://phabricator.kde.org/D26511
      2632e418
  4. 07 Jan, 2020 6 commits
    • Sefa Eyeoglu's avatar
      [effects/slidingpopups] Tweak effect to make animation smoother and more consistent · ee5f63c0
      Sefa Eyeoglu authored
      Summary:
      - Easing function for slide-in changed to InQuad
      - Easing function for slide-out changed to OutQuad
      - Opacity is now interpolated, too.
      
      Reviewers: #vdg, zzag, #kwin, sefaeyeoglu, ndavis, davidedmundson
      
      Reviewed By: #vdg, zzag, #kwin, sefaeyeoglu, ndavis, davidedmundson
      
      Subscribers: niccolove, ngraham, abetts, davidedmundson, zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D18000
      ee5f63c0
    • Vlad Zahorodnii's avatar
      [nightcolor] Use a dedicated class for detection of system clock changes · e728460a
      Vlad Zahorodnii authored
      Summary:
      The ClockSkewNotifier provides a convenient way for monitoring system
      clock changes. One of the key ideas was to hide platform details from
      users of the class. This allows us to add a QTimer fallback path for
      operating systems that don't provide anything to detect system clock
      changes.
      
      In long term, I would like to move the new class to Frameworks.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25962
      e728460a
    • Vlad Zahorodnii's avatar
      [nightcolor] Expose some properties to d-bus · 33f46f6d
      Vlad Zahorodnii authored
      Summary:
      Currently, in order to retrieve the current screen color temperature
      applied to all screen as well other attributes of night color manager,
      one has to call nightColorInfo() periodically. This goes against well
      established patterns in d-bus world. It is recommended to expose a
      bunch of d-bus properties rather than have a method that returns all
      relevant properties stored in a JSON object.
      
      The ugliest thing about this patch is that a lot of code is duplicated
      to emit the PropertiesChanged signal. Unfortunately, QtDBus doesn't
      take care of this and we are left with only two options - either do
      weird things with QMetaObject or manually emit the signal. I have
      picked the second option since it's more comprehensible and less magic
      is going on, but I have to admit that the chosen approach is ugly.
      
      I hope that "Qt 6 will fix it."
      
      CCBUG: 400418
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25946
      33f46f6d
    • Vlad Zahorodnii's avatar
      [nightcolor] Introduce inhibition API · 5bec89ac
      Vlad Zahorodnii authored
      Summary:
      The new API allows to block Night Color temporarily. This can be useful
      for applications such as video games and plasma applets.
      
      CCBUG: 400418
      
      Test Plan: Called inhibit() and uninhibit() from D-Feet.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25786
      5bec89ac
    • Vlad Zahorodnii's avatar
      Merge branch 'Plasma/5.17' · 216c005e
      Vlad Zahorodnii authored
      216c005e
    • Vlad Zahorodnii's avatar
      [nightcolor] Fix division by zero · 5646c781
      Vlad Zahorodnii authored
      Summary:
      If qAbs(targetTemp - m_currentTemp) is less than TEMPERATURE_STEP, then
      it will result in a division by zero.
      
      FIXED-IN: 5.17.5
      BUG: 415359
      
      Reviewers: #kwin, apol
      
      Reviewed By: apol
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26493
      5646c781
  5. 06 Jan, 2020 1 commit
    • David Edmundson's avatar
      Clamp XdgShellClient::clientSize to surface size, not m_windowGeometry · 89024e2b
      David Edmundson authored
      Summary:
      It's perfectly legitimate to call setWindowSize before a buffer is
      attached. This seems to have happen with plasma surfaces that commit
      when attaching a shadow, but technically could happen anywhere.
      
      By clamping to the applied surface here, we get the wrong window size
      cached and not re-evaluated when a surface is eventually applied. This
      leaves us thinking the windowsize is empty but with a massive margin
      which actually holds the content.
      
      We want all internal usages of xdgshellclient to use the window geometry
      set. Only the wider kwin part needs to care about clamping it to the
      surface.
      
      This fixes popup placement in the plasma panel
      BUG: 415317
      
      As well as ghost notification popups with no background contrast that
      you can't interact with.
      
      Test Plan: Ran kwin
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: romangg, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26233
      89024e2b
  6. 04 Jan, 2020 1 commit
  7. 31 Dec, 2019 2 commits
  8. 30 Dec, 2019 4 commits
    • Roman Gilg's avatar
      Set Qt::KeypadModifier depending on current keysym · 514a95f1
      Roman Gilg authored
      Summary:
      The Qt::KeypadModifier should only accompany a keysym when this specific keysym
      originates from the keypad not in general for every keysym while numlock is
      engaged.
      
      BUG: 400658
      FIXED-IN: 5.18.0
      
      Test Plan: Manually with the Thumbnail Grid task switcher and numlock enabled.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26283
      514a95f1
    • Roman Gilg's avatar
      Flexible composite swap and timer events · 1e3128b0
      Roman Gilg authored
      Summary:
      The GLX backend might need a combination of swap and composite timer events for
      continous painting.
      
      The reason for that is that if the buffer age extension is not available we
      fall back to copies in case not the whole screen is repainted.
      
      The timer logic is adapted to make this possible in a lean way what cleans up
      the Compositor class in several ways.
      
      Test Plan: Tested on X11 (with/without swap events, buffer age enabled)  and Wayland.
      
      Reviewers: #kwin
      
      Subscribers: hurikhan77, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26216
      1e3128b0
    • Méven Car's avatar
      KCM/Effects: convert a couple C-style cast · 2bb4acf7
      Méven Car authored
      Summary: Followup after D26040
      
      Reviewers: ervin, zzag, davidedmundson
      
      Reviewed By: davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26286
      2bb4acf7
    • Laurent Montel's avatar
      Don't use nullptr as default flags · 9b41e935
      Laurent Montel authored
      9b41e935
  9. 25 Dec, 2019 1 commit
  10. 24 Dec, 2019 3 commits
  11. 23 Dec, 2019 4 commits
    • Roman Gilg's avatar
      Reset buffer swap state on stop · ba2c0324
      Roman Gilg authored
      Summary:
      When the compositor is stopped there might still be a buffer swap ongoing, in
      particular when a client blocks compositing on X11.
      
      Depending on the backend the next buffer swap event might be handled in
      bufferSwapComplete (Wayland) or not be handled (X11 GLX, since a new
      GLX window will be created while the swap event is sent for the old one).
      
      With this patch the buffer swap state is reset on stop such that on later
      start no outdated data might create errors  and instead a new repaint can be
      triggered with updated data.
      
      BUG: 415262
      
      Test Plan: Manually on X11 and Wayland.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26090
      ba2c0324
    • Laurent Montel's avatar
      Remove deprecated method · 45177bb2
      Laurent Montel authored
      Summary: Remove some deprecated method
      
      Reviewers: zzag
      
      Reviewed By: zzag
      
      Subscribers: davidedmundson, zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25735
      45177bb2
    • Méven Car's avatar
      [KCM/Desktop] Port from KQuickAddons::ConfigModule to ManagedConfigModule · 790e717c
      Méven Car authored
      Test Plan:
      kcmshell5 kcm_kwin_virtualdesktops
      kcm works as before
      
      Reviewers: #kwin, ervin, crossi, zzag
      
      Reviewed By: #kwin, ervin, zzag
      
      Subscribers: zzag, bport, crossi, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25881
      790e717c
    • Kai Uwe Broulik's avatar
      Honour panelTakesFocus for other plasmashell types · a823474e
      Kai Uwe Broulik authored
      The semantics of a window taking focus on user interaction apply to more roles. See D25851.
      
      Given it is used by KWindowSystem::forceActivateWindow in kwayland-integration,
      it makes sense to pass focus to the window once it gets this property set.
      
      Differential Revision: https://phabricator.kde.org/D25968
      a823474e
  12. 22 Dec, 2019 2 commits
  13. 20 Dec, 2019 1 commit
  14. 15 Dec, 2019 2 commits
  15. 14 Dec, 2019 2 commits
    • David Edmundson's avatar
      Merge branch 'Plasma/5.17' · ad285840
      David Edmundson authored
      ad285840
    • David Edmundson's avatar
      Possible fix for KDecoration crash in systemsettings · 1a13015d
      David Edmundson authored
      Summary:
      I could never reproduce the crash, but we know from gdb that it's from
      the decorationSettings object
      
      We are setting the same QObject instance as a context property in
      multiple contexts at once. This is already slightly odd especially from the POV of
      Qt's internal property cache.
      
      Given we want one object to be exposed to all contexts, we can expose it
      to the parent context only once and achieve the same result in a simpler
      way.
      
      BUG: 411166
      
      Test Plan:
      Verified opening and closing system settings still worked for me.
      I could never reproduce the original crash.
      
      Reviewers: #kwin, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham, apol, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25913
      1a13015d
  16. 13 Dec, 2019 2 commits
  17. 12 Dec, 2019 2 commits