1. 21 Oct, 2020 2 commits
    • Luigi Toscano's avatar
      Generic wording for apps which can remember their settings · 773e0355
      Luigi Toscano authored
      Only a subset of KDE applications (part of KXMLGUI ones) support
      this setting, and on the other hand non KDE applications
      may support it as well.
      As there is no way to identify the subset of affected applications
      not even with technical terms, make the description a bit more
      generic, leaving it open to future improvements to the set of
      supported applications.
      773e0355
    • Bhushan Shah's avatar
      input: reconfigure after setting up the libinput · 733692f4
      Bhushan Shah authored
      Previously seat interface was keeping track of the repeat information,
      but now it is taken care by KeyboardInterface, which is created only if
      the setHasKeyboard is set to true.
      
      So, since we are setting up various capabilities on seat in libinput,
      re-parse configuration here, so that various information like key repeat
      is notified to kwayland-server
      
      BUG: 428039
      733692f4
  2. 20 Oct, 2020 10 commits
  3. 19 Oct, 2020 7 commits
    • Alexander Lohnau's avatar
      d1a0c149
    • Fabian Vogt's avatar
      Detect softpipe and llvmpipe on Mesa 20.2+ · 96635ea2
      Fabian Vogt authored
      It seems like the vendor string changed from "VMware Inc." to "Mesa/X.org".
      96635ea2
    • Vlad Zahorodnii's avatar
      screencast: Use fences to avoid stalling the graphics pipeline · 9c20df50
      Vlad Zahorodnii authored
      Currently, we use glFinish() to ensure that stream consumers don't see
      corrupted or rather incomplete buffers. This is a serious issue because
      glFinish() not only prevents the gpu from processing new GL commands,
      but it also blocks the compositor.
      
      This change addresses the blocking issue by using native fences. With
      the proposed change, after finishing recording a frame, a fence is
      inserted in the command stream. When the native fence is signaled, the
      pending pipewire buffer will be enqueued.
      
      If the EGL_ANDROID_native_fence_sync extension is not supported, we'll
      fall back to using glFinish().
      9c20df50
    • Vlad Zahorodnii's avatar
      Drop unused EGLSurface getter and setter in Platform · 170c4168
      Vlad Zahorodnii authored
      Besides being unused, we should avoid making OpenGL contexts current
      against the EGLSurface of the first output because it's a slippery road
      that may end up in leaking context-specific resources in the mid of a
      compositing restart.
      170c4168
    • Vlad Zahorodnii's avatar
      Introduce persistent global share context · 292335be
      Vlad Zahorodnii authored
      On Wayland, internal windows that use OpenGL are rendered into fbos,
      which are later handed over to kwin. In order to achieve that, our QPA
      creates OpenGL contexts that share resources with the scene's context.
      
      The problems start when compositing has been restarted. If user changes
      any compositing settings, the underlying render backend will be
      reinitialized and with it, the scene's context will be destroyed. Thus,
      we no longer can accept framebuffer objects from internal windows.
      
      This change addresses the framebuffer object sharing problem by adding
      a so called global share context. It persists throughout the lifetime of
      kwin. It can never be made current. The scene context and all contexts
      created in our QPA share resources with it.
      
      Therefore we can destroy the scene OpenGL context without affecting
      OpenGL contexts owned by internal windows, e.g. the outline visual or
      tabbox.
      
      It's worth noting that Qt provides a way to create a global share
      context. But for our purposes it's not suitable since the share
      context must be known when QGuiApplication attempts to instantiate a
      QOpenGLContext object. At that moment, the backend is not initialized
      and thus the EGLDisplay is not available yet.
      
      BUG: 415798
      292335be
    • Vlad Zahorodnii's avatar
      Fix a potential SIGSEGV · da12d380
      Vlad Zahorodnii authored
      Compositor::self()->scene() may return nullptr while compositing is
      being restarted.
      da12d380
    • Vlad Zahorodnii's avatar
      qpa: Create a pbuffer for internal windows · cc8cb8db
      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.
      cc8cb8db
  4. 17 Oct, 2020 3 commits
    • Vlad Zahorodnii's avatar
      Adapt to input region changes in kwayland-server · 41d431de
      Vlad Zahorodnii authored
      SurfaceInterface::inputIsInfinite() has been dropped. If the surface has
      no any input region specified, SurfaceInterface::input() will return a
      region that corresponds to the rect of the surface (0, 0, width, height).
      
      While the new design is more robust, for example it's no longer possible
      to forget to check SurfaceInterface::inputIsInfinite(), it has shown some
      issues in the input stack of kwin.
      
      Currently, acceptsInput() will return false if you attempt to click the
      server-side decoration for a surface whose input region is not empty.
      
      Therefore, it's possible for an application to set an input region with
      a width and a height of 1. If user doesn't know about KSysGuard or the
      possibility of closing apps via the task manager, they won't be able to
      close such an application.
      
      Another issue is that if an application has specified an empty input
      region on purpose, user will be still able click it. With the new
      behavior of SurfaceInterface::input(), this is n...
      41d431de
    • Vlad Zahorodnii's avatar
      Track the input shape of the server-side decoration · fea950f2
      Vlad Zahorodnii authored
      In order to determine if a window accepts input at specified position,
      we need to check if the decorated window and the server-side decoration
      contain the given point.
      
      While we have a way to determine if a point falls inside the input shape
      of the decorated window, there is no any way to do the same for the deco.
      fea950f2
    • Vlad Zahorodnii's avatar
      Introduce geometry conversion helpers · ba4f6b35
      Vlad Zahorodnii authored
      The new helpers are designed for the purpose of mapping points from the
      global screen coordinates to the frame-local and the surface-local coords
      ba4f6b35
  5. 16 Oct, 2020 4 commits
    • Vlad Zahorodnii's avatar
      wayland: Introduce logicalToNativeMatrix() helper · 7eccfdc5
      Vlad Zahorodnii authored
      The new helper function computes the projection matrix from the logical
      coordinate space to the display coordinate space.
      7eccfdc5
    • Vlad Zahorodnii's avatar
      platforms/drm: Fix software flip output transforms · f1741317
      Vlad Zahorodnii authored
      Currently, flip output transformations in the software fallback code
      path are equivalent to normal rotate output transformations.
      
      This change implements flip output transformations according to the
      wl_output spec.
      f1741317
    • Vlad Zahorodnii's avatar
      platforms/drm: Compute correct cursor transform matrix · 3b8e489b
      Vlad Zahorodnii authored
      Currently, when the DRM platform uses cursor planes, the cursor on
      a rotated output may be cropped because the math behind the current
      cursor transform matrix is off.
      
      In order to fix the cropping issue, this change replaces the current
      cursor transform matrix with the core part of the surface-to-buffer
      matrix, which was written against the wl_output spec.
      
      BUG: 427605
      CCBUG: 427060
      3b8e489b
    • Vlad Zahorodnii's avatar
      platforms/drm: Fix initialization of EGL displays · 33fad70c
      Vlad Zahorodnii authored
      Currently, every time compositing is restarted, both the gbm and the egl
      streams backend will re-obtain the EGLDisplay object.
      
      This is wrong because the core assumption is that the EGL display doesn't
      change once it has been obtained.
      33fad70c
  6. 15 Oct, 2020 2 commits
    • Vlad Zahorodnii's avatar
      wayland: Fix Qt clients not being maximized initially · a195223a
      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.
      a195223a
    • Benjamin Port's avatar
      KCM: Adapt to KCMUtils change · 4acea542
      Benjamin Port authored
      4acea542
  7. 14 Oct, 2020 5 commits
  8. 13 Oct, 2020 7 commits
    • Nicolas Fella's avatar
      [libkwineffects] Remove KWIN4_ADD_GLUTILS_BACKEND cmake macro · 3669ca20
      Nicolas Fella authored
      Defining a macro and then using it only once is a bit strange.
      3669ca20
    • Nicolas Fella's avatar
      Add proper cmake config files for kwineffects · 6edffc68
      Nicolas Fella authored
      This makes it easier for out-of-tree effects to find and link against the required libs, including correct dependency propagation.
      6edffc68
    • Vlad Zahorodnii's avatar
      launcher: Fix a file descriptor leak · dbf52ebd
      Vlad Zahorodnii authored
      The file descriptor must be closed after sending a ReleaseDevice request.
      dbf52ebd
    • Vlad Zahorodnii's avatar
      wayland: Block geometry updates while placing popups · f369a355
      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.
      f369a355
    • Vlad Zahorodnii's avatar
      1e01b133
    • Bhushan Shah's avatar
      platforms/drm: do not try to use the GPU card node · d9d1c976
      Bhushan Shah authored
      On some devices, the GPU nodes are also added as /dev/dri/cardX, they
      are not useful for KMS purposes and does not have display resources.
      If we encounter such cards, then skip them.
      d9d1c976
    • Bhushan Shah's avatar
      Drop check for if parent subsystem is PCI · c586a255
      Bhushan Shah authored
      This check is completely wrong for mobile GPUs where GPU are internal
      and are not attached through PCI subsystem,
      
      P: /devices/platform/display-engine/drm/card1
      N: dri/card1
      L: 0
      S: dri/by-path/platform-display-engine-card
      E: DEVPATH=/devices/platform/display-engine/drm/card1
      E: DEVNAME=/dev/dri/card1
      E: DEVTYPE=drm_minor
      E: MAJOR=226
      E: MINOR=1
      E: SUBSYSTEM=drm
      E: USEC_INITIALIZED=4239383
      E: ID_PATH=platform-display-engine
      E: ID_PATH_TAG=platform-display-engine
      E: ID_FOR_SEAT=drm-platform-display-engine
      E: DEVLINKS=/dev/dri/by-path/platform-display-engine-card
      E: TAGS=:master-of-seat:seat:uaccess:
      
      For example, on A64 platform, the KMS capable card is card1 which is not
      attached with PCI.
      c586a255