1. 23 Feb, 2021 3 commits
    • Jonas Ådahl's avatar
      clutter/stage-view: Disable double buffered shadow buffering · 95b683ae
      Jonas Ådahl authored
      To make the double buffered shadow buffer damaged tiles detection
      feasable, a new EGL extension is needed for creating FBO's backed by
      a custom CPU memory buffer, instead of DMA buffers, as DMA buffers can
      be very slow to read, much slower than just painting the shadow buffer
      Leave the code there, since such an EGL extension is intended to be
      added, but hide it behind an env var so that it isn't enabled by
      (cherry picked from commit ad5b5f2c)
      Part-of: <!1743>
    • Olivier Fourdan's avatar
      core: Account for the globally active input case · 2d34ee08
      Olivier Fourdan authored
      Commit afa43154 tried to make sure the focus was properly changed when
      calling focus_default_window() by checking the focused window just after
      trying to set the focus.
      However, the X11 “Inter-Client Communication Conventions Manual” version
      2.0 (ICCCM 2 for short) states that some X11 client may want to use a so
      called “globally active input” model in which case the client expects
      keyboard input and set input focus even when it's not one of its own
      To comply with this, when dealing with such clients, mutter will not
      change the focus and send a WM_TAKE_FOCUS message instead.
      That mechanism will defeat the logic introduced by commit afa43154
      because the focused window is not changed in this case. As a result, the
      input focus will fallback to the no-focus window.
      To avoid this, only check that the focus change occurred for windows
      using a synchronous focus model.
      v2: Split specific test for "globally active input" model (Florian).
      v3: Remove the check for window->unmanaging which is useless (Jonas).
      Fixes: afa43154 - "core: Make sure focus_default_window() worked"
      Close: #1620
      Part-of: <!1716>
      (cherry picked from commit 2432508d)
    • Olivier Fourdan's avatar
      window: Add "is_focus_async" API · cb7ac99f
      Olivier Fourdan authored
      X11 clients can use different models of input handling, of which some
      may not result focus being set synchronously.
      For such clients, meta_focus_window() will not change the focus itself
      but rely on the client itself to set the input focus on the desired
      Add a new MetaWindow API to check when dealing with such a window.
      Part-of: <!1716>
      (cherry picked from commit 6438919a)
  2. 11 Feb, 2021 4 commits
    • Carlos Garnacho's avatar
      wayland: Avoid automatically decoupling source/offer after grab · 2818cfda
      Carlos Garnacho authored
      In the case that DnD is performed and succeeds, we want to release
      the grab early, and let the transfer IPC happen in the back. For
      that to happen without a hitch, drag source and offer must be left
      related to each other after undoing the grab, even though the default
      ungrabbing code does that automatically (indirectly, by unsetting the
      drag focus).
      In these cases, we used to manually unset the current source, so
      this decoupling was skipped. Notably, one missed case is X11 DnD,
      so we might end up with the situation there that DnD did succeed,
      transfer is ongoing, but the source and offer are already decoupled,
      this confused the machinery and missed the finishing XdndFinished
      to be emitted to the X11 drag source.
      The prior commits prepared for this source/offer decoupling being
      a manual operation, this commit avoids doing this automatically
      when ungrabbing.
      Part-of: <!1720>
      (cherry picked from commit 698fe3f1)
    • Carlos Garnacho's avatar
      wayland: Manually detach source/offer on failure paths · 6f5832da
      Carlos Garnacho authored
      Adapt more paths to manual detaching of source/offer. This is still
      done automatically when the grab is finished.
      Part-of: <!1720>
      (cherry picked from commit 0f9dc84d)
    • Carlos Garnacho's avatar
      wayland: Plug XDnD drag source leak · ee26aea1
      Carlos Garnacho authored
      This object is just being detached, with no code unref'ing it. Do
      this whenever the XDnD selection goes unowned, usually a good
      indication that the drag source no longer is one.
      Part-of: <!1720>
      (cherry-picked from 8e01ea1e)
    • Carlos Garnacho's avatar
      wayland: Make XDnD grab unlink source/offer manually · 26008c45
      Carlos Garnacho authored
      This currently happens by default whenever the grab is finished.
      We want to eventually do this manually everywhere, so start here.
      Part-of: <!1720>
      (cherry picked from 3799606f)
  3. 08 Feb, 2021 1 commit
    • Jonas Ådahl's avatar
      clutter/timeline: Clear stage view listener when actor destroyed · 78c61f55
      Jonas Ådahl authored
      We might have a stage view listener attached to the stage itself if the
      actor didn't have a suitable frame clock when the actor was associated
      with the timeline. We'd then listen to stage-views-changed signals on
      the stage itself to be able to attach to a frame clock when one
      What went wrong is that if an actor that didn't have a frameclock was
      associated with a timeline, but then destroyed, the timeline would
      disassociate itself from the actor, but it'd still listen on the
      stage-views-changed signal on the stage. This would be in itself
      harmless, until the timeline itself is destroyed, as at this point, it
      wouldn't clean up the stage-views-changed listener on the stage, as it's
      assumed to only be valid when there is an actor attached.
      Fix this issue by cleaning up the stage's stage-views-changed listener
      when the actor is destroyed, as we wouldn't be able to make use of it by
      then anyway.
      Closes: gnome-shell#3323
      Part-of: <!1719>
      (cherry picked from commit 4145fbba)
  4. 06 Feb, 2021 3 commits
  5. 03 Feb, 2021 3 commits
    • Olivier Fourdan's avatar
      window/x11: Check before freezing commits · 2d424a73
      Olivier Fourdan authored
      Now that we have a window actor API that can hint whether or not the
      window actor would support freezing commits, use it to avoid freezing
      Xwayland commit on actors that will not be thawed after paint.
      Closes: #1615
      Part-of: <!1678>
      (cherry picked from commit a2e2cfe4)
    • Olivier Fourdan's avatar
      window-actor: Add a new can_freeze_commits() API · 2d47adc1
      Olivier Fourdan authored
      Mutter freezes Xwayland commits when resizing windows, and thaw them in
      the window actors' after_paint() for X11.
      Yet, after_paint() could be never called, as when a new window is mapped
      while the overview is active in gnome-shell.
      As a result, the content of the X11 window will remain invisible to the
      Add a new window actor API to tell whether commits can be frozen. For
      Wayland window actors, this always return FALSE, whereas for X11 window
      actors, it checks whether the Clutter actor is mapped.
      Part-of: <!1678>
      (cherry picked from commit df5a5d27)
    • Jonas Ådahl's avatar
      window: Freeze stack when calculating showing state · f68f0607
      Jonas Ådahl authored
      Constantly manipulating the stack caused severe stalls (several seconds)
      with many open windows when switching workspaces. The cause for this was
      that each show/hide call dealt with the stack in isolation, meaning if
      you hid N windows, we'd manipulate and synchronize the stack N times,
      potentially doing synchronous calls to the X server while doing so.
      Avoid the most severe stalls by freezing the stack while calculating
      showing; this made the worst case go from several seconds to around
      10-20 ms, which is still bad, but by far not as bad.
      Part-of: <!1616>
      (cherry picked from commit d43c8cd8)
  6. 29 Jan, 2021 7 commits
  7. 28 Jan, 2021 2 commits
  8. 13 Jan, 2021 1 commit
  9. 12 Jan, 2021 2 commits
  10. 11 Jan, 2021 3 commits
  11. 18 Dec, 2020 3 commits
    • Jonas Ådahl's avatar
      tests/stacking: Add test hiding a modal with a not shown parent · fbb9a34f
      Jonas Ådahl authored
      This adds a test case for
      #862 that checks that
      hiding a dialog where its parent is not yet shown doesn't trigger any
      asserts or crashes.
      (cherry picked from commit c94d9293)
      Part-of: <!1650>
    • Olivier Fourdan's avatar
      core: Be more selective looking for a focusable ancestor · 5fab0e10
      Olivier Fourdan authored
      find_focusable_ancestor() may pick an ancestor window which is not
      mapped or hidden, and setting focus on that window will fail.
      Be a tad more selective when looking for a focusable ancestor, to reduce
      the chance of meta_window_focus() not focusing the happy chosen one.
      (cherry picked from commit 76d1a642)
      Part-of: <!1650>
    • Olivier Fourdan's avatar
      core: Make sure focus_default_window() worked · e4d8e4b9
      Olivier Fourdan authored
      The function focus_default_window() optionally takes a MetaWindow
      argument denoting a window that should not be focused.
      That function calls focus_ancestor_or_top_window() which in turn
      calls meta_window_focus() to pass focus to another window.
      However meta_window_focus() gives no guarantee that the given window
      will end up being the one focused, and can fail in various and creative
      If that fails, we could possibly end up with the focus window being the
      one to avoid, while the caller assumes focus was changed, going as far
      as asserting that fact like meta_window_unmanage() does.
      As a result, mutter may abort simply because meta_window_focus() failed
      to set focus on the expected window.
      To avoid that issue, check that the focus did not end up on the window
      that we explicitly did not want, and if that's the case, simply fallback
      to the default focus window.
      Closes: #862
      (cherry picked from commit afa43154)
      Part-of: <!1650>
  12. 15 Dec, 2020 1 commit
    • Aleksandr Mezin's avatar
      xwayland: Set xrandr primary output · 00e247ed
      Aleksandr Mezin authored
      To find XWayland output that should be the primary one, iterate through all
      XWayland outputs, and compare their geometry to the geometry of the primary
      logical monitor.
      To avoid possible race conditions (Mutter's monitor configuration already
      updated, but Xrandr not yet), set the output both after Randr notifications and
      after 'monitors-changed' signal.
      #1407Signed-off-by: Aleksandr Mezin's avatarAleksandr Mezin <mezin.alexander@gmail.com>
      (cherry picked from commit 4f544b63)
      Part-of: <!1638>
  13. 12 Dec, 2020 1 commit
  14. 07 Dec, 2020 1 commit
  15. 04 Dec, 2020 1 commit
  16. 02 Dec, 2020 1 commit
  17. 27 Nov, 2020 3 commits