1. 14 Sep, 2019 1 commit
  2. 22 Jun, 2019 1 commit
  3. 08 May, 2019 1 commit
    • Roman Gilg's avatar
      Implement wl_surface::damage_buffer · b71e1035
      Roman Gilg authored
      Summary:
      Missing from our surface handling was the damage_buffer call introduced in
      version 4 of the wl_compositor interface.
      
      Its only difference to a normal damage call is that the damaged region is
      supposed to be defined by the client in buffer coordinates instead of
      surface coordinates. This damage must be tracked separately in KWayland
      and on commit with the buffer transformation united with the normal damage.
      
      Test Plan: Autotest updated.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D15910
      b71e1035
  4. 02 May, 2019 1 commit
  5. 14 Feb, 2019 1 commit
  6. 22 Jan, 2019 1 commit
    • Marco Martin's avatar
      Add rows info to the plasma virtual desktop protocol · d1e8b45d
      Marco Martin authored
      Summary:
      in order for the pager to work correctly and not having to use a weird mix of wayland and dbus apis, the rows
      number needs to be in the protocol
      
      Test Plan: new passing autotest
      
      Reviewers: #plasma, #kwin, davidedmundson
      
      Reviewed By: #plasma, #kwin, davidedmundson
      
      Subscribers: zzag, davidedmundson, hein, kde-frameworks-devel
      
      Tags: #frameworks
      
      Maniphest Tasks: T4457
      
      Differential Revision: https://phabricator.kde.org/D17691
      d1e8b45d
  7. 21 Dec, 2018 1 commit
    • David Edmundson's avatar
      Xdg Decoration Support · 46390781
      David Edmundson authored
      Summary:
      Usual massive boilerplate.
      
      Should allow us to remove the injection in our QPT, as Qt 5.12 implements
      this protocol directly. Will probably be relevant for other toolkits as
      it's more standardised than our custom one.
      
      Client is mostly 1:1 with the protocol, server side has some tweaking to
      fit with kwayland turning an event based API into a state based one.
      
      Test Plan:
      Relevant unit test
      Tried in modified kwin with our QPT disabled
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D17498
      46390781
  8. 20 Nov, 2018 1 commit
  9. 01 Nov, 2018 1 commit
    • Marco Martin's avatar
      Add KWayland virtual desktop protocol · d0db5da5
      Marco Martin authored
      Summary:
      Implement the virtual desktop protocol discussed in
      T4457 xml protocol, client and server part.
      
      The PlasmaVirtualDesktopManagement interface manages the desktops
      instantiation and layout, each desktop is a PlasmaVirtualDesktop
      instance which contains unique id, name and position.
      
      PlasmaWindow has new events: plasmaVirtualDesktopEntered
      and plasmaVirtualDesktopLeft when a window enters or leaves a desktop,
      and desktops as the list of desktops is in. A window can be on
      any subset of desktops, if the list is empty, it's considered on all desktops.
      
      Test Plan: Autotest
      
      Reviewers: #kwin, #plasma, graesslin, hein, davidedmundson
      
      Reviewed By: #kwin, #plasma, davidedmundson
      
      Subscribers: davidedmundson, zzag, bshah, romangg, kde-frameworks-devel
      
      Tags: #frameworks
      
      Maniphest Tasks: T4457
      
      Differential Revision: https://phabricator.kde.org/D12820
      d0db5da5
  10. 05 Aug, 2018 1 commit
    • David Edmundson's avatar
      OutputManagement fractional scaling · c981d540
      David Edmundson authored
      Summary:
      In order to have fractional scaling in kwin, we need to communicate it with
      kscreen, which means changing the data type in our config protocols.
      
      This introduces a new method on outputdevice and outputconfiguration
      to set/request scale as a float.
      
      wl_output is and should remain unchanged as an int
      
      No urgent rush for reviewing/merging this as it's useless without other changes.
      
      Test Plan: Attached unit tests
      
      Reviewers: #kwin, romangg
      
      Subscribers: romangg, zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D13601
      c981d540
  11. 16 Jul, 2018 2 commits
    • David Edmundson's avatar
      Add XDG WM Base support to our XDGShell API · 59259d8d
      David Edmundson authored
      Summary:
      This adds XDG WM Base (essentially XDG Shell v7/stable edition) into our
      existing XDGShell classes which wrap v5, v6 and now this.
      
      It's mostly copy and paste from V6 except for the enum types for gravity
      and anchor edges on positioners.
      
      There's been no attempt to share code with V6 as realistically that
      won't get updates whereas XDGWMBase will; and at some point we will
      want to drop V6 without things being too tangled.
      
      Test Plan:
      Same test suite as V6 has
      
      Compiled GTK master and ran against suitably modified kwin
      running WAYLAND_DEBUG=1 gtk-demo showed we were using this interface
      Everything worked as well as V6 does.
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: romangg, zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D13510
      59259d8d
    • David Edmundson's avatar
      Make XDGShellV5 co-compilable with XDGWMBase · 63bd1f44
      David Edmundson authored
      Summary:
      When we add WMBase (the new name stable XdgShell)  we get a clash with
      XDGShellV5. This clash consists of all functions in the generated C file
      which clashes at linker time, as well as multiple xdg_blah_interface
      structs which would get redefined.
      
      XDGShellV5 in practice is used by literally no-one (Qt never defaulted
      to it if wl-shell was available) and has been dropped from GTK when
      they added v6. But it's used by some kwin unit tests so breaking
      would cause issues for stable kwin release tests... so it's a pain.
      
      We can't mod the XML as we need the strings sent down the wire to remain
      the same and we need the same names for our forward declared structs
      that the client code can cast to.
      
      This patch copies the generated files and modifies them manually.
      Hacky, but we know this code will never change again - and IMHO this
      task isn't one worth investing too much time into.
      
      Test Plan:
      Finished my XDG WM Base patch (see next phab) and things compile \o/
      
      Unit test still passes
      
      Ran: QT_WAYLAND_SHELL_INTEGRATION=xdg-shell-v5 dolphin --platform wayland and verified it worked
      
      Reviewers: #plasma, romangg
      
      Reviewed By: #plasma, romangg
      
      Subscribers: romangg, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D13488
      63bd1f44
  12. 22 May, 2018 1 commit
    • Scott Harvey's avatar
      Add "SkipSwitcher" to API · 10b00a21
      Scott Harvey authored
      Summary:
      Adding "SkipSwitcher" to API, as a result of discussion in
      BUG 375921
      
      Depends on / related to D11924 and D11926.
      
      Reviewers: hein, graesslin
      
      Reviewed By: graesslin
      
      Subscribers: kde-frameworks-devel, lbeltrame, rikmills, davidedmundson, #plasma, graesslin
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D11925
      10b00a21
  13. 15 May, 2018 1 commit
    • David Edmundson's avatar
      Add XDG Output Protocol · 4705c38f
      David Edmundson authored
      Summary:
      Done primarily for XWayland which for legacy reasons doesn't assume the
      logical size of a display is pixelSize / outputScale. Meaning xwayland
      windows that position themselves are wrong in a scaled environment.
      
      It also allows the possibility for us to support fractional scaling
      whilst keeping wl_output::scale as an integer.
      
      The protocol is a bit odd as it operates via the FooManager + Foo
      pattern rather than using globals like Output so I've wrapped it so it
      behaves more like globals.
      
      Test Plan: #plasma
      
      Reviewers: romangg
      
      Subscribers: #frameworks
      
      Tags: #frameworks
      
      Maniphest Tasks: T8501
      
      Differential Revision: https://phabricator.kde.org/D12235
      4705c38f
  14. 25 Mar, 2018 1 commit
    • Oleg Chernovskiy's avatar
      Add Remote Access interface to KWayland · 5116fe0c
      Oleg Chernovskiy authored
      Summary:
      This commit adds an interface bridge from KWin to KRfb. The purpose of
      this protocol is to pass a GBM fd of currently displayed buffer from
      KWin. The buffer is expected to be fully drawn once it is passed.
      
      Related to D1230
      
      Test Plan:
      ********* Start testing of RemoteAccessTest *********
      Config: Using QtTest library 5.6.0, Qt 5.6.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 6.1.1 20160501)
      PASS   : RemoteAccessTest::initTestCase()
      QDEBUG : RemoteAccessTest::testSendReleaseSingle() kwayland-client: Connected to Wayland server at: "kwayland-test-remote-access-0"
      QDEBUG : RemoteAccessTest::testSendReleaseSingle() kwayland-client: Wayland Interface:  wl_shm / 1 / 1
      QDEBUG : RemoteAccessTest::testSendReleaseSingle() kwayland-client: Wayland Interface:  org_kde_kwin_remote_access_manager / 2 / 1
      QDEBUG : RemoteAccessTest::testSendReleaseSingle() kwayland-server: Server buffer sent: fd 15
      QDEBUG : RemoteAccessTest::testSendReleaseSingle() kwayland-client: Got buffer, server fd: 15
      QDEBUG : RemoteAccessTest::testSendReleaseSingle() kwayland-server: Remote buffer returned, client 4 , id 0 , fd 15
      QDEBUG : RemoteAccessTest::testSendReleaseSingle() kwayland-server: Buffer released, fd 15
      QDEBUG : RemoteAccessTest::testSendReleaseSingle() kwayland-client: Buffer released
      PASS   : RemoteAccessTest::testSendReleaseSingle()
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-client: Connected to Wayland server at: "kwayland-test-remote-access-0"
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-client: Wayland Interface:  wl_shm / 1 / 1
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-client: Wayland Interface:  org_kde_kwin_remote_access_manager / 2 / 1
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-server: Server buffer sent: fd 15
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-client: Got buffer, server fd: 15
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-client: Got buffer, server fd: 15
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-server: Remote buffer returned, client 4 , id 0 , fd 15
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-server: Remote buffer returned, client 5 , id 0 , fd 15
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-server: Buffer released, fd 15
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-client: Buffer released
      QDEBUG : RemoteAccessTest::testSendReleaseMultiple() kwayland-client: Buffer released
      PASS   : RemoteAccessTest::testSendReleaseMultiple()
      QDEBUG : RemoteAccessTest::testSendClientGone() kwayland-client: Connected to Wayland server at: "kwayland-test-remote-access-0"
      QDEBUG : RemoteAccessTest::testSendClientGone() kwayland-client: Wayland Interface:  wl_shm / 1 / 1
      QDEBUG : RemoteAccessTest::testSendClientGone() kwayland-client: Wayland Interface:  org_kde_kwin_remote_access_manager / 2 / 1
      QDEBUG : RemoteAccessTest::testSendClientGone() kwayland-server: Server buffer sent: fd 15
      QDEBUG : RemoteAccessTest::testSendClientGone() kwayland-server: Buffer released, fd 15
      PASS   : RemoteAccessTest::testSendClientGone()
      QDEBUG : RemoteAccessTest::testSendReceiveClientGone() kwayland-client: Connected to Wayland server at: "kwayland-test-remote-access-0"
      QDEBUG : RemoteAccessTest::testSendReceiveClientGone() kwayland-client: Wayland Interface:  wl_shm / 1 / 1
      QDEBUG : RemoteAccessTest::testSendReceiveClientGone() kwayland-client: Wayland Interface:  org_kde_kwin_remote_access_manager / 2 / 1
      QDEBUG : RemoteAccessTest::testSendReceiveClientGone() kwayland-server: Server buffer sent: fd 15
      QDEBUG : RemoteAccessTest::testSendReceiveClientGone() kwayland-client: Got buffer, server fd: 15
      QDEBUG : RemoteAccessTest::testSendReceiveClientGone() kwayland-client: Buffer released
      QDEBUG : RemoteAccessTest::testSendReceiveClientGone() kwayland-server: Buffer released, fd 15
      PASS   : RemoteAccessTest::testSendReceiveClientGone()
      PASS   : RemoteAccessTest::cleanupTestCase()
      Totals: 6 passed, 0 failed, 0 skipped, 0 blacklisted
      ********* Finished testing of RemoteAccessTest *********
      
      Reviewers: graesslin, davidedmundson, romangg
      
      Reviewed By: davidedmundson, romangg
      
      Subscribers: jtamate, jgrulich, romangg, ngraham, alexeymin, #frameworks, davidedmundson, plasma-devel
      
      Tags: #plasma_on_wayland, #frameworks
      
      Maniphest Tasks: T5653, T7785
      
      Differential Revision: https://phabricator.kde.org/D1231
      5116fe0c
  15. 04 Mar, 2018 1 commit
    • Martin Flöser's avatar
      [server] Add support for the frame semantics of Pointer version 5 · b6bd28ab
      Martin Flöser authored
      Summary:
      This change implements the required changes for wl_seat version 5.
      There seem to be applications which require version 5 and refuse to
      start if the server doesn't provide it. Thus we need to provide it.
      
      The main difference with version 5 is that pointer need to send a
      frame event after each logical group of events. As we don't support the
      new events from version 5 yet, we just emit the frame after each event
      and implement the suggested semantics for the enter/leave behavior.
      
      To really make use of this, we will have to implement additions in the
      API and then in KWin to expose the new API elements. But to just support
      the semantics we don't need it.
      
      BUG: 389189
      FIXED-IN: 5.45
      
      Test Plan: Extended autotest
      
      Reviewers: #kwin, #plasma, #frameworks
      
      Subscribers: plasma-devel
      
      Tags: #frameworks, #plasma
      
      Differential Revision: https://phabricator.kde.org/D10235
      b6bd28ab
  16. 01 Mar, 2018 1 commit
    • Oleg Chernovskiy's avatar
      Implement releasing of client-freed output · 08e7b23c
      Oleg Chernovskiy authored
      Summary:
      Previously KWin supported only version 2 of wl_output interface
      In third version there was an important addition that allowed clients to
      unbind outputs they may previously have bound.
      
      Bumping versions in both client and server part of KWayland to support
      this behaviour.
      
      Reviewers: davidedmundson, graesslin
      
      Reviewed By: graesslin
      
      Subscribers: jgrulich, #frameworks
      
      Tags: #frameworks
      
      Maniphest Tasks: T7785
      
      Differential Revision: https://phabricator.kde.org/D10929
      08e7b23c
  17. 03 Jan, 2018 1 commit
    • David Edmundson's avatar
      Create interface for passing server decoration palettes · dec26d93
      David Edmundson authored
      Summary:
      It's kept separate in case we ever merge the server decoration manager
      interface upstream, and this is too kwin specific to have in a
      potentially shared spec.
      
      Code is a copy+paste of existing boilerplate.
      
      Replaces use of the deprecated qt extended surface.
      
      I'd like to target 5.42 as otherwise we'll have a regression when we
      release Plasma 5.12 as Qt's XDGv6 doesn't have a working qt extended
      surface.
      
      Test Plan: Attached unit test
      
      Reviewers: #plasma, graesslin
      
      Reviewed By: #plasma, graesslin
      
      Subscribers: plasma-devel, #frameworks
      
      Tags: #frameworks, #plasma
      
      Differential Revision: https://phabricator.kde.org/D9599
      dec26d93
  18. 26 Dec, 2017 1 commit
    • Martin Flöser's avatar
      Add support for version 3 of data device manager interface · a715a6cd
      Martin Flöser authored
      Summary:
      The main difference compared to version 2 is additional drag and drop
      actions. The source and destination can negotiate whether the data
      should be copied or moved or the user should be asked for either or.
      This seems to be important for GTK, but is not yet implemented in Qt.
      
      The main motivation for adding support is that it is required by SDL to
      launch on Wayland.
      
      BUG: 386993
      
      Test Plan: Extended test case, sdl apps now start
      
      Reviewers: #frameworks, #plasma, #kwin
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D9136
      a715a6cd
  19. 18 Dec, 2017 1 commit
    • David Edmundson's avatar
      Add explicit AppMenu protocol · a0180f38
      David Edmundson authored
      Summary:
      A protocol that attaches to a surface and contains two strings which can
      change.
      
      The intended use is for clients to link a DBus Appmenu object with a
      surface.
      
      This is in preparation for the Qt Extended Surface deprecation which
      currently handles this in Kwin.
      
      Test Plan: Attached unit test
      
      Reviewers: #plasma, graesslin
      
      Reviewed By: #plasma, graesslin
      
      Subscribers: broulik, graesslin, plasma-devel, #frameworks
      
      Tags: #frameworks, #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D8919
      a0180f38
  20. 16 Nov, 2017 1 commit
    • Martin Flöser's avatar
      Add support for zwp_idle_inhibit_manager_v1 · 9520c2f2
      Martin Flöser authored
      Summary:
      This protocol allows to indicate that a wl_surface should inhibit idle
      actions such as DPMS, screen locking if the surface is visible.
      
      The protocol is quite simple: it just creates an IdleInhibitor for a
      Surface. If such an IdleInhibitor exists the Surface is considered to
      inhibit idle.
      
      On the server side it is also exposed like that through the API. The
      IdleInhibitorInterface is private to the library and only
      SurfaceInterface is extended to expose whether it currently inhibits
      idle.
      
      CCBUG: 385956
      
      Test Plan: New test case added
      
      Reviewers: #frameworks, #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D8396
      9520c2f2
  21. 13 Oct, 2017 1 commit
    • Marco Martin's avatar
      Wayland foreign protocol · ce2ff96c
      Marco Martin authored
      Summary:
      Implement the "foreign" wayland protocol.
      A client can export a surface with an unique string as handle,
      then another client can refer to that surface and set an own surface as
      child of that surface.
      Potential use cases are out-of-process dialogs, such as file dialogs,
      meant to be used by sandboxed processes that may not have the access
      it needs to implement such dialogs.
      The handle needs to be shared between the processes with other means,
      such as dbus or command line paramenters.
      
      The public api of the server side only tracks parent/child relationships as this is the only data kwin would need it for, the rest of the api is not exported so should be safer from eventual protocol changes
      
      Test Plan:
      the autotest works, but has a lot of random crashes when deleting surfaces,
      unfortunately backtraces don't tell much and the crashes never occur when running into valgrind
      behavior may still be wrong, depending on how the protocol is supposed
      to work if more clients try to set the same exported surface as parent
      
      Reviewers: #plasma, #kwin, davidedmundson, graesslin
      
      Reviewed By: #plasma, #kwin, graesslin
      
      Subscribers: davidedmundson, graesslin, plasma-devel, #frameworks
      
      Tags: #frameworks, #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D7369
      ce2ff96c
  22. 04 Sep, 2017 1 commit
    • David Edmundson's avatar
      Support XDG v6 · d4c82b60
      David Edmundson authored
      Summary:
      
      The main clever part that's not just boring boiler plate is how we
      handle the structure change
      A surface now has an XDGSurface which then has a an Xdg TopLevel or a
      Xdg Popup
      
      We need to fit this into the public API which assumes a surface has a
      Surface or a Popup.
      The old Surface is similar to the new TopLevel.
      
      The shoehorning works by relying on the fact that a surface without a
      role is pretty useless.
      
      Clients create the surface implicitly with the toplevel or implicitly
      with the popup.
      The server only announced it has a new "XdgSurface" when it gets a new
      zxdg_surface_get_toplevel.
      
      ----
      
      Popup decisions:
      - On popup creation the server should copy the current info from the
      positioner and then it gets deleted. Given kwaylands job is to keep
      state, we expose all these parameter via popup.
      
      - Due to this positioner is not exposed as a resource anywhere.
      
      - Server API is 100% backwards compatiable.
      i.e new code will work identically with v5 clients.
      
      - Client API is not.  Grabs are called separately from the constructor,
      and the parent surface changed to an xdgsurface, not a raw surface.
      V5 code still works as-is, just not with the new constructors.
      
      It seemed better to match the v6 (and what will be the stable v7) than
      to try and do hacks and lose functionality.
      Given the client needs to change the code to opt into V6 anyway. I don't
      think this is a huge problem.
      
      Test Plan: Current test still passes.
      
      Reviewers: #plasma, graesslin
      
      Reviewed By: #plasma, graesslin
      
      Subscribers: graesslin, mart, plasma-devel, #frameworks
      
      Tags: #frameworks, #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D6047
      d4c82b60
  23. 18 Aug, 2017 1 commit
  24. 28 Jul, 2017 1 commit
  25. 24 Nov, 2016 1 commit
    • Martin Flöser's avatar
      Implementation of PointerConstraints protcol · a6825301
      Martin Flöser authored
      Summary:
      The pointer constraints protocol is an unstable protocol and thus
      the implementation follows the semantics of unstable protocols.
      
      The protocol allows to create a constraint on the pointer - either a
      lock or a confinement on a surface. Those are not activated at once, but
      when the compositor actively grants it.
      
      During lock no further pointer motion is emitted, during confinement the
      pointer is kept in a certain area.
      
      This implements T4451.
      
      Reviewers: #plasma_on_wayland
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D3466
      a6825301
  26. 07 Nov, 2016 1 commit
    • Martin Flöser's avatar
      Implementation of PointerGestures protocol · 75acb783
      Martin Flöser authored
      Summary:
      Pointer gestures are created for a pointer and there are two types of
      gestures: swipe and pinch.
      
      At a given time there can only be one active gesture. The implementation
      in SeatInterface ensures that there can only be one active gesture.
      
      Each gesture consists of a start event, 0 to multiple update events and
      an end event. The end can also be a cancel. To better support this the
      implementation doesn't follow the protocol and splits end and cancel
      into dedicated methods in the server side and into dedicated signals in
      the client side.
      
      Reviewers: #plasma_on_wayland
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D3169
      75acb783
  27. 17 Oct, 2016 2 commits
    • Martin Flöser's avatar
      Add auto-hiding panel support to PlasmaShellSurface interface · e772a3e9
      Martin Flöser authored
      Summary:
      This change adds support for auto-hiding panels. A PlasmaShellSurface
      with Role Panel and PanelBehavior AutoHide can request to get
      auto-hidden at a screen edge. The compositor will then not show the
      surface although it is still mapped and will show it again once the
      screen edge gets triggered.
      
      The interface is extended by one new request to allow the client to
      request the hiding of the surface. In addition two events are added to
      inform the client when the surface got hidden and when it got shown
      again.
      
      Reviewers: #plasma_on_wayland
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D3007
      e772a3e9
    • Martin Flöser's avatar
      Support passing generic QIcon through PlasmaWindow interface · bd2b9665
      Martin Flöser authored
      Summary:
      Especially for Xwayland windows the compositor might not have a themed
      icon name. Resulting in a task manager not having dedicated icons for
      Xwayland windows.
      
      This change deprecates the way how a compositor is supposed to set the
      window icon. Instead of passing the themed icon name, it is now supposed to
      pass the QIcon. In case it's a themed icon the existing way to pass to
      the client is used.
      
      Otherwise a new event is used to inform the client that there is an icon
      - no data is transmitted at this point. The client can then create a
      file descriptor and pass it to the compositor. The compositor serializes
      the icon into the file descriptor and the client can read from it. This
      all happens transparently on client side there is no api change at all.
      
      The writing and reading of the icon is done in a thread. Due to that
      Qt5::Concurrent is now a required dependency instead of an optional
      dependency.
      
      Reviewers: #plasma_on_wayland, hein
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D3049
      bd2b9665
  28. 11 Oct, 2016 1 commit
    • Martin Flöser's avatar
      Implement support for the relative pointer protocol · 6dd6729f
      Martin Flöser authored
      Summary:
      This change implements the zwp_relative_pointer_v1 protocol which allows
      to send relative motion events.
      
      The (unstable) protocol consists of a RelativePointerManager which
      creates RelativePointers for a given Pointer. This interface currently
      only has one event to report the relative motion. It carries the delta,
      the non-accelerated-delta and a timestamp in microsends granularity.
      
      On the server side the implementation is mostly internal. Once a
      RelativePointerManagerInterface is created one can send relative motion
      events through the SeatInterface. The SeatInterface takes care of
      sending it to the responding RelativePointerInterface. The protocol does
      not restrict the sending of "normal" and relative motion events. Thus it
      can be combined in any way one wants. This allows to have a rather
      simple implementation. A user of the SeatInterface can just start to
      feed the relative motion events (if the information is available) to the
      SeatInterface together with the pointer events.
      
      On client side a new RelativePointerManager and RelativePointer class
      are added. The RelativePointerManager creates the RelativePointer for a
      given Pointer. The event sent to RelativePointer is transformed in a
      normal signal.
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D2978
      6dd6729f
  29. 15 Jul, 2016 1 commit
  30. 13 Jul, 2016 1 commit
    • Martin Flöser's avatar
      Add support for xdg-shell · b0acd7ad
      Martin Flöser authored
      Summary:
      This change introduces support for the unstable xdg-shell interface in
      the server. The implementation is based on version 5 of the unstable
      interface. This is the version used by toolkits like e.g. GTK.
      
      There is also a version 6 of the protocol under development which is
      incompatible. This makes it difficult to implement it in a backward
      compatible way.
      
      Because of that the implementation is a little bit different to other
      interfaces and inspired by the TextInput interfaces:
      On client side an XdgShell class is exposed which does not represent
      it directly. Instead it delegates everything to an XdgShellUnstableV5
      implementation. For the Surface/Popup the same is done.
      
      In the Registry it's possible to create an XdgShell and it accepts
      the XdgShellUnstableV5 and in future will accept XdgUnstableV6, etc.
      
      On server side it also follows the approach from TextInput. That is
      there is a version enum which gets passed to the factory method in
      Display. It currently supports only V5, but in future can be extended
      for V6. As there is lots of similar code between wl_shell, xdg_shell
      and in future xdg_shell_unstable_v6 a templated GenericShellInterface
      class is added which combines the common parts.
      
      Reviewers: #plasma_on_wayland
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D2102
      b0acd7ad
  31. 29 Jun, 2016 1 commit
    • Martin Flöser's avatar
      Add a parent_window event to Plasma Window interface · 1837b8d4
      Martin Flöser authored
      Summary:
      This change adds a parent_window event to Plasma Window. From server
      side it's possible to specify that a window is a transient for another
      window - that is it has a parent window.
      
      On client side this is exposed respectively with a new change signal.
      
      Reviewers: #plasma_on_wayland, hein
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1779
      1837b8d4
  32. 27 Jun, 2016 1 commit
  33. 14 Jun, 2016 1 commit
  34. 31 May, 2016 1 commit
  35. 25 May, 2016 1 commit
    • Martin Flöser's avatar
      Implement wl_text_input and zwp_text_input_v2 interfaces · 905e6996
      Martin Flöser authored
      Summary:
      This change introduces support for text input. Text input allows to
      compose text on the server (e.g. through a virtual keyboard) and sent
      the composed text to the client.
      
      There are multiple interfaces for text input. QtWayland 5.6 uses
      wl_text_input, QtWayland 5.7 uses zwp_text_input_v2.
      
      wl_text_input is from pre Wayland-Protocols times and considered as
      UnstableV0 in this implementation. The other interface is UnstableV2.
      Unfortunately the V2 variant is not yet part of Wayland-Protocols, but
      used in Qt.
      
      The implementation hides the different interfaces as good as possible.
      The general idea is the same, the differences are rather minor.
      
      This means changes to how interfaces are wrapped normally. On client
      side in the Registry a manager is factored which represent either of
      the two interfaces. Similar on the server side Display's factory method
      takes an argument to decide which interface should be factored. This
      way a user of the library can expose both interfaces and thus be
      compatible with Qt 5.6 and Qt 5.7 onwards.
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1631
      905e6996
  36. 12 May, 2016 1 commit
    • Martin Flöser's avatar
      Improve the deconstruction of PlasmaWindows · 866aea1a
      Martin Flöser authored
      Summary:
      The protocol is extended by a dedicated destructor request. When a
      PlasmaWindow is umapped we no longer destroy the resource directly,
      but only send the unmap. The client is then supposed to clean up
      (which it already did in that case) and will invoke the destructor.
      
      The PlasmaWindowInterface object will be automatically deleted after
      the unmap once all resources bound for it are destroyed.
      
      The tests are extended by two new test cases which triggered protocol
      errors on the client side prior to this change.
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Projects: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1594
      866aea1a
  37. 15 Apr, 2016 1 commit
  38. 17 Dec, 2015 1 commit