1. 09 Jul, 2015 2 commits
    • Martin Flöser's avatar
    • Martin Flöser's avatar
      [wayland] Improve creation of KWayland::Server::PlasmaWindowInterface · 72635101
      Martin Flöser authored
      The creation of PlasmaWindowInterface is moved from WaylandServer into
      AbstractClient. This allows the sub classes to better control when to
      create/destroy the Client.
      For creation it's bound to becoming visible - that is Windows which are
      only created but never shown are not announced at all.
      For Client it's destroyed with the normal tear-down of a Client, for
      ShellClient it's destroyed on unmapped (which also means a new one
      will be created again in case of another mapping of the surface).
      As a side effect, this works around the problem that ShellClients do not
      yet get destroyed for QtWayland's menus (needs further investigation).
  2. 29 Jun, 2015 1 commit
  3. 20 Jun, 2015 1 commit
    • Martin Flöser's avatar
      [wayland] Export themed icon name to PlasmaWindow interface · 8b6fef45
      Martin Flöser authored
      If the icon doesn't have a name, we pass the generic xorg icon. Most
      likely our xwayland clients won't have a theme name, so giving them
      the xorg icon seems a good enough work around. If we would want to
      pass the real icon for xwayland clients we would need a way to
      serialize them which seems like quite some needless overhead for legacy
      applications. Can be considered for the future nevertheless.
  4. 19 Jun, 2015 2 commits
  5. 18 Jun, 2015 2 commits
  6. 17 Jun, 2015 2 commits
  7. 16 Jun, 2015 1 commit
  8. 13 Jun, 2015 2 commits
    • Martin Flöser's avatar
      [wayland] Add support for PlasmaWindowManagement interface · 859a3bb5
      Martin Flöser authored
      So far this only allows to trigger show desktop functionality and exports
      the state.
      In future this should be restricted to just one dedicated desktop shell
    • Halla Rempt's avatar
      [wayland] Add a command-line option to start an input method server · 98bcdbe7
      Halla Rempt authored
      Input-method servers, like maliit, need to be known to KWin since KWin
      needs to know about virtual keyboards. Virtual keyboards should be shown
      as OSD layers, and they are one of the types of windows that actually
      should be showable when the lock screen is active.
      kwin_wayland --inputmethod /path/to/your/input-server
      tries to start the input server. The input-server's window never gets
      keyboard focus and is shown on top of all windows except for KWin's
      internal clients.
  9. 09 Jun, 2015 2 commits
  10. 28 May, 2015 2 commits
  11. 27 May, 2015 1 commit
    • Martin Flöser's avatar
      [wayland] Place ShellClients · 90a68145
      Martin Flöser authored
      When a ShellClient is added and it's not internal, it get placed just
      like any other Client. This needs to happen after the initial size is
      Please note: this breaks the positioning of popup windows (e.g. menus)
      as they are placed like any other Client. This needs proper popup support
      which right now does not yet exist and thus is not much difference to
  12. 21 May, 2015 3 commits
  13. 18 May, 2015 4 commits
    • Martin Flöser's avatar
      [wayland] ShellClient can reference an internal QWindow · 7d152991
      Martin Flöser authored
      If the ShellClient got created for a Qt internal window, we try to
      find the QWindow and if we get one, we use the geometry directly as
      it got set by KWin in the first place.
      Also a windowId() is added to ShellClient which can be used by the
      effect system to find an EffectWindow. If it's an internal QWindow
      we just use that window id. For other clients we still need some
      smart solution.
    • Martin Flöser's avatar
      [wayland] Flush QtWaylands wl_display and KWin's wayland server when processing events · 74ae2f50
      Martin Flöser authored
      QtWayland and mesa might dead lock KWin if we start rendering a QWindow
      before Qt/Mesa got the last frame callback. They perform blocking wayland
      event reading on the main gui thread which makes it impossible for KWin
      to do the compositing and send the callback.
      To workaround this problem we fake a frameRendered directly after each
      damage event for a Qt internal window. Unfortunately this is not yet
      completely sufficient, thus we also need to ensure that the wayland
      events are processed before any events are processed which would cause
      a repaint and block. Thus we first flush QtWayland's wl_display and then
      our Server connection. If there were any damage events we can be sure
      that the frameRendered is sent before Qt attempts to render.
    • Martin Flöser's avatar
      [wayland] Use a dummy window for QtWayland's popup window handling · 29c2ae57
      Martin Flöser authored
      QtWayland only creates popup windows if they have a parent QWindow or
      if there is any window which had input. It's not enough to fake an
      enter, it needs to be either a pointer button press or key press.
      As KWin's useraction menu doesn't have a parent and we most likely
      never send a pointer press to any QWindow it doesn't get shown. To
      circumvent this we create a dummy window and fake a button press/release
      on the window. After that Qt is tricked into believing there's a parent
      window and shows the popup.
      Faking the input is only done with at least Qt 5.5 as QtWayland crashes
      on pointer event without a keymap being installed. As KWin does not yet
      send keymaps we better disable the dangerous code path. With Qt 5.5 the
      crash condition is fixed.
    • Martin Flöser's avatar
      [wayland] Don't handle ShellSurface created signals till Workspace is ready · 4a671fbf
      Martin Flöser authored
      Similar to Surface: we ignore till we are all ready to go.
  14. 08 May, 2015 3 commits
  15. 24 Apr, 2015 1 commit
  16. 21 Apr, 2015 1 commit
    • Martin Flöser's avatar
      [wayland] Abort if Xwayland connection breaks · 8ec3f55f
      Martin Flöser authored
      If Xwayland goes down it's better to abort than staying alive. If
      Xwayland goes down the next roundtrip to X (most likely during call
      to xStackingOrder) will just freeze completely, which is kind of the
      worst as one cannot VT-switch anymore. So a clean abort is a bad but
      better solution.
  17. 02 Apr, 2015 2 commits
    • Martin Flöser's avatar
      [wayland] Use a DPI of 96 to calculate physical size for the server's outputs · d2cd1086
      Martin Flöser authored
      Not perfect but better than a hardcoded physical size.
    • Martin Flöser's avatar
      [wayland] Set internal cursor through WaylandCursorTheme in AbstractBackend · 2b185fa7
      Martin Flöser authored
      Getting the cursor image from the cursor theme is unfortunately not
      straight forward. We have three different libraries and all have
      * XCursor - we just kicked it out
      * xcb-util/cursor - only provides xcb_cursor_t, so a dependency on X
      * wayland-cursor - only a client side API
      The picked solution is using wayland-cursor. It provides the cursor in a
      wl_buffer. Unfortunately the client side API does not easily allow to
      a) read it back
      b) init without a wl_shm_pool
      Thus we need to work this around:
      * create an internal connection
      * get a ShmPool on it
      * init WaylandCursorTheme with this ShmPool
      * get the cursor wl_buffer from the theme
      * trigger a roundtrip
      * get the corresponding BufferInterface for the buffer
      * set the content as the software cursor
  18. 20 Mar, 2015 1 commit
  19. 17 Mar, 2015 6 commits