1. 20 Oct, 2020 7 commits
    • Vlad Zahorodnii's avatar
      Fix a potential SIGSEGV · 062e0441
      Vlad Zahorodnii authored
      Compositor::self()->scene() may return nullptr while compositing is
      being restarted.
      
      (cherry picked from commit da12d380)
      062e0441
    • Vlad Zahorodnii's avatar
      qpa: Create a pbuffer for internal windows · 3dcc4ebd
      Vlad Zahorodnii authored
      If the surfaceless context extension is unsupported by the underlying
      platform, the QPA will use the EGLSurface of the first output to make
      OpenGL contexts current.
      
      If an internal window attempts to make an OpenGL context current while
      compositing is being restarted, for example it's typically the case with
      the composited outline visual, QPA will either try to make the context
      current with a no longer valid EGLSurface for the first output or will
      crash during the call to Platform::supportsSurfacelessContext(). The
      latter needs more explanation. After the compositingToggled() signal has
      been emitted, there is no scene and supportsSurfacelessContext() doesn't
      handle this case.
      
      In either case, we could return EGL_NO_SURFACE if compositing is being
      restarted, but if the underlying platform doesn't support the surfaceless
      context extension, then the composited outline will not be able to
      delete used textures, framebuffer objects, etc.
      
      This change addresses that problem by making sure that every platform
      window has a pbuffer allocated in case the surfaceless context extension
      is unsupported.
      
      (cherry picked from commit cc8cb8db)
      3dcc4ebd
    • Vlad Zahorodnii's avatar
      core: Use less confusing name for Platform::supportsQpaContext() · 259dedfc
      Vlad Zahorodnii authored
      Platform::supportsQpaContext() indicates if the EGL display supports
      surfaceless contexts, so reflect that in the method name.
      
      (cherry picked from commit 29fbe27f)
      259dedfc
    • Vlad Zahorodnii's avatar
      qpa: Merge OpenGL platform context classes · 7d327d0b
      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.
      
      (cherry picked from commit 9b89a3d9)
      7d327d0b
    • Vlad Zahorodnii's avatar
      scene: Reduce the call cost of Platform::supportsQpaContext() · 77a6d2c6
      Vlad Zahorodnii authored
      Every time Platform::supportsQpaContext() is called, we go through the
      list of supported extensions and perform a string comparison op. This is
      not really cheap.
      
      (cherry picked from commit b7bd8472)
      77a6d2c6
    • Jonathan Esk-Riddell's avatar
      Update version number for 5.20.1 · 8edf25c1
      Jonathan Esk-Riddell authored
      GIT_SILENT
      8edf25c1
    • Lewis Lakerink's avatar
      Fix pipewire stream double free · ae6e7fee
      Lewis Lakerink authored and David Edmundson's avatar David Edmundson committed
      
      (cherry picked from commit 16cb4286)
      ae6e7fee
  2. 19 Oct, 2020 1 commit
  3. 16 Oct, 2020 3 commits
  4. 15 Oct, 2020 1 commit
    • Vlad Zahorodnii's avatar
      wayland: Fix Qt clients not being maximized initially · 76a33c90
      Vlad Zahorodnii authored
      Currently, Qt clients send two maximize requests separated by the
      initial commit. From spec's perspective, this is totally fine, the
      client should receive two configure events with "maximized" state.
      
      But because changeMaximize() in XdgToplevelClient and setMaximized()
      operate on two different maximize modes, the second maximize request
      will trick kwin into thinking that the client should be restored.
      
      
      (cherry picked from commit a195223a)
      76a33c90
  5. 14 Oct, 2020 1 commit
    • Vlad Zahorodnii's avatar
      xwayland: Avoid creating a tree query on crash · 0109bdbb
      Vlad Zahorodnii authored
      If Xwayland has crashed, the Workspace will block stacking order updates
      and start destroying all X11 clients.
      
      Once stacking order updates are unblocked, the Workspace will mark the X
      stacking order as dirty and create a new Xcb::Tree object.
      
      We don't want to create that Xcb::Tree object because accessing it
      after the XCB connection has been shut down will lead to a crash.
      
      BUG: 427688
      FIXED-IN: 5.20.1
      
      
      (cherry picked from commit 2093820a)
      0109bdbb
  6. 13 Oct, 2020 1 commit
    • Vlad Zahorodnii's avatar
      wayland: Block geometry updates while placing popups · 83ed2503
      Vlad Zahorodnii authored
      Placement::placeTransient() checks the frame geometry right after
      setting it. That is a problem because geometry updates for
      XdgPopupClient are made in async fashion. We need to block geometry
      updates in order to ensure that window placement code sees correct
      geometry.
      
      
      (cherry picked from commit f369a355)
      83ed2503
  7. 12 Oct, 2020 2 commits
  8. 11 Oct, 2020 1 commit
  9. 10 Oct, 2020 1 commit
  10. 09 Oct, 2020 3 commits
  11. 08 Oct, 2020 1 commit
  12. 07 Oct, 2020 1 commit
    • Vlad Zahorodnii's avatar
      wayland: Fix initialization of dmabuf textures · e200caf0
      Vlad Zahorodnii authored
      Commit e459c8bf added a sanity check to
      prevent recomputing the texture matrix if the y-inverted hint hasn't been
      changed, which is totally reasonable!
      
      However, code that initializes dmabuf textures implicitly assumes that
      calling setYInverted() always results in updating the matrix. But it may
      be not the case if the passed value matches current isYInverted().
      
      This change adds missing calls to force updating the texture matrix.
      
      Note that we don't need to check the buffer size every time the dmabuf
      image has been modified externally because the window pixmap is going to
      be re-created if the dimensions of the attached buffer have changed.
      
      I've seen some reports on the internet about Firefox displaying garbage
      instead of videos. 99% that bug is caused by this issue. But it seems
      like Firefox no longer displays corrupted videos on my machine, so it's
      hard to tell.
      
      
      (cherry picked from commit f247e35c)
      e200caf0
  13. 06 Oct, 2020 1 commit
  14. 05 Oct, 2020 1 commit
  15. 04 Oct, 2020 1 commit
  16. 01 Oct, 2020 5 commits
  17. 29 Sep, 2020 9 commits
    • Aleix Pol Gonzalez's avatar
      scene: prefer calling mapToGlobal just once · ba2aab2f
      Aleix Pol Gonzalez authored and Vlad Zahorodnii's avatar Vlad Zahorodnii committed
      It's the same top mapToGlobal()+operator& than the other way around and
      we get to skip 1 call.
      This path is the most common so we better save it.
      
      (cherry picked from commit f558115d)
      ba2aab2f
    • Vlad Zahorodnii's avatar
      Place internal osd windows according to placement policies · 6e56d574
      Vlad Zahorodnii authored
      Currently, internal on screen display windows have the bypass window
      manager hint set. If that hint is set, the osds must place themselves,
      but they don't do it.
      
      As far as I know, there is no any reason why internal OSDs have that
      flag set.
      
      By removing the Qt::BypassWindowManagerHint flag, we let kwin core
      know that it's okay to place internal OSD windows.
      
      BUG: 400675
      
      
      (cherry picked from commit 4559d303)
      6e56d574
    • Vlad Zahorodnii's avatar
      Properly test internal window flags · 491930c4
      Vlad Zahorodnii authored
      Qt::Popup is a mask, so we cannot use the `&` operator to test the window
      type. We need to use QFlags::testFlag() for that purpose instead.
      
      
      (cherry picked from commit 70700b86)
      491930c4
    • Vlad Zahorodnii's avatar
      Use better window placement heuristics for internal clients · ef65a340
      Vlad Zahorodnii authored
      Currently, we do some sort of window placement only for decorated
      internal windows, which feels hacky.
      
      With this change, all internal clients will go through the window
      placement code, unless it's a popup or the BypassWindowManagerHint
      flag is set.
      
      If the BypassWindowManagerHint flag is set, the window must have
      valid position.
      
      CCBUG: 400675
      
      
      (cherry picked from commit bc347365)
      ef65a340
    • Vlad Zahorodnii's avatar
      screencast: Replace EGLFence with a glFinish() · 02490c20
      Vlad Zahorodnii authored
      The way EGLFence is used is equivalent to calling glFinish().
      
      CCBUG: 425869
      
      
      (cherry picked from commit 6546ac2c)
      02490c20
    • Vlad Zahorodnii's avatar
      Allow calling setFrameGeometry() while the client is being resized · dfa08f22
      Vlad Zahorodnii authored
      Currently, if some script attempts to resize a window while it's being
      interactively resized, the corresponding change won't be propagated to
      the X server.
      
      The main reason for that is that we don't want to configure the frame
      window, the wrapper window, and the client window twice. However, since
      Xcb::Window keeps track of the last configured geometry, we can adjust
      X11Client::updateServerGeometry() so it only configures windows that
      have mismatching geometry.
      
      By doing so, the setFrameGeometry() function can be called by scripts
      even when the associated X11 window is being interactively resized.
      
      Note that this bug doesn't affect Wayland windows.
      
      BUG: 426988
      
      
      (cherry picked from commit 6f153552)
      dfa08f22
    • Vlad Zahorodnii's avatar
      Fix ghost shadows left by context menus · f53d90a9
      Vlad Zahorodnii authored
      If the shadow is destroyed immediately before the window is destroyed,
      we need to schedule a workspace repaint in order to prevent showing a
      "ghost" shadow.
      
      BUG: 425294
      
      
      (cherry picked from commit ddb24eaf)
      f53d90a9
    • Vlad Zahorodnii's avatar
      Schedule workspace repaint for destroyed clients · e0564069
      Vlad Zahorodnii authored
      We need to schedule a workspace repaint in case no effect is going to
      animate the window.
      
      The workspace repaint is issued before creating a Deleted because the
      latter takes the owner of the effect window, which means that after an
      instance of Deleted has been created, visibleRect() returns the frame
      geometry.
      
      CCBUG: 425294
      
      
      (cherry picked from commit 12e59f9a)
      e0564069
    • Vlad Zahorodnii's avatar
      x11: Make removal of X11 event filters safe · c5880833
      Vlad Zahorodnii authored
      If an X11 event filter has been activated and it unregisters another X11
      event filter, then the window manager may crash because the foreach macro
      in Workspace::workspaceEvent() makes a copy of m_genericEventFilters or
      m_eventFilters and we can call the event() method for an already defunct
      filter.
      
      With this change, X11 event filters can be safely removed and installed
      at any particular moment.
      
      BUG: 423319
      
      
      (cherry picked from commit a433fb08)
      c5880833