1. 30 Mar, 2021 3 commits
    • Vlad Zahorodnii's avatar
      Implement input method v1 keyboard grabs · 729a9d4d
      Vlad Zahorodnii authored
      The protocol is rather ambiguous regarding what events should be sent.
      So, we send only hardware key events.
      
      Another corner case is that the client has no way to indicate what
      version of wl_keyboard it supports. In order to avoid crashing clients,
      the grab_keyboard request returns wl_keyboard objects of v1.
      729a9d4d
    • Vlad Zahorodnii's avatar
      Introduce basic input device grab infrastructure · 89f73408
      Vlad Zahorodnii authored
      Some protocols require establishing a keyboard/pointer/touch grab, but
      we don't have such api. For example, based on the type of dnd, either
      the wl_pointer or the wl_touch needs to be grabbed. Another example is
      xdg popup grabs.
      
      Event filters are not good for this job because they are conceptually
      different.
      
      This change introduces basic input device grab infrastructure, which is
      inspired by the one that can be found in weston.
      
      If there is an event, the seat will forward the event to the grab. It is
      the responsibility of the grab to decide what should happen next to the
      event. The grab may decide to discard or forward the event.
      
      The default pointer/touch/keyboard grab is active if the corresponding
      input device is not grabbed explicitly and it is created by the seat.
      
      A grab can be superseded by another grab. If that happens, the cancel()
      hook will be called. It can be used to cancel drag-and-drop session or
      dismiss popups.
      89f73408
    • Vlad Zahorodnii's avatar
      Send current primary selection after introducing focused surface · f034ef5d
      Vlad Zahorodnii authored
      Toolkits such as GTK don't like that kwin sends the current primary
      selection before the wl_keyboard.enter event.
      f034ef5d
  2. 26 Mar, 2021 5 commits
  3. 25 Mar, 2021 5 commits
  4. 24 Mar, 2021 1 commit
  5. 23 Mar, 2021 3 commits
  6. 22 Mar, 2021 12 commits
  7. 19 Mar, 2021 2 commits
  8. 17 Mar, 2021 3 commits
  9. 16 Mar, 2021 3 commits
    • Vlad Zahorodnii's avatar
      Send an icon only if there is one · 90393d7d
      Vlad Zahorodnii authored
      Currently, plasma window model test fails because the null icon is
      received after executing the main body of the test.
      
          FAIL!  : PlasmaWindowModelTest::testVirtualDesktops() '!dataChangedSpy.wait(100)' returned FALSE. ()
             Loc: [/data/projects/src/kwayland-server/autotests/client/test_plasma_window_model.cpp(583)]
      
      We can fix the test by waiting for the iconChanged signal to be emitted,
      but we will need to wait in all tests too. Furthermore, it doesn't make a
      lot of sense to wait for an icon that was never set.
      
      This change makes the compositor send an icon only if there is one.
      
      It's a behavioral change, but it shouldn't regress anything because kwin
      always sets icons via the plasma window management protocol even for apps
      that have no valid app id.
      
      It also makes the api of the PlasmaWindowInterface class more intuitive.
      90393d7d
    • Vlad Zahorodnii's avatar
      autotests: Fix testWindowmanagement · eda53c7f
      Vlad Zahorodnii authored
      Currently, testIcon fails because the actual and the expected pixmaps
      have mismatching formats.
      
      The root cause is that images with an alpha channel will loose the alpha
      channel if they are converted to QPixmap using QPixmap::fromImage().
      
      The >> stream operator for the QPixmap class will deserialize pixel data
      in a temporary QImage and then use QPixmap::fromImage() to get a pixmap
      object.
      
      The >> stream operator for the QIcon class will delegate the task of
      reading the icon from a QDataStream to QPixmapIconEngine, which uses the
      >> stream operator under the hood to deserialize icon data.
      
      In order to fix testIcon, this change constructs a dummy icon from a
      pixmap object returned by QPixmap::fromImage().
      eda53c7f
    • Vlad Zahorodnii's avatar
      Remove @since version tags · 33301a94
      Vlad Zahorodnii authored
      Currently, we have a mix of Frameworks versions and Plasma versions in
      @since tags, which leads to some confusion. Since this is an unstable
      library, one cannot rely on since version tags, we are free to add,
      change, and remove apis to serve best to kwin requirements. Thus, we can
      simply remove all since version tags to fix mixing up different product
      versions.
      33301a94
  10. 15 Mar, 2021 3 commits