1. 07 Nov, 2021 2 commits
  2. 06 Nov, 2021 4 commits
    • Jonas Ådahl's avatar
      clutter/actor: First clear all stage views before emitting they changed · 802d4e0c
      Jonas Ådahl authored and Marge Bot's avatar Marge Bot committed
      If one would end up with an actor attached to mapped actor, where the
      attached actor doesn't itself have an up to date stage view list while
      listening on the stage for updating, when clearing the stage views of
      the list, anything that would query the stage views list at this time
      would end up accessing freed memory.
      This could happen if
       1) An actor was added to a newly created container actor attached to
          the stage
       2) The actor got a timeline attached to it
       3) The actor was moved to a container that already was mapped
       4) A hotplug happened
      After (1) both the container and actor would not have any stage views.
      After (2) the timeline would listen on the stage for stage views
      updates. After (3) the actor would still listen on the stage for stage
      views updates. When (4) happened, the actor would be signalled when the
      stage got its stage view cleared, at which point it would traverse up
      its actor's tree finding an appropriate stage view to base its animation
      on. The problem here would be that it'd query the already mapped
      container and its yet-to-be-cleared stage view list, resulting in
      use-after free, resulting in for example the following backtrace:
        0)  g_type_check_instance_cast ()
        1)  CLUTTER_STAGE_VIEW ()
        2)  clutter_actor_pick_frame_clock ()
        3)  clutter_actor_pick_frame_clock ()
        4)  update_frame_clock ()
        5)  on_frame_clock_actor_stage_views_changed ()
        6)  g_closure_invoke ()
        7)  signal_emit_unlocked_R ()
        8)  g_signal_emit_valist ()
        9)  g_signal_emit ()
        10) clear_stage_views_cb ()
        11) _clutter_actor_traverse_depth ()
        12) _clutter_actor_traverse ()
        13) clutter_actor_clear_stage_views_recursive ()
        14) clutter_stage_clear_stage_views ()
      Avoid this issue by making sure that we don't emit 'stage-views-changed'
      signals while the actor tree is in an invalid state. While we now end up
      traversing tree twice, it doesn't change the Big-O notation. It has not
      been measured whether this has any noticible performance impact.
      Closes: #1950
      Part-of: <!2025>
    • Jonas Ådahl's avatar
      tests/stage-view: Verify stage view list length after updating · 5b35860b
      Jonas Ådahl authored and Marge Bot's avatar Marge Bot committed
      Part-of: <!2025>
    • Jonas Ådahl's avatar
      tests/stage-view: Disable animations · 666a3095
      Jonas Ådahl authored and Marge Bot's avatar Marge Bot committed
      Animations may interfere with test cases, e.g. by triggering relayouts,
      repaints, when not expected. Disable them, so that more precise test
      cases can be added.
      Part-of: <!2025>
    • Jonas Ådahl's avatar
      plugins/default: Add env var to disable animations · f1f2c967
      Jonas Ådahl authored and Marge Bot's avatar Marge Bot committed
      Intended to be used by tests, as animations may interfere with testing.
      Eventually, a dedicated test plugin should be added, but it is out of
      scope for this branch.
      Part-of: <!2025>
  3. 05 Nov, 2021 1 commit
  4. 04 Nov, 2021 2 commits
    • Ray Strode's avatar
      backends/x11: Fix key repeat of on-screen keyboard for second level keysyms · 6060b6a2
      Ray Strode authored and Marge Bot's avatar Marge Bot committed
      Certains keys (such as ~ and |) are in the keyboard map behind the
      second shift level. This means in order for them to be input, the
      shift key needs to be held down by the user.
      The GNOME Shell on-screen keyboard presents these keys separately on
      a page of keys that has no shift key. Instead, it relies on mutter
      to set a shift latch before the key event is emitted. A shift latch
      is a virtual press of the shift key that automatically gets released
      after the next key press (in our case the ~ or | key).
      The problem is using a shift latch doesn't work very well in the face
      of key repeat. The latch is automatically released after the first
      press, and subsequent repeats of that press no longer have shift
      latched to them.
      This commit fixes the problem by using a shift lock instead of a shift
      latch. A shift lock is never implicitly released, so it remains
      in place for the duration of key repeat.
      Part-of: <https://gitlab.gnome.org/GNOM...
    • Mark's avatar
      startup: Optionally run (and exit with) a command · 8e1a125f
      Mark authored
      Treat the first non-option as a command, and any others as its CLI
      arguments. Run the command with those arguments; communicate its exit
      status (if nonzero); and exit with it. Document this added functionality
      in the manpage and usage description.
      Closes: !1981
      Part-of: <!1982>
  5. 02 Nov, 2021 1 commit
    • Jason Gerecke's avatar
      input-mapper: Reverse sort order of display score comparator · 64ff1f20
      Jason Gerecke authored and Marge Bot's avatar Marge Bot committed
      The `guess_candidates()` function scores each display that an input
      device could be mapped to and then uses the `sort_by_score()` comparator
      to find the best option. The function expects the list to be sorted from
      best to worst, but the comparator currently sorts them in the opposite
      order. This causes the function to end up returning the _worst_ match
      rather than the the best. This commit reverses the sort order of the
      comparator so that the best display can be returned as intended.
      Closes: #1889
      Part-of: <!1934>
  6. 28 Oct, 2021 16 commits
  7. 27 Oct, 2021 1 commit
    • Carlos Garnacho's avatar
      x11: Initialize struct early · ab45ae18
      Carlos Garnacho authored
      Since we now use the common error paths, this could fallback at a point
      where it was trying to free uninitialized memory.
      CID: #1508193
      Part-of: <!2063>
  8. 26 Oct, 2021 13 commits