1. 11 Sep, 2018 1 commit
    • Roman Gilg's avatar
      [server] Fix remote access buffer handling when output not bound · 1faa629d
      Roman Gilg authored
      Summary:
      If a client has not bound a certain output do not directly return
      but try to deliver the buffer to other clients.
      
      If none of them has requested it, send bufferReleased signal
      immediately to let compositor know that the buffer should
      be cleaned up.
      
      Test Plan: Manually. Autotest planned.
      
      Reviewers: #kwin, #frameworks, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: jgrulich, davidedmundson, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D15422
      1faa629d
  2. 08 Sep, 2018 1 commit
  3. 07 Sep, 2018 1 commit
    • Vlad Zahorodnii's avatar
      [autotests] Compare booleans to booleans · 3c128a61
      Vlad Zahorodnii authored
      Summary:
      Compiler errors:
      
      17:06:23 /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/testDataDevice.dir/test_datadevice.cpp.o: in function `TestDataDevice::testDrag()':
      17:06:23 /home/jenkins/workspace/Frameworks kwayland kf5-qt5 SUSEQt5.9/autotests/client/test_datadevice.cpp:290: undefined reference to `bool QTest::qCompare<int, bool>(int const&, bool const&, char const*, char const*, char const*, int)'
      17:06:23 /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/testDataDevice.dir/test_datadevice.cpp.o: in function `TestDataDevice::testDragInternally()':
      17:06:23 /home/jenkins/workspace/Frameworks kwayland kf5-qt5 SUSEQt5.9/autotests/client/test_datadevice.cpp:369: undefined reference to `bool QTest::qCompare<int, bool>(int const&, bool const&, char const*, char const*, char const*, int)'
      
      Test Plan: Ran testDataDevice, still passes.
      
      Reviewers: #kwin, romangg, broulik
      
      Reviewed By: broulik
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D15330
      3c128a61
  4. 06 Sep, 2018 3 commits
    • Yuri Chornoivan's avatar
      Fix minor EBN issues · 588d62b4
      Yuri Chornoivan authored
      588d62b4
    • Roman Gilg's avatar
      [server] Do not try to create data offers without source · 698777a7
      Roman Gilg authored
      Summary: An internal drag is without data source. Still we tried to create offers.
      
      Test Plan: This change makes the updated autotest in D15072 pass without errors.
      
      Reviewers: #kwin, hein
      
      Reviewed By: hein
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D15074
      698777a7
    • Roman Gilg's avatar
      [server] Abort drag start on correct conditions and without posting error · 83d0c8d2
      Roman Gilg authored
      Summary:
      A drag start request should be dismissed when the client does not have an
      implicit pointer grab or the currently focused pointer surface is not the
      origin. The conditions for that were wrong in the past.
      
      Also just ignore the request and not post directly an error, that potentially
      kills the client since by concurrency the client might have send a valid
      request, that got invalidated through grab or focus change at the same time
      on the server side.
      
      Test Plan: Manually and autotest.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: adridg, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D15072
      83d0c8d2
  5. 31 Aug, 2018 1 commit
  6. 11 Aug, 2018 1 commit
  7. 08 Aug, 2018 2 commits
  8. 05 Aug, 2018 5 commits
    • David Edmundson's avatar
      Fix unit test · f1b98276
      David Edmundson authored
      We now have one extra method so we get one more change event so count in
      this test needs updating.
      
      Ideally we should only update once; this test was written hardcoding the
      values that currently happen rather than what should happen; but that's
      a commit for another day.
      f1b98276
    • Roman Gilg's avatar
      Output device color curves correction · 3d062790
      Roman Gilg authored and David Edmundson's avatar David Edmundson committed
      Summary:
      Extends the output device and output configuration interfaces with the
      ability
      to query and set the RGB color intensity curves (gamma ramps) of the
      associated output.
      
      Test Plan: Manually. Auto tests will be added to this diff soon.
      
      Reviewers: #frameworks, graesslin, romangg
      
      Subscribers: kde-frameworks-devel, graesslin, davidedmundson, zzag,
      cfeck
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D12388
      3d062790
    • David Edmundson's avatar
      Fix memory management in WaylandOutputManagement · baba7628
      David Edmundson authored
      Summary:
      There was no destructor in the protocol, which meant the auto generated
      _destroy function only deletes the wl_proxy object, but doesn't actually
      send anything to the server.
      
      Result was OutputConfiguration objects on
      the server just linger forever and it's a broken state
      
      Test Plan: Added unit test that objects have the lifespan they should do
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: romangg, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D13730
      baba7628
    • David Edmundson's avatar
      Isolate every test within WaylandOutputManagement · d6a250cf
      David Edmundson authored
      Summary:
      The current code used the same outputInterface between all tests, with
      data and outdated connections slowly accumulating.
      
      This meant most the code didn't work as it was intended, for
      example testExampleConfig had the config applied from the connect in the
      previous test. It just happened to pass.
      
      This resets everything between each test.
      
      Test Plan:
      Can now add a test without going insane
      Existing tests still pass
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: romangg, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D13729
      d6a250cf
    • 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
  9. 04 Aug, 2018 2 commits
  10. 24 Jul, 2018 1 commit
  11. 23 Jul, 2018 1 commit
    • Roman Gilg's avatar
      Support cursor hints on locked pointer · cebfd2f8
      Roman Gilg authored
      Summary:
      Implement support for locked pointer cursor hints. Cursor hints can be
      retrieved by the compositor either continuously by connecting to the
      cursorHintChanged signal or only when needed. In the later case the
      compositor must connect to the aboutToUnbound signal of the locked pointer
      interface in order to fetch the last hint before the interface is unbound.
      
      Test Plan: Autotest added.
      
      Reviewers: #plasma, davidedmundson
      
      Reviewed By: #plasma, davidedmundson
      
      Subscribers: davidedmundson, kde-frameworks-devel
      
      Tags: #frameworks
      
      Maniphest Tasks: T4692
      
      Differential Revision: https://phabricator.kde.org/D14175
      cebfd2f8
  12. 18 Jul, 2018 2 commits
    • Roman Gilg's avatar
      Reduce unnecessary long wait times on failing signal spies · 919ee2ac
      Roman Gilg authored
      Summary:
      Several signal spies, which were supposed to fail, were waiting for the
      default 5 seconds, which is most often unnecessary long.
      
      This patch sets a time limit of 500ms in suitable cases. Reduces for me
      the total test time by 40%.
      
      Test Plan:
      Before (with fixed seat and selection tests):
      98% tests passed, 1 tests failed out of 45
      
      Total Test time (real) = 173.31 sec
      
      The following tests FAILED:
               19 - kwayland-testWindowmanagement (Failed)
      
      After:
      98% tests passed, 1 tests failed out of 45
      
      Total Test time (real) = 102.12 sec
      
      The following tests FAILED:
               19 - kwayland-testWindowmanagement (Failed)
      
      Reviewers: #plasma, davidedmundson
      
      Reviewed By: #plasma, davidedmundson
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D14184
      919ee2ac
    • Roman Gilg's avatar
      Fix selection and seat auto tests · 36544d3d
      Roman Gilg authored
      Summary:
      The seat test is broken since 5e195c2a, because a frame event now
      also follows a relative pointer motion.
      
      The selection test is broken since 0e580ae9, because clearing a selection,
      which never has been set, is a noop now.
      
      Reviewers: #plasma, davidedmundson
      
      Reviewed By: #plasma, davidedmundson
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D14183
      36544d3d
  13. 16 Jul, 2018 5 commits
    • David Edmundson's avatar
      Populate shell version documentation · c1515045
      David Edmundson authored
      c1515045
    • David Edmundson's avatar
      Fix compiler warning about virtual overloads in XdgShell · eb9b1816
      David Edmundson authored
      Similar to 7b9932e7 but in XdgShell
      eb9b1816
    • David Edmundson's avatar
      a360a56a
    • 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
  14. 07 Jul, 2018 1 commit
  15. 04 Jul, 2018 1 commit
    • Bhushan Shah's avatar
      Fix some of cppcheck warnings · 84bc3cbd
      Bhushan Shah authored
      Summary:
      - selfInitialization
      - memleak
      
      I could probably suppress the selfInitialization warning, but probably
      is cleaner this way. Opinions welcome. This also fixes the memleak in
      autotest.
      
      Test Plan:
      - arc lint --everything
      - Fix issues
      - build
      - run tests
      
      Reviewers: #frameworks, aacid
      
      Reviewed By: aacid
      
      Subscribers: apol, aacid, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D13559
      84bc3cbd
  16. 26 Jun, 2018 1 commit
    • Roman Gilg's avatar
      [server] Send frame event instead of flush on relative pointer motion · 5e195c2a
      Roman Gilg authored
      Summary:
      This solves for me not working relative pointer motion with grab/lock in
      Xwayland applications.
      
      Looking at the Xwayland code it is clear, that it expects a frame event on
      wl_pointer versions 5 and above after relative motion events. wl_pointer
      version 5 support was added to KWayland in b6bd28ab.
      
      If the cursor is locked no absolute motion events are sent. In this case to
      make sure relative motion events are processed by the client, send the frame
      event after every relative motion.
      
      BUG: 395815
      
      Test Plan: Manually with Neverball in Xwayland mode.
      
      Reviewers: #plasma, #kwin, #frameworks, davidedmundson
      
      Reviewed By: #plasma, #kwin, davidedmundson
      
      Subscribers: davidedmundson, kde-frameworks-devel
      
      Tags: #frameworks
      
      Maniphest Tasks: T8923
      
      Differential Revision: https://phabricator.kde.org/D13257
      5e195c2a
  17. 22 Jun, 2018 2 commits
  18. 21 Jun, 2018 1 commit
    • Michal Srb's avatar
      Do not cancel old clipboard selection if it is same as the new one. · 0e580ae9
      Michal Srb authored and Fabian Vogt's avatar Fabian Vogt committed
      Summary:
      GTK applications seem to call wl_data_device::set_selection multiple times with
      the same wl_data_source object, replacing it with itself. If we cancel it, they
      will destroy it and the selection will be gone.
      
      With this patch it is again possible to copy from GTK applications.
      
      BUG: 395366
      
      Test Plan: Patch provided by the reporter, he reported success.
      
      Reviewers: #plasma, #frameworks, romangg
      
      Reviewed By: #plasma, romangg
      
      Subscribers: michalsrb, romangg, graesslin, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D13535
      0e580ae9
  19. 19 Jun, 2018 2 commits
    • David Edmundson's avatar
      Fix compiler warning about hidden virtual overloads · 7b9932e7
      David Edmundson authored
      Summary:
      TextInput has 4 virtual operators for casting. Each of the two
      subclasses override a different 2. It all works perfectly but results in
      this compiler warning.
      
      In file included from
      client/textinput_v2.cpp:20:
      client/textinput_p.h:95:13: warning: ‘virtual
      KWayland::Client::TextInputManager::Private::operator
      wl_text_input_manager*() const’ was hidden [-Woverloaded-virtual]
           virtual operator wl_text_input_manager*() const {
                   ^~~~~~~~
      
      This is the compiler telling us that we're overriding some overloads, but
      not all overloads which it thinks is wrong, even though it makes perfect
      sense in this particular case.
      
      Adding a "using" keyword silences the warning.
      
      Test Plan: Compiles with no warnings \o/
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D13502
      7b9932e7
    • Vlad Zahorodnii's avatar
      Honor BUILD_TESTING · 2d06b24a
      Vlad Zahorodnii authored
      Summary: Don't build tests if BUILD_TESTING is OFF.
      
      Test Plan:
      * Passed BUILD_TESTING=OFF to cmake, no tests have been built;
      * Didn't pass BUILD_TESTING to cmake, all tests have been built.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D13500
      2d06b24a
  20. 15 Jun, 2018 2 commits
  21. 12 Jun, 2018 2 commits
    • Vlad Zahorodnii's avatar
      Fix 'unused parameter' warnings · 1028770d
      Vlad Zahorodnii authored
      Summary:
      The warnings:
      
      ```
      /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp: In static member function ‘static void
      KWayland::Server::XdgExporterUnstableV2Interface::Private::destroyCallback(wl_client*, wl_resource*)’:
      /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp:95:95: warning: unused parameter ‘resource’
      [-Wunused-parameter]
       void XdgExporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource)
                                                                                        ~~~~~~~~~~~~~^~~~~~~~
      /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp: In static member function ‘static void
      KWayland::Server::XdgImporterUnstableV2Interface::Private::destroyCallback(wl_client*, wl_resource*)’:
      /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp:237:95: warning: unused parameter ‘resource’
      [-Wunused-parameter]
       void XdgImporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource)
                                                                                        ~~~~~~~~~~~~~^~~~~~~~
      /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp: In static member function ‘static void
      KWayland::Server::XdgImportedUnstableV2Interface::Private::setParentOfCallback(wl_client*, wl_resource*, wl_resource*)’:
      /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp:439:78: warning: unused parameter ‘client’
      [-Wunused-parameter]
       void XdgImportedUnstableV2Interface::Private::setParentOfCallback(wl_client *client, wl_resource *resource, wl_resource *
      surface)
                                                                         ~~~~~~~~~~~^~~~~~
      
      /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgoutput_interface.cpp: In constructor
      ‘KWayland::Server::XdgOutputManagerInterface::XdgOutputManagerInterface(KWayland::Server::Display*, QObject*)’:
      /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgoutput_interface.cpp:88:81: warning: unused parameter ‘parent’
      [-Wunused-parameter]
       XdgOutputManagerInterface::XdgOutputManagerInterface(Display *display, QObject *parent)
                                                                              ~~~~~~~~~^~~~~~
      ```
      
      Test Plan: No more 'unused parameter' warnings.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D13501
      1028770d
    • David Edmundson's avatar
      Documentation fix · a2f7da68
      David Edmundson authored
      a2f7da68
  22. 10 Jun, 2018 2 commits