1. 17 Mar, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Fix compiler warnings · cca0e15b
      Aleix Pol Gonzalez authored
      Summary: No need to keep them around for no reason.
      
      Test Plan: Tested the plugins I thought could be affected. Have been using it for a couple of days without problems
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D28062
      cca0e15b
  2. 04 Mar, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Use AbstractClient instead of XdgShellClient wherever possible · be759b7d
      Vlad Zahorodnii authored
      Summary:
      Currently, we have only one shell client type - XdgShellClient. We use
      it when we are dealing with Wayland clients. But it isn't really a good
      idea because we may need to support shell surfaces other than xdg-shell
      ones, for example input panel surfaces.
      
      In order to make kwin more extensible, this change replaces all usages
      of the XdgShellClient class with the AbstractClient class.
      
      Test Plan: Existing tests pass.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27778
      be759b7d
  3. 13 Dec, 2019 1 commit
  4. 10 Dec, 2019 1 commit
  5. 25 Sep, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Rename Client to X11Client · ffcbe24e
      Vlad Zahorodnii authored
      Summary:
      Currently each managed X11 client is represented with an instance of
      Client class, however the name of that class is very generic and the
      only reason why it's called that way is because historically kwin
      was created as an x11 window manager, so "Client" was a sensible choice.
      
      With introduction of wayland support, things had changed and therefore
      Client needs to be renamed to X11Client in order to better reflect what
      that class stands for.
      
      Renaming of Client to X11Client was agreed upon during the last KWin
      sprint.
      
      Test Plan: Compiles, the test suite is still green.
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: romangg, davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24184
      ffcbe24e
  6. 23 Sep, 2019 2 commits
    • Vlad Zahorodnii's avatar
      Rename ShellClient to XdgShellClient · 168ea988
      Vlad Zahorodnii authored
      Summary:
      Rename ShellClient to XdgShellClient in order to reflect that it
      represents only xdg-shell clients.
      
      Test Plan: Compiles, tests still pass.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23589
      168ea988
    • 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
  7. 11 Aug, 2019 1 commit
  8. 02 May, 2019 1 commit
  9. 17 Sep, 2018 1 commit
  10. 04 Feb, 2018 1 commit
    • Martin Flöser's avatar
      Require libinput and udev · bbf00fdd
      Martin Flöser authored
      Summary:
      The main reason for not having it as a mandatory dependency was that BSD
      doesn't support it. But as I learned recently it is available on our CI
      system. So BSDs have support now.
      
      Even more it showed that the code doesn't compile if the dependency is
      missing. And there's one thing I hate: broken build configuration
      options.
      
      So let's make UDEV and libinput a required dependency and get rid of the
      problems.
      
      Test Plan: Compiles
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D10057
      bbf00fdd
  11. 09 Jan, 2018 1 commit
  12. 12 Sep, 2017 1 commit
    • Martin Flöser's avatar
      Add virtual method to Scene to get the EGL/GLX extensions · 8015e4e8
      Martin Flöser authored
      Summary:
      We had a few places (e.g. DebugConsole, Platform) where the Scene was
      cased into a SceneOpenGL to access the backend and get the extensions.
      
      This change simplifies that by adding a virtual method to Scene directly
      which is implemented in SceneOpenGL and returns the backend's
      extensions.
      
      Thus the casts to SceneOpenGL are no longer required.
      
      Test Plan:
      Opened debug console to verify extensions are listed,
      triggered Outline to verify the sharing QPA context gets created.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D7734
      8015e4e8
  13. 01 Jan, 2017 1 commit
  14. 23 Nov, 2016 1 commit
    • Hrvoje Senjan's avatar
      Compile++ · 6195ab26
      Hrvoje Senjan authored
      With older gcc at least there is a forward declaration error w/o explicit include.
      
      BUG: 372821
      Revewed-by: Martin Gräßlin
      6195ab26
  15. 17 Nov, 2016 2 commits
    • Martin Flöser's avatar
      Clean up egl/glx extensions in debug console · 56d9f905
      Martin Flöser authored
      Summary:
      As there is no difference between egl and glx extensions anymore inside
      KWin (both are provided through the OpenGLBackend) there is no need to
      have to group boxes and do a manual hide/show based on which platform is
      used.
      
      Instead there is now just one group box and it's called "Platform
      Extensions".
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3400
      56d9f905
    • Martin Flöser's avatar
      Move querying the egl extensions into the AbstractEglBackend · d1de6899
      Martin Flöser authored
      Summary:
      Instead of having the egl extensions in the global kwinglutils lib it
      becomes private to the AbstractEglBackend. Just like on glx the
      glxextensions are moved into the platform.
      
      The extensions are queried from initEglAPI, that is as early as possible
      after initializing the EGLDisplay. This ensures that any implementing
      subclass can access the extensions early enough.
      
      As a note: the EglOnXBackend had a potentially wrong sequence for
      initializing the buffer age extension. It is now moved to the correct
      place where the result is needed for the first time.
      
      From the global API eglExtensions are removed from hasGLExtension and
      the eglExtensions function is dropped. As by that initEGL did not do
      anything it is also dropped.
      
      Test Plan:
      Tested nested kwin on Wayland, still works, extensions shown
      in debug console
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3396
      d1de6899
  16. 16 Nov, 2016 3 commits
    • Martin Flöser's avatar
      Add a keyboard tab to the debug console · 327ccffc
      Martin Flöser authored
      Summary:
      A little bit debug information about the current keyboard state is
      useful. Thus a new tab is added to show information about xkbcommon.
      
      It shows:
      * layouts in the keymap
      * currently active layout
      * supported modifiers in key map
      * currently active modifiers in state
      * supported leds in key map
      * currently active leds in state
      
      Whenever a key is pressed/released the complete ui is updated to reflect
      the latest state. That is pressing/releasing a modifier is directly
      reflected in the ui.
      
      This UI can extended as needed for further debug information about the
      keymap state.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3379
      327ccffc
    • Martin Flöser's avatar
      Fix DebugConsole::initGLTab · 9e4a8582
      Martin Flöser authored
      The initGLTab used GLPlatform::instance to determine whether OpenGL is
      used. It assumed a nullptr would mean no GL. But GLPlatform is a
      singleton which does not follow KWin's internal semantics. If there is
      no instance it will be created. Thus it's never null.
      
      This caused a heap-buffer-overflow as recorded by build.kde.org in case
      one just casts the scene pointer to SceneOpenGL.
      
      With this change this is fixed and inited correctly by verifying through
      the EffectsHandler whether opengl is used.
      9e4a8582
    • Martin Flöser's avatar
      Move querying glx extensions into the platform plugin · 730fd05f
      Martin Flöser authored
      Summary:
      Glx extensions are only interesting to the glxbackend. Given that
      querying can be moved there.
      
      In order to simplify the extensions can be stored in the OpenGLBackend
      which also provides the convenience check as before.
      
      The egl platforms should also be adjusted to query in that way and
      remove it from the kwinglutils.
      
      There is still a usage of the glxextensions inside kwinglutils to
      resolve one function. That should also be moved into the platform.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3332
      730fd05f
  17. 12 Oct, 2016 1 commit
    • Martin Flöser's avatar
      Support for relative pointer motion events · cc2f4e32
      Martin Flöser authored
      Summary:
      If KWin interacts with Libinput the RelativePointerManager interface
      gets created on the Wayland server. The ForwardInputEventFilter does
      forward the relative motion events in addition to the normal motion
      events.
      
      In order to properly support the relative motion events as they are
      expected by the Wayland protocol the handling of pointer motion events
      got slightly adjusted:
      * Libinput Pointer event extended by the additional data points
      * Libinput Pointer event carries the delta as a QSizeF instead of
      QPointF
      * PointerInputRedirection adjusted to take a pointer motion event with
      more arguments
      * Custom QMouseEvent subclass adjusted to carry the additional members
      
      The DebugConsole is adjusted to show the relative motion events in
      addition to the global position.
      
      Test Plan:
      Verified the manager object is created and verified the
      events in DebugConsole. Unfortunately not aware of any test application.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2979
      cc2f4e32
  18. 05 Oct, 2016 1 commit
    • Martin Flöser's avatar
      Destroy DebugConsole on hide of QWindow · fd6e4bb0
      Martin Flöser authored
      Summary:
      The quit button in the DebugConsole is connected to deleteLater on the
      DebugConsole. This is to clean up resources like the input event filter
      which is rather expensive to have running.
      
      When closed through the window decoration the DebugConsole window only
      got hidden but not destroyed. Resulting in the input filter to continue
      processing.
      
      This change ensures that the DebugConsole gets properly destroyed once
      the window gets hidden.
      
      BUG: 369858
      FIXED-IN: 5.8.1
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2931
      fd6e4bb0
  19. 12 Sep, 2016 1 commit
    • Martin Flöser's avatar
      DebugConsole window does not take keyboard input · 3a3d1b6b
      Martin Flöser authored
      Summary:
      In order to add more tabs which can further help monitoring how KWin
      handles some aspects the DebugConsole is changed to not take keyboard
      input. This means it can only be navigated using pointer device or touch
      screen.
      
      This is needed for adding a new tab to monitor clipboard changes. On
      Wayland sometimes windows don't get the clipboard, so it would be
      helpful to have a debug monitor to see when the clipboard changes. But
      for that debug console window may not take keyboard events.
      
      To support this DebugConsole sets the WA_ShowWithoutActivating attribute
      which gets honored by the InternalWindowEventFilter and does not forward
      key events to such windows.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2620
      3a3d1b6b
  20. 10 Aug, 2016 1 commit
    • Martin Flöser's avatar
      Add an OpenGL information tab to Debug Console · dad7004d
      Martin Flöser authored
      Summary:
      The new tab shows the information from GLPlatform similar to how it is
      shown in the supportInformation. In addition it also lists all available
      openGL and EGL/GLX extensions. For that kwinglutils is extended by
      functions to return the lists of extensions.
      
      Reviewers: #kwin, #plasma, bshah
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2385
      dad7004d
  21. 08 Aug, 2016 1 commit
    • Martin Flöser's avatar
      [libinput] Add support for gesture events · 8a83a6fe
      Martin Flöser authored
      Summary:
      Gesture events are swipe or pinch events on a touch pad.
      
      This change implements basic support by:
       * wrapping them in LibInput::Event
       * processing them in LibInput::Connection and emitting
         dedicated signals
       * Forwarding them in InputRedirection to PointerInputRedirection
       * Support them in the internal input event filter
       * Printing debug information in DebugConsole
      
      Further handling is not yet done. In future the following should be
      implemented:
       * activating e.g. zoom and present windows on pinch/swipe gesture
       * forwarding non global gestures to KWayland
      
      Note that forwarding to KWayland is not yet useful as QtWayland does
      not yet have support for the unstable protocol. No Qt application could
      make use of it yet. So for the moment just global gestures is the best
      we can get.
      
      Test Plan: Looked at output of DebugConsole when triggering gestures
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2359
      8a83a6fe
  22. 30 May, 2016 2 commits
  23. 13 May, 2016 1 commit
    • Martin Flöser's avatar
      Don't reset InputDevicesModel when devices change · a3ca25ec
      Martin Flöser authored
      Summary:
      Instead of reset a proper beginInsertRows, beginRemoveRows is used.
      In addition changes in the device are also listened on and emit the
      proper dateChanged signal.
      
      Test Plan:
      Opened debug console, selected the touchpad device,
      toggled shortcut and verified that this updated the data column.
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Projects: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1547
      a3ca25ec
  24. 06 May, 2016 1 commit
    • Martin Flöser's avatar
      [libinput] Add a wrapper class Device for a libinput_device · 4d7134f6
      Martin Flöser authored
      Summary:
      The Device class wraps all the information we can get from libinput
      about the device, like whether it's a keyboard, pointer, touch, etc.
      
      In addition some more information is queried to figure out how "useful"
      a device is. For a keyboard all alphanumeric keys are checked whether
      they exist, for a pointer all (normal) buttons are queried.
      
      All the information is exposed as Q_PROPERTY and used by the
      DebugConsole. The DebugConsole gained a new tab "Input Devices" which
      renders all devices and their properties in a tree view. When plugging
      in/out a device, the model gets reset, so it's always up to date.
      
      The new Device class can be used in future to configure the device,
      e.g. disable touch pad, set mouse acceleration, etc.
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Projects: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1538
      4d7134f6
  25. 03 May, 2016 1 commit
  26. 31 Mar, 2016 1 commit
  27. 30 Mar, 2016 1 commit
  28. 23 Mar, 2016 1 commit
    • Martin Flöser's avatar
      Add a surface tree to DebugConsole · e62dad48
      Martin Flöser authored
      Summary:
      While developing support for sub-surfaces it became obvious that there
      is a need for visualizing the tree of sub-surfaces.
      
      The surface-tree is a new mode added in the debug console. There are now
      two buttons to switch between the default window tree and the surface
      tree.
      
      The surface tree is a little bit more basic than the windows tree. The
      type of window (whether x11, wayland or internal) is ignored. All windows
      build up the top level with the sub surfaces as children.
      
      Each surface is represented by some basic information about it:
      * Client (binary path and pid)
      * internal surface id
      
      If the surface has a shared memory buffer mapped a scaled down version
      is used as the window decoration role.
      
      The model gets reset whenever the tree changes in some way as it's
      rather complex to track correctly and well, it's just a debug console.
      
      Currently the tree is not really functional yet as KWin doesn't announce
      support for sub-compositor protocol, which is also the reason for lack of
      autotests for the model. Will be added once sub-compositor works
      properly.
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Projects: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1205
      e62dad48
  29. 16 Mar, 2016 1 commit
    • Martin Flöser's avatar
      Add a debugging console to KWin · 6a19f50c
      Martin Flöser authored
      Summary:
      The idea behind the debugging console is to have a feature comparable
      to xprop and xwininfo just for Wayland. We cannot have command line
      utils as that violates the security restrictions, thus it needs to be
      exposed directly in KWin.
      
      The debugging console is invoked through DBus:
      qdbus org.kde.KWin /KWin showDebugConsole
      
      This opens a window with a tree view. The DebugConsoleModel which is
      used by the tree view groups all windows into four categories:
      * x11 clients (that is Workspace::clientList() and Workspace::desktopList())
      * x11 unmanaged (Workspace::unmanagedList())
      * wayland shell clients (WaylandServer::clients())
      * wayland internal clients (KWin's own QWindows - WaylandServer::internalClients())
      
      Each window is a child to one of the four categories. Each window itself
      has all it's QProperties exposed as children.
      
      This allows to properly inspect KWin's internal knowledge for windows and
      should make it easier to investigate problems. E.g. what's a window's
      geometry, what's it's window type and so on.
      
      The debugging console is intended as a developer tool and not expected to
      be used by users. That's why it's invokation is rather hidden. Due to
      the fact that it's internal to KWin it results in:
      * no window decoration
      * stealing keyboard focus
      * no way to resize, close, move from KWin side
      * rendered above all other windows
      
      There is a dedicated close button to get rid of it again. While the
      console is shown it's hardly possible to interact with the system in
      a normal way anymore. This is something which might be improved in
      future.
      
      At the moment the model is able to update when windows are added/removed,
      but not yet when a property changes. Due to the lack of interaction with
      the existing system, that's not a high priority at the moment, but can
      be added in future.
      
      Reviewers: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1146
      6a19f50c