1. 19 Sep, 2018 3 commits
    • Jonas Ådahl's avatar
      window/wayland: Freeze updates until shown · 7d82cdee
      Jonas Ådahl authored
      Not until the window is shown do we know what monitor it's on, thus the
      size, so freeze updates (shape etc) until the window is shown.
      
      !229
      7d82cdee
    • Jonas Ådahl's avatar
      window: Move out 'updates frozen' state into implementations · e2e72966
      Jonas Ådahl authored
      Implementation of said state was just related to X11, so move it into
      window-x11.c. The Wayland path always fell back on the returning TRUE,
      so just do that for now.
      
      !229
      e2e72966
    • Tony Novak's avatar
      input-settings: detect trackball using udev ID_INPUT_TRACKBALL · 8685de96
      Tony Novak authored
      Previously, trackballs were detected based on the presence of the
      substring "trackball" in the device name. This had the downside of
      missing devices, such as the Kensington Expert Mouse, which don't have
      "trackball" in their names.
      
      Rather than depending on the device name, use the ID_INPUT_TRACKBALL
      property from udev to determine whether or not to treat a device as a
      trackball.
      
      This adds a new function, `is_trackball_device`, to MetaInputEvents, and
      eliminates the `meta_input_device_is_trackball` function.
      
      Fixes: #258
      8685de96
  2. 18 Sep, 2018 3 commits
    • Sam Spilsbury's avatar
      actor: Also recompute paint volume if we recently dropped effects · a8a3c101
      Sam Spilsbury authored
      Otherwise we'll be stuck with the same paint volume on the last
      frame of the given effect, which could be wrong.
      a8a3c101
    • Sam Spilsbury's avatar
      actor: Always use get_paint_volume override for active effects · 5d19aee2
      Sam Spilsbury authored
      If an effect is active and it overrides the paint volume, we should
      always recompute the paint volume when requested and not use the
      cache, since the paint volume override can change from call to
      call depending on what phase of painting we are in. For instance,
      if we are part way through painting effects and request the
      paint volume, the paint volume should only go up to the current
      effect, but in a later call to compute repaint regions, the
      paint volume needs to expand to accomadate the effect.
      
      This still involves a lot of recomputation in the case of effects -
      in a later clutter version it would be worth adding an API to
      allow effects to explicitly recompute and return a new the paint
      volume up to the current effect as opposed to recomputing
      the cached one.
      5d19aee2
    • Sam Spilsbury's avatar
      actor: Fix logic error in determining terminal effect for paint volume · 4270eef1
      Sam Spilsbury authored
      Previously we were checking l->data != NULL || (l->data != NULL &&
      l->data != priv->current_effect). This would continue the loop even
      if l->data == priv->current_effect, since l->data != NULL, which was
      not the intention of that loop.
      
      We also don't need to check that l->data != NULL before checking if
      it does not match the current_effect, since we already checked
      that current_effect was non-NULL before entering the loop.
      4270eef1
  3. 14 Sep, 2018 1 commit
    • Olivier Fourdan's avatar
      window: unmanage dialog when clearing transient_for · b443bd42
      Olivier Fourdan authored
      On Wayland, xdg-foreign would leave a modal dialog managed even after
      the imported surface is destroyed.
      
      This is sub-optimal and this breaks the atomic relationship one would
      expect between the parent and its modal dialog.
      
      Make sure we unmanage the dialog if transient_for is unset even for
      Wayland native windows.
      
      Related: #174
      Related: #221
      b443bd42
  4. 11 Sep, 2018 1 commit
  5. 07 Sep, 2018 3 commits
  6. 06 Sep, 2018 1 commit
  7. 03 Sep, 2018 1 commit
  8. 02 Sep, 2018 1 commit
  9. 01 Sep, 2018 2 commits
  10. 31 Aug, 2018 2 commits
  11. 29 Aug, 2018 4 commits
  12. 28 Aug, 2018 2 commits
  13. 27 Aug, 2018 16 commits
    • Anders Jonsson's avatar
      Update Swedish translation · 388d0656
      Anders Jonsson authored
      388d0656
    • Jonas Ådahl's avatar
      window/wayland: Don't recursive indefinitely when updating monitor · e191c21e
      Jonas Ådahl authored
      When we update the main monitor, there is a rule that makes it so that
      popup windows use the same main monitor as their parent. In the commit
      f4d07caa the call that updates and
      fetches the main monitor of the toplevel accidentally changed to update
      from itself, causing a indefinite recursion eventually resulting in a
      crash.
      
      Closes: #279
      e191c21e
    • Jonas Ådahl's avatar
      window: Keep windows with placement rule attached to parent · 5376c31a
      Jonas Ådahl authored
      A window placed using a placement rule should keep that relative
      position even if the parent window moves, as the position tied to the
      parent window, not to the stage. Thus, if the parent window moves, the
      child window should move with it.
      
      In the implementation in this commit, the constraints engine is not
      used when repositioning the children; the window is simply positioned
      according to the effective placement rule that was derived from the
      initial constraining, as the a xdg_popup at the moment cannot move
      (relative its parent) after being mapped.
      
      Closes: #274
      5376c31a
    • Jonas Ådahl's avatar
      wayland/gtk-shell: Handle requests after toplevel was unmanaged · ca5b27ba
      Jonas Ådahl authored
      As with xdg-toplevel, a gtk-surface can be unmanaged by the compositor
      without the client knowing about it, meaning the client may still send
      updates and make requests. Handle this gracefully by ignoring them. The
      client needs to reset all the state anyway, if it wants to remap the
      same surface.
      
      #240
      ca5b27ba
    • Jonas Ådahl's avatar
      wayland/legacy-xdg-shell: Handle requests after toplevel was unmanaged · 64df6276
      Jonas Ådahl authored
      As with xdg-toplevel proper, a legacy xdg-toplevel can be unmanaged by
      the compositor without the client knowing about it, meaning the client
      may still send updates and make requests. Handle this gracefully by
      ignoring them. The client needs to reassign the surface the legacy
      xdg-toplevel role again, if it wants to remap the same surface, meaning
      all state would be reset anyway.
      
      Closes: #240
      64df6276
    • Jonas Ådahl's avatar
      wayland/legacy-xdg-shell: Cache frame callbacks if toplevel is unmanaged · a740f50c
      Jonas Ådahl authored
      A toplevel window can be unmanaged without the client knowing it (e.g. a
      modal dialog being unmapped together with its parent. When this has
      happened, take frame callbacks queued on a commit and cache them on the
      generic surface queue. If the toplevel is to be remapped because the
      surface was reassigned the toplevel role, the cached frame callbacks
      will be queued on the surface actor and dispatched accordingly.
      
      #240
      a740f50c
    • Jonas Ådahl's avatar
      wayland/xdg-shell: Handle requests after toplevel was unmanaged · 5fd0f62a
      Jonas Ådahl authored
      A window can be unmanaged without asking the client to do it, for
      example as a side effect of a parent window being unmanaged, if the
      child window was a attached dialog.
      
      This means that the client might still make requests post updates to it
      after that it was unmapped. Handle this gracefully by NULL-checking the
      surface's MetaWindow pointer. We're not loosing any state due to this,
      as if the client wants to map the same surface again, it needs to either
      reassign it the toplevel role, or reset the xdg-toplevel, both resulting
      in all state being lost anyway.
      
      #240
      5fd0f62a
    • Jonas Ådahl's avatar
      wayland/xdg-shell: Cache frame callbacks if toplevel is unmanaged · 80d420ff
      Jonas Ådahl authored
      A toplevel window can be unmanaged without the client knowing it (e.g. a
      modal dialog being unmapped together with its parent. When this has
      happened, take frame callbacks queued on a commit and cache them on the
      generic surface queue. If the toplevel is to be remapped, either because
      the surface was reassigned the toplevel role, or if it was reset and
      remapped, the cached frame callbacks will be queued on the surface actor
      and dispatched accordingly.
      
      #240
      80d420ff
    • Jonas Ådahl's avatar
      wayland/xdg-shell: Cache pending frame callbacks on popup reset · 407d6294
      Jonas Ådahl authored
      A popup can be reset, and when that happens, window and actor are
      destroyed, and won't be created again unless it is reassigned the
      popup role.
      
      If a client queued frame callbacks when resetting a popup, the frame
      callbacks would be left in the pending state, as they were not queued on
      the actor, meaning we'd hit an assert about the frame callbacks not
      being handled. Fix this by caching them on the MetaWaylandSurface, so
      that they either are cleaned up on destruction, or queued on the actor
      would the surface be re-assigned the popup role.
      
      #240
      407d6294
    • Jonas Ådahl's avatar
      wayland/surface: Add API to cache frame callbacks · 0ace58d0
      Jonas Ådahl authored
      Sometimes it may be useful for roles to put callbacks in the generic
      surface frame callback queue. The surface frame callback queue will
      either eventually be processed on the next surface role assignment that
      places the frame callbacks in a role specific queue, processed at some
      other point in time by a role, or cleaned up on surface destruction.
      
      #240
      0ace58d0
    • Jonas Ådahl's avatar
      wayland/xdg-shell: Queue frame callbacks on new actor after resetting · d7917101
      Jonas Ådahl authored
      When a xdg-toplevel is reset, the window and actor are recreated, and
      all state is cleared. When this happened, we earlied out from the
      xdg-toplevel commit handler, which would mean that if the client had
      queued frame callbacks when resetting, they'd be left in the pending
      commit state, later hitting an assert as they were not handled.
      
      Fix this by queuing the frame callbacks no the new actor, so that they
      are emitted whenever the actor is eventually painted.
      
      #240
      d7917101
    • Carlos Garnacho's avatar
      wayland: Use geometry_scale on opaque regions · b30c907e
      Carlos Garnacho authored
      This was done for input regions in commit 718a89eb (Thanks Jonas
      for the archaeology!) but opaque regions follow the same scaling.
      This brings less evident issues as opaque regions are just used for
      culling optimizations.
      b30c907e
    • Carlos Garnacho's avatar
      wayland: Fix input/opaque regions calculation on hidpi · 784a774d
      Carlos Garnacho authored
      Commit 6a92c6f8 unintendedly broke input/opaque region calculations
      on hidpi. Most visible side effect is that clicking is only allowed
      in the upper-left quarter of windows.
      
      The surface coordinates are returned in logical unscaled buffer
      size. We're however interested in actor coordinates (thus real
      pixels) here.
      
      As it is a bit of a detour how the scale to be applied is calculated,
      refactor a meta_wayland_actor_surface_get_geometry_scale() function
      that we can use it here, and use it consistently for surface size and
      the given regions.
      784a774d
    • Jonas Ådahl's avatar
      window: Force update monitor on hot plugs · 8d3e0530
      Jonas Ådahl authored
      Commit a3da4b8d changed updating of
      window monitors to always use take affect when it was done from a
      non-user operation. This could cause feed back loops when a non-user
      driven operation would trigger the changing of a monitor, which itself
      would trigger changing of the monitor again due to a window scale
      change.
      
      The reason for the change, was that when the window monitor changed due
      to a hot plug, if it didn't actually change, eventually the window
      monitor pointer would be pointing to freed memory.
      
      Instead of force updating the monitor on all non-user operations, just
      do it on hot plugs. This allows for the feedback loop preventing logic
      to still do what its supposed to do, without risking dangling pointers
      on hot plugs.
      
      Related: #189
      Closes: #192
      8d3e0530
    • Jonas Ådahl's avatar
      window: Pass flag to meta_window_update_monitor() instead of bool · f4d07caa
      Jonas Ådahl authored
      The bool determines whether the call was directly from a user operation
      or not. To add more state into the call without having to add more
      boolenas, change the boolean to a flag (so far with 'none' and 'user-op'
      as possible values). No functional changes were made.
      
      #192
      f4d07caa
    • Milo Casagrande's avatar
      Update Italian translation · 8a6d502e
      Milo Casagrande authored
      8a6d502e