1. 04 Nov, 2018 2 commits
  2. 10 Oct, 2018 1 commit
    • David Edmundson's avatar
      [qpa] Always keep a at least one screen · 6724955a
      David Edmundson authored
      Qt does not like having no screens. Both Qt XCB and Wayland QPAs have
      systems pretend there's always at least 1 screen
      Kwin already uses a dummy screen on startup, this patch reinserts the
      dummy screen if the platform states that all real screens are removed.
      BUG: 399564
      Test Plan:
      Logged in, everything still worked
      Did not reproduce the original bug
      Reviewers: #kwin, zzag
      Reviewed By: #kwin, zzag
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D16096
  3. 05 Oct, 2018 2 commits
  4. 05 Jun, 2018 1 commit
  5. 29 Mar, 2018 1 commit
    • Eike Hein's avatar
      Request a high-priority EGL contexts · 2c26215d
      Eike Hein authored
      This patch implements using EGL_IMG_context_priority to request
      high-priority rendering contexts if the extension is available.
      EGL_IMG_context_priority is currently used in this fashion by
      e.g. Android's SurfaceFlinger (RenderEngine.cpp) and libweston
      (gl-renderer.c) and seems promising given this widespread
      Reviewers: #kwin, graesslin, romangg, davidedmundson
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D11572
  6. 06 Mar, 2018 1 commit
  7. 31 Oct, 2017 1 commit
  8. 19 Oct, 2017 1 commit
    • Martin Flöser's avatar
      [QPA] Implement Screen on top of internal Screens API · abedb464
      Martin Flöser authored
      The test DontCrashUseractionsMenu (Waylandonly) found an issue in our
      screen handling implementation in the QPA. The code exposed a short time
      frame between the dummy screen getting destroyed and the first screen
      being added. This could result in a crash of KWin.
      There is actually no need to implement Screen on top of Wayland screen.
      KWin has all the knowledge, so we can also base this on top of the
      Screens API.
       * no delays due to Wayland roundtrips
       * handle screen getting removed (was a TODO)
       * handle resolution changes (was a TODO)
      The new implementation has a disadvantage that it destroys and readds
      all screens whenever something around the screen changes. This shouldn't
      be an issue in practice as it's only for the internal QPA and thus only
      affects KWin internal windows which is placed in global coordinates
      anyway. If it turns out to be a problem we need to track better the
      screen changes - so far those were not tracked at all.
      Test Plan: Run a few unit tests which change screens
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D8345
  9. 31 Jul, 2017 2 commits
  10. 30 Jul, 2017 1 commit
  11. 17 Jul, 2017 1 commit
  12. 06 Jul, 2017 1 commit
    • Martin Flöser's avatar
      [qpa] Prevent crash due to Surface getting null · 962a2e39
      Martin Flöser authored
      This is a regression due to changes in Breeze to support Qt 5.8+ behavior
      change. KWin's own QPA operates like < Qt 5.7 and breeze was programmed
      against that. Due to that it can happen now that Breeze hits code paths
      in which KWin does not have a surface.
      To trigger one only needed to open the user actions menu twice.
      This change adds a test case which simulates the problem and fixes all
      crashes happening in the code path.
      Most likely shadows are now broken for KWin's own windows, this change is
      only to prevent the crash and thus is for 5.10 branch, while shadow
      fixing will go to master branch.
      BUG: 382063
      FIXED-IN: 5.10.4
      Test Plan: New test case
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D6533
  13. 28 Apr, 2017 1 commit
  14. 22 Apr, 2017 1 commit
    • Martin Flöser's avatar
      [plugins/qpa] Do not replace a valid FBO with an invalid one · ac08c5ac
      Martin Flöser authored
      With the TabBox I observed the following issue:
       1: trigger TabBox through screen edge
       2: exit TabBox
       3: trigger TabBox again through screen edge
      Actual behavior: in step 3 the GUI does not show. If now using Alt+Tab
      to show the TabBox the gui shows, but through screen edge it stays
      Investigation showed that the difference is a direct show in screen edge
      case and a delayed show in Alt+Tab case. Futher investigation shows that
      an invalid geometry gets requested in the broken case. While this might
      indicate an issue in another area it makes sense to protect KWin
      internally against it and not to break rendering.
      Thus this change ensures that a valid FBO does not get replaced by an
      invalid sized FBO.
      Test Plan:
      Tested that Alt+Tab works correctly when triggered through
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D5438
  15. 07 Feb, 2017 1 commit
  16. 28 Oct, 2016 2 commits
  17. 26 Aug, 2016 1 commit
    • Martin Flöser's avatar
      [plugins/qpa] Call makeCurrent on the QOpenGLContext instead of the one in the platform context · 8909f878
      Martin Flöser authored
      SharingPlatformContext::swapBuffers needs to make the context current.
      For this is calls makeCurrent. Later on this tries to bind a fbo, which
      checks calls into the current QOpenGLContext. As we called makeCurrent on
      our own platform context Qt doesn't know that the context is current and
      returns in the worst case a nullptr and crashes.
      This change calls makeCurrent on the QOpenGLContext so that Qt also knows
      that this context is current now. The QOpenGLContext calls makeCurrent on
      the platform context, so what our code tried to do is still being done.
      In addition the method context() in AbstractPlatformContext is renamed to
      eglContext to no longer shadow the method in QPlatformContext.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2582
  18. 08 Aug, 2016 1 commit
  19. 20 Jul, 2016 1 commit
    • Martin Flöser's avatar
      [plugins/qpa] Support SharingPlatformContext on the existing eglSurface and eglconfig · 44843f46
      Martin Flöser authored
      So far SharingPlatformContext was only used if the OpenGL context
      supports EGL_KHR_surfaceless_context. If not supported, KWin tried to
      create a context through the Wayland API. Unfortunately on hwcomposer
      platform this results in a crash as libhybris only supports the init
      of EGLDisplay for one native platform.
      This change tries to also use the SharingPlatformContext if there is
      an OpenGL context in general. It reuses the native EGLSurface created
      for the compositing scene and makes its own OpenGL context current on
      that surface, too. As KWin creates an FBO, it never renders to it, so
      it shouldn't matter at all.
      In order to prevent EGL_BAD_MATCH errors when making Qt's OpenGL context
      current also the EGLConfig from the scene is used to create the context.
      Test Plan: Tested on Nexus5 with qtvirtualkeyboard in KWin
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2231
  20. 19 Jul, 2016 1 commit
  21. 18 Jul, 2016 2 commits
  22. 02 Jun, 2016 2 commits
    • Martin Flöser's avatar
      [plugins/qpa] Handle case that qtvirtualkeyboard plugin is not available more gracefully · 5344bf16
      Martin Flöser authored
      We didn't check whether creating the QPlatfromInputContext worked and
      accessed the m_inputContext unconditionally which obviously crashed.
      Now the connects related to QInputMethods are not setup if we failed
      to create the QPlatfromInputContext.
      Reviewed-By: bshah
    • Martin Flöser's avatar
      Integrate QtVirtualKeyboard into KWin/Wayland · f26f2fe1
      Martin Flöser authored
      The idea is to have KWin provide a virtual keyboard. To support this
      KWin uses the QT_IM_MODULE qtvirtualkeyboard and makes sure that the
      QPA plugin loads it.
      KWin has a new class VirtualKeyboard which acts as the focus object and
      the "proxy" for input methods. The QPA plugin ensures that this is the
      focusObject, so that all input method related events are sent to this
      class. From there it will be possible to delegate to other applications
      through the Wayland interfaces.
      Reviewers: #plasma
      Subscribers: plasma-devel
      Tags: #plasma
      Differential Revision: https://phabricator.kde.org/D1638
  23. 17 May, 2016 1 commit
  24. 07 Apr, 2016 2 commits
  25. 16 Mar, 2016 1 commit
  26. 11 Mar, 2016 1 commit
  27. 10 Mar, 2016 1 commit
    • Martin Flöser's avatar
      [plugins/qpa] Add a dummy screen on startup · 51ee5142
      Martin Flöser authored
      Qt has problems initializing everything correctly if there is no screen
      at startup. E.g. the breeze widget style tries to initialize some pixmaps
      and this fails. In worst case hitting asserts in Qt (debug build).
      This change creates a dummy screen which gets destroyed as soon as there
      is a real screen.
      Reviewed-By: notmart and sebas
  28. 09 Mar, 2016 1 commit
  29. 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.
  30. 09 Feb, 2016 1 commit
  31. 18 Dec, 2015 1 commit
  32. 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
  33. 16 Nov, 2015 1 commit