1. 09 Sep, 2016 4 commits
  2. 08 Sep, 2016 3 commits
  3. 07 Sep, 2016 4 commits
  4. 06 Sep, 2016 3 commits
  5. 04 Sep, 2016 1 commit
  6. 03 Sep, 2016 1 commit
  7. 02 Sep, 2016 2 commits
    • Jonas Ådahl's avatar
      wayland: Don't handle input events after capability was removed · d696fd30
      Jonas Ådahl authored
      The seat capability updating is synchronous, but input events are
      asynchronous (first queued then emitted). This means we may end up in a
      situation where we from libinput first may receive a key event,
      immediately followed by a device-removed event. Clutter will first
      queue the key event, then remove the device, immediately triggering the
      seat capability removal.
      Later, when the clutter stage processes the queued events, the
      previously queued key event will be processed, eventually making it
      into MetaWaylandSeat. Before this patch, MetaWaylandSeat would still
      forward the key event to MetaWaylandKeyboard, even though it had
      'released' it. Doing this would cause referencing potentially freed
      memory, such as the xkb state that was unreferenced when the seat
      removed the capability.
      In order to avoid processing these lingering events, for now, just drop
      them on the floor if the capability has been removed.
      Eventually, the event queuing etc needs to be redesigned to work better
      when used in a Wayland compositor, but for now at least don't access
      freed memory.
    • Jonas Ådahl's avatar
      cogl/egl: Fix non-Wayland build · ce7573e2
      Jonas Ådahl authored
      Use #ifdef instead of #if, otherwise it won't compile when Wayland is
      not available.
  8. 01 Sep, 2016 3 commits
    • Jonas Ådahl's avatar
      window: Fix focus of unmappable modal transient's parent · 6c8f6afd
      Jonas Ådahl authored
      When a modal transient is unmanaging, most likely the parent of the
      modal transient should be focused.
      In Wayland, a MetaWindow is created when a shell surface role (like
      xdg_toplevel) is created, but a window cannot be shown until a buffer
      is attached. If a client would create two modal transients and make
      them both have the same parent, but only one get a buffer attached
      (i.e. shown), when unmanaging the modal transient that was showing,
      when finding a new focus candidate, the stacking code will ignore the
      not-to-be-shown buffer-less modal transient when finding a good
      candidate for focusing. In the case described here, this means it will
      find the parent of the unmanaging modal transient.
      This newly chosen candidate will then be passed to meta_window_focus();
      meta_window_focus() will then try to find any modal transient to focus
      instead, will find the one without any buffer, then fail to focus it
      because it cannot be mapped, thus making meta_window_focus() not focus
      anything. Since meta_window_focus() didn't change any focus state, the
      assert in meta_window_unmanage() checking that the unmanaging window
      isn't focused anymore will be hit, causing mutter to abort.
      For now, fix this by checking whether the modal transient can actually
      be focused in meta_window_focus(). For X11 client windows, a window
      will be defined to be focusable always, but for Wayland client windows,
      a window will be determined focusable only if it has a buffer attached.
      In the future, we should probably do a more thorough refactorization of
      focus handling to get rid of any X11 - Wayland differences.
    • Jonas Ådahl's avatar
      wayland/cursor-role: Add back priv variable · 7a096b86
      Jonas Ådahl authored
      Rebase of previous patch that removed the priv variable shouldn't have,
      since it was now used by other things. Add it back so it compiles again.
    • Jonas Ådahl's avatar
      wayland/cursor-role: Increase buffer use count on construction · c7976e0d
      Jonas Ådahl authored
      We may be assigned multiple times, if the surface is assigned to be a
      cursor surface multiple times. Each time e.g. wl_pointer.set_cursor is
      called, we'll be assigned.
      While the role object exists, we'll handle buffer use count even when
      we are not actively assigned, thus we should only handle the initial
      assignment use count bump when constructing, so that we don't increase
      it when reassigned, where the wl_resource may already have been
  9. 31 Aug, 2016 2 commits
  10. 30 Aug, 2016 2 commits
  11. 29 Aug, 2016 5 commits
  12. 28 Aug, 2016 1 commit
  13. 26 Aug, 2016 2 commits
    • Olivier Fourdan's avatar
      wayland: Survive an unsupported buffer size · 1f570d54
      Olivier Fourdan authored
      If cogl fails to create a texture from the client's given buffer,
      mutter would raise a fatal error and terminate.
      As a result, a broken client might kill gnome-shell/mutter and take the
      entire Wayland session with it.
      Instead of raising a fatal error in this case, log the cogl error
      message and send the client an OOM error, so mutter/gnome-shell can
      survive an unsupported buffer size.
    • Jonas Ådahl's avatar
      window: Don't unmanage transient_for when attached · 658d97d0
      Jonas Ådahl authored
      For some reason, when a modal dialog was made an attaching
      transient-for, if the window wasn't "constructing", it would be
      unmanaged and rely on some side effect to be recreated. This side
      effect is not triggered for Wayland clients, thus if one happen to set
      a surface as "modal" via gtk_surface.set_modal before
      xdg_toplevel.set_parent, it'd be unmanaged and never show up.
      Instead, simply just set the tranciency anyway for Wayland clients.
      This makes GTK+ clients that set_modal() before set_transient_for()
  14. 25 Aug, 2016 7 commits