1. 21 May, 2015 2 commits
    • Martin Flöser's avatar
      [wayland] Track the internal ShellClients in WaylandServer · 36fa8889
      Martin Flöser authored
      Adds all internal ShellClients into a dedicated list. This ensures that
      we don't perform "normal" window management on them.
      
      In addition we add them to the top of the stacking order. This restores
      behavior as it is on X11: internal windows are using BypassWindowManagerHint
      and thus on top of everything.
      36fa8889
    • Martin Flöser's avatar
      [wayland] Create a windowId for ShellSurface · 4ed4d4da
      Martin Flöser authored
      The internal used window Id consists of two parts identifiying the
      Client and one identifying the Surface. That is the first 16 bits
      are set to the ClientConnection, the last 16 bits are taken from
      the Surface id. As the Surface id is 32 bits, but we only use 16 bits
      there is a chance of overlap. So this might need some improvement.
      4ed4d4da
  2. 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.
      7d152991
    • 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.
      74ae2f50
    • 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.
      29c2ae57
    • 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.
      4a671fbf
  3. 08 May, 2015 3 commits
  4. 24 Apr, 2015 1 commit
  5. 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.
      8ec3f55f
  6. 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.
      d2cd1086
    • 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
      drawbacks:
      * 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
      2b185fa7
  7. 20 Mar, 2015 1 commit
  8. 17 Mar, 2015 6 commits