1. 22 Nov, 2020 1 commit
    • David Edmundson's avatar
      Bundle QPA plugin directly · 5e60e64a
      David Edmundson authored
      On wayland, we know we're always going to load our internal QPA. Instead
      of shipping a plugin and loading it dynamically we can use Qt static
      plugins.
      
      This should result in slightly faster load times, but also reduce the
      number of moving pieces for kwin.
      
      This also prevents anyone outside kwin loading our QPA which wouldn't
      have made any sense and just crashed.
      5e60e64a
  2. 13 Oct, 2020 1 commit
    • Vlad Zahorodnii's avatar
      qpa: Merge OpenGL platform context classes · 9b89a3d9
      Vlad Zahorodnii authored
      This makes our QPlatformOpenGLContext private subclass simpler.
      
      As a slightly unrelated change, this patch also fixes a bug where our
      platform opengl context may return a wrong surface format if surfaceless
      contexts are unsupported.
      9b89a3d9
  3. 15 May, 2020 1 commit
  4. 23 Sep, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Port QPA away from Wayland · bebe8120
      Vlad Zahorodnii authored
      Summary:
      So far wayland was used by internal clients to submit raster buffers
      and position themselves on the screen. While we didn't have issues with
      submitting raster buffers, there were some problems with positioning
      task switchers. Mostly, because we had effectively two paths that may
      alter geometry.
      
      A better approach to deal with internal clients is to let our QPA use
      kwin core api directly. This way we can eliminate unnecessary roundtrips
      as well make geometry handling much easier and comprehensible.
      
      The last missing piece is shadows. Both Plasma::Dialog and Breeze widget
      style use platform-specific APIs to set and unset shadows. We need to
      add shadows API to KWindowSystem. Even though some internal clients lack
      drop-shadows at the moment, I don't consider it to be a blocker. We can
      add shadows back later on.
      
      CCBUG: 386304
      
      Reviewers: #kwin, davidedmundson, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: romangg, kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T9600
      
      Differential Revision: https://phabricator.kde.org/D22810
      bebe8120
  5. 18 Sep, 2019 1 commit
  6. 17 Sep, 2019 1 commit
  7. 01 Jul, 2019 2 commits
    • Vlad Zahorodnii's avatar
      [plugins/qpa] Implement native offscreen surface · f5b66a58
      Vlad Zahorodnii authored
      Summary:
      Depending on whether the underlying platform supports offscreen surfaces,
      QOffscreenSurface may create an invisible QWindow. In our case that's the
      case, for each offscreen surface a native window is created. This may
      lead to some funky results related to window decorations, see bug 407612.
      
      There are several ways to implement offscreen surfaces - either use pbuffers
      or utilize a surfaceless context extension. For the sake of simplicity
      this change sticks with pbuffers, but it's a good idea to support both
      methods.
      
      CCBUG: 407612
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: romangg, alexeymin, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D22150
      f5b66a58
    • Vlad Zahorodnii's avatar
      [plugins/qpa] Split out EGL helpers · 22d70d0c
      Vlad Zahorodnii authored
      Summary: This change is a prerequisite for adding offscreen surface support.
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D22196
      22d70d0c
  8. 22 Feb, 2019 1 commit
    • Martin Flöser's avatar
      [qpa] Drop PlatformContextWayland which uses wayland egl for OpenGL · e48d9df1
      Martin Flöser authored
      Summary:
      Using the Wayland protocol for OpenGL is no longer used or useful. KWin
      internal windows only use OpenGL through QtQuick. We either have the
      sharing context (KWin uses OpenGL for compositing) or we have the
      QPainter compositor which also turns QtQuick to use software renderer.
      
      Thus a situation where the Wayland platform context is useful doesn't
      exist any more. Removing it helps getting the QPA plugin Wayland free.
      
      Test Plan:
      Run nested KWin triggering Outline once with OpenGL and once
      with QPainter compositor.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D19012
      e48d9df1
  9. 17 Feb, 2019 1 commit
  10. 18 Dec, 2018 1 commit
  11. 04 Nov, 2018 1 commit
  12. 28 Oct, 2016 1 commit
  13. 18 Jul, 2016 1 commit
  14. 17 Feb, 2016 1 commit
    • Martin Flöser's avatar
      [plugins/qpa] Implement a custom QPlatformCursor · 7d81e9cf
      Martin Flöser authored
      This makes QCursor::pos and QCursor::setPos function correctly. KWin
      actually wouldn't need it as KWin has the KWin::Cursor replacement, but
      it allows Qt internal API to have it function correctly and also the
      zoom effect does use QCursor::setPos.
      7d81e9cf
  15. 01 Dec, 2015 1 commit
    • Martin Flöser's avatar
      Make Wayland::EGL optional again · d89777bc
      Martin Flöser authored
      This is needed to make KWin build-able on non-Linux, but is actually
      only a workaround. The dependency should also be available on non-Linux.
      
      This disables the EGL integration in the Wayland backend (QPainter still
      available) and the EGL fallback in the qpa plugin (preferred context
      sharing still available, but requires a working OpenGL Scene).
      
      REVIEW: 126202
      d89777bc
  16. 25 Aug, 2015 1 commit
    • Martin Flöser's avatar
      [wayland] Add a QPA plugin for kwin_wayland · 26b3569a
      Martin Flöser authored
      This introduces an own QPA plugin for KWin. QtWayland's plugin is not
      a good solution for KWin as QtWayland is meant for Wayland clients and
      not for a Wayland server. Given that it makes more sense to have a very
      minimal QPA plugin which supports the use cases we actually have.
      
      With our own QPA plugin we should be able to improve the following
      areas:
      * no need to create Wayland server before QApplication
      * Qt::BypassWindowManagerHint can be supported
      * no workaround for creating OpenGL context in main thread
      * sharing OpenGL context with Qt
      * OpenGL context for Qt on libhybris backend
      
      The plugin supports so far the following features:
      * creating a QPlatformWindow using KWayland::Client (ShellSurface)
      * creating a QPlatformBackingStore using a ShmPool
      * creating a QPlatformOpenGLContext with Wayland::EGL
      * or creating a QPlatformOpenGLContext which shares with KWin's scene
      * creating a QPlatformScreen for each KWayland::Client::Output
      * QPlatformNativeInterface compatible to QtWayland
      26b3569a