1. 15 Apr, 2021 5 commits
    • José Expósito's avatar
      meta/window: Make window tile API public · e691057f
      José Expósito authored
      Part-of: <!1805>
      e691057f
    • Yuri Chornoivan's avatar
      Update Ukrainian translation · 986ae69f
      Yuri Chornoivan authored and Administrator's avatar Administrator committed
      986ae69f
    • Florian Müllner's avatar
      data: Add back (hidden) shortcuts for vertical navigation · d2a492de
      Florian Müllner authored and  Marge Bot's avatar Marge Bot committed
      Users who customized their workspace shortcuts before updating to
      GNOME 40 are experiencing troubles when trying to use the same
      keybinding for the horizontal shortcuts, because of hidden conflicts
      with the vertical ones.
      
      We can address this by registering the old shortcuts with Settings
      without showing them in the UI, so that they are taken into account
      by Settings' conflict resolution.
      
      #1740
      
      Part-of: <!1814>
      d2a492de
    • Aaron Plattner's avatar
      x11: Skip sending redundant CTM change requests · cf8efb58
      Aaron Plattner authored
      The X server generates a property change notification whenever it processes a
      property change request, even if the value of the property is not changing. This
      triggers libgdk to probe all display outputs, which can be slow depending on
      which display driver and hardware are in use.
      
       #0  0x00007f8e4d5e91a0 in XRRUpdateConfiguration () at /usr/lib/libXrandr.so.2
       #1  0x00007f8e505208da in _gdk_x11_screen_size_changed (screen=0x5566e4b7e080, event=0x7ffe0e44bd60) at ../gdk/x11/gdkscreen-x11.c:1199
       #2  0x00007f8e505066d1 in gdk_x11_display_translate_event (translator=0x5566e4b5b110, display=0x5566e4b5b110, event=0x7f8dec001b20, xevent=0x7ffe0e44bd60) at ../gdk/x11/gdkdisplay-x11.c:1201
       #3  0x00007f8e505135a0 in _gdk_x11_event_translator_translate (translator=0x5566e4b5b110, display=0x5566e4b5b110, xevent=0x7ffe0e44bd60) at ../gdk/x11/gdkeventtranslator.c:51
       #4  0x00007f8e50512c97 in gdk_event_source_translate_event (event_source=0x5566e4b764a0, xevent=0x7ffe0e44bd60) at ../gdk/x11/gdkeventsource.c:243
       #5  0x00007f8e50512f57 in _gdk_x11_display_queue_events (display=0x5566e4b5b110) at ../gdk/x11/gdkeventsource.c:341
       #6  0x00007f8e50497644 in gdk_display_get_event (display=0x5566e4b5b110) at ../gdk/gdkdisplay.c:442
       #7  0x00007f8e5051301f in gdk_event_source_dispatch (source=0x5566e4b764a0, callback=0x0, user_data=0x0) at ../gdk/x11/gdkeventsource.c:363
       #8  0x00007f8e516ecf9c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
       #9  0x00007f8e51740a49 in  () at /usr/lib/libglib-2.0.so.0
       #10 0x00007f8e516ec503 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
       #11 0x00007f8e508ef5fd in meta_run_main_loop () at ../src/core/main.c:928
       #12 0x00007f8e508ef60e in meta_run () at ../src/core/main.c:943
       #13 0x00005566e450842a in  ()
       #14 0x00007f8e50649b25 in __libc_start_main () at /usr/lib/libc.so.6
      
      When GNOME is animating a display fade when the night light feature is toggled
      on or off, it sends a lot of change requests for the CTM property in the
      process, which triggers a lot of display probes from gdk. In the case of the
      night light feature, the CTM itself is not actually changing, so these requests
      are redundant. Fix this by caching the CTM value in the MetaOutputXrandr and
      skipping the server requests if it's not being changed.
      
      Fixes: GNOME/gnome-shell#3978
      
      Signed-off-by: default avatarAaron Plattner <aplattner@nvidia.com>
      Part-of: <GNOME/mutter!1816>
      cf8efb58
    • Aaron Plattner's avatar
      x11: Rename `atom` to `ctm_atom` · aa498dc2
      Aaron Plattner authored
      This makes it clearer exactly what atom this is referring to.
      
      Feedback from GNOME/mutter!1816 (comment 1081588)
      
      Signed-off-by: default avatarAaron Plattner <aplattner@nvidia.com>
      Part-of: <GNOME/mutter!1816>
      aa498dc2
  2. 14 Apr, 2021 20 commits
  3. 13 Apr, 2021 2 commits
  4. 12 Apr, 2021 3 commits
    • Jonas Dreßler's avatar
      clutter/actor: Update all last_paint_volumes before painting · 5a565b42
      Jonas Dreßler authored and  Marge Bot's avatar Marge Bot committed
      Updating the last_paint_volume while painting has proven itself to be
      quite prone to issues: First we had to make sure actors painted by
      offscreen effects get their last_paint_volumes updated correctly (see
      0320649a), and now a new issue turned up
      where we don't update the paint volumes while a fullscreen unredirect is
      happening.
      
      To stop those issues from happening and to lay the foundation for using
      the last_paint_volume for other things, update the last_paint_volume in
      a separate step before painting instead of doing it in
      clutter_actor_paint().
      
      To save some resources, avoid introducing another traversal of the
      scenegraph and add that step into the existing step of updating the
      stage_views lists of actors. To properly update the paint volumes, we
      need to do that after finishing the queued redraws, which is why we move
      clutter_stage_maybe_finish_queue_redraws() to happen before the new
      clutter_stage_finish_layout().
      
      Fixes GNOME/mutter#1699
      
      Part-of: <GNOME/mutter!1773>
      5a565b42
    • Jonas Dreßler's avatar
      clutter/actor: Properly invalidate cached paint volumes of actors · 3d17e8d5
      Jonas Dreßler authored and  Marge Bot's avatar Marge Bot committed
      The priv->paint_volume field of ClutterActor stores the cached paint
      volume in the actors local coordinate system. It consist of the actors
      paint volume itself and the union of all children paint volumes.
      
      We want to invalidate those cached paint volumes according to the
      following rules:
      
      - If an actors transformation matrix changes, all paint volumes of the
      parent-tree need to be invalidated (that's because the parent-volumes
      have unioned the actors paint volume). Our own paint volume does not
      need invalidation since the transformation matrix is not applied to it.
      
      - If an actors allocation-size changes, its own paint volume and all the
      volumes of the parent-tree need to be invalidated. That's because the
      allocation-size is used as the size of the paint volume.
      
      - If a clip gets set or clip_to_allocation gets enabled for an actor,
      its own paint volume and all the volumes of the parent-tree need to be
      invalidated. That's because the clip is factored in when creating the
      paint volume.
      
      So far we did this invalidation in various places and the invalidation
      up the parent-tree happened inside clutter_actor_real_queue_relayout().
      We did not invalidate on changes to the actors transformation matrices
      and the invalidation in clutter_actor_real_queue_relayout() was more
      like a "big hammer" that probably invalidated unnecessarily a few times.
      
      So introduce proper infrastructure to invalidate those cached paint
      volumes of actors only in the cases where they actually need to be
      invalidated. To do that, we reuse the transform_changed() function and
      introduce a new function queue_update_paint_volume() that invalidates
      the paint volumes up the actor tree.
      
      Part-of: <GNOME/mutter!1773>
      3d17e8d5
    • Jonas Dreßler's avatar
      clutter/actor: Add API to invalidate cached paint volumes · 7aa14782
      Jonas Dreßler authored and  Marge Bot's avatar Marge Bot committed
      ClutterActors can override the get_paint_volume() vfunc in case they
      draw outside the allocation. That's used by a bunch of actors, for
      example ClutterText or StViewport in gnome-shell.
      
      In case of StViewport, the paint volume returned depends on the value of
      the StAdjustment, which means when we start to cache paint volumes more
      agressively in ClutterActor, we'll need to add API that allows
      StViewport to invalidate the paint volume. So introduce
      clutter_actor_invalidate_paint_volume() to invalidate the cached paint
      volume.
      
      Part-of: <!1773>
      7aa14782
  5. 01 Apr, 2021 1 commit
  6. 29 Mar, 2021 7 commits
    • Robert Mader's avatar
      wayland/actor-surface: Call ensure_size_valid() on shaped-texture · a09c9142
      Robert Mader authored and  Marge Bot's avatar Marge Bot committed
      Use the new API to make sure the shaped texture has a valid size
      during the next layout phase.
      
      This is needed here because, quoting the previous commit:
      
      When the texture size is invalidated using `invalidate_size()`, the new
      size will only get calculated the next time `update_size()` is
      called. This happens e.g. in `meta_shaped_texture_get_preferred_size()`
      via `ensure_size_valid()`.
      
      `update_size()` can chain up to `clutter_content_invalidate_size()`
      as well as emitting a `size-changed` signal. If this happens during
      layout, the result is a 'change the layout conditions during layout'
      issue, causing heavy breakage in e.g. the Shell overview.
      
      To fix this, expose `ensure_size_valid()` as API so callers can make
      sure the texture has a valid size without creating redundant size
      invalidations calls.
      
      Note that if a buffer with a new size is attached we already trigger
      `update_size()` explicitely, avoiding such situations.
      
      Closes GNOME/mutter#1718
      
      Part-of: <GNOME/mutter!1799>
      a09c9142
    • Robert Mader's avatar
      shaped-texture: Expose ensure_size_valid() API · 5772c27e
      Robert Mader authored and  Marge Bot's avatar Marge Bot committed
      When the texture size is invalidated using `invalidate_size()`, the new
      size will only get calculated the next time `update_size()` is
      called. This happens e.g. in `meta_shaped_texture_get_preferred_size()`
      via `ensure_size_valid()`.
      
      `update_size()` can chain up to `clutter_content_invalidate_size()`
      as well as emitting a `size-changed` signal. If this happens during
      layout, the result is a 'change the layout conditions during layout'
      issue, causing heavy breakage in e.g. the Shell overview.
      
      To fix this, expose `ensure_size_valid()` as API so callers can make
      sure the texture has a valid size without creating redundant size
      invalidations calls.
      
      Note that if a buffer with a new size is attached we already trigger
      `update_size()` explicitely, avoiding such situations.
      
      Part-of: <GNOME/mutter!1799>
      5772c27e
    • Robert Mader's avatar
      shaped-texture: Use G_APPROX_VALUE to compare viewport source rects · 50ba52b1
      Robert Mader authored and  Marge Bot's avatar Marge Bot committed
      Part-of: <GNOME/mutter!1799>
      50ba52b1
    • Robert Mader's avatar
      region-utils: Fix typo in crop_and_scale() fastpath · 1bfd932f
      Robert Mader authored and  Marge Bot's avatar Marge Bot committed
      Fixes 09b1bbb1
      
      Part-of: <GNOME/mutter!1786>
      1bfd932f
    • Robert Mader's avatar
      shaped-texture: Viewport update calculation fixes · 52547cb9
      Robert Mader authored and  Marge Bot's avatar Marge Bot committed
      If only a viewport destination size is set, the noop viewport has
      to take the buffer scale into account.
      
      If a viewport source but no viewport destination size is set, the
      destination size is that of the viewport source, not of the whole
      texture.
      
      Part-of: <GNOME/mutter!1786>
      52547cb9
    • Carlos Garnacho's avatar
      core: Drop X11 error trap from pointer warping code · 1d82e0f2
      Carlos Garnacho authored
      This code is backend-agnostic, and should not do anything special
      about X11. Drop these error traps, and let the backend deal with
      the possible errors.
      
      Fixes: GNOME/mutter#1725
      Part-of: <GNOME/mutter!1807>
      1d82e0f2
    • Carlos Garnacho's avatar
      backends/x11: Add traps around XIPointerWarp call · 1b1f8520
      Carlos Garnacho authored
      This is left up to higher level code, which is not too nice.
      
      Part-of: <GNOME/mutter!1807>
      1b1f8520
  7. 28 Mar, 2021 1 commit
  8. 27 Mar, 2021 1 commit