1. 05 Sep, 2019 1 commit
  2. 18 Jul, 2019 2 commits
    • Marco Trevisan's avatar
      window-x11: Remove double definition of MetaStack · 2a81dc45
      Marco Trevisan authored
      In commit c05fe4ae we introduced a double definition of MetaStack due to a
      wrong cherry-pick conflict resolution.
      
      Fix this by removing the invalid duplicated line.
      
      Related to !688
      2a81dc45
    • Marco Trevisan's avatar
      window-x11: Focus a window in the active workspace as take-focus fallback · c05fe4ae
      Marco Trevisan authored
      Starting with commit 2db94e2e we try to focus a fallback default focus window
      if no take-focus window candidate gets the input focus when we request it and
      we limit the focus candidates to the current window's workspace.
      
      However, if the window is unmanaging, the workspace might be unset, and we could
      end up in deferencing a NULL pointer causing a crash.
      
      So, in case the window's workspace is unset, just use the currently active
      workspace for the display.
      
      Closes #687
      
      !688
      
      (cherry picked from commit 5ca0ef07)
      c05fe4ae
  3. 08 Jul, 2019 7 commits
    • Marco Trevisan's avatar
      window-x11: Use any focusable window as fallback delayed focus window · 2a692a03
      Marco Trevisan authored
      As per commit f71151a5 we focus an input window if no take-focus-window accepts
      it. This might lead to an infinite loop if there are various focusable but
      non-input windows in the stack.
      
      When the current focus window is unmanaging and we're trying to focus a
      WM_TAKE_FOCUS window, we intent to give the focus to the first focusable input
      window in the stack.
      
      However, if an application (such as the Java ones) only uses non-input
      WM_TAKE_FOCUS windows, are not requesting these ones to get the focus. This
      might lead to a state where no window is focused, or a wrong one is.
      
      So, instead of only focus the first eventually input window available, try to
      request to all the take-focus windows that are in the stack between the
      destroyed one and the first input one to acquire the input focus.
      Use a queue to keep track of those windows, that is passed around stealing
      ownership, while we protect for unmanaged queued windows.
      
      Also, reduce the default timeout value, as the previous one might lead to an
      excessive long wait.
      
      Added metatests verifying these situations.
      
      Closes: #660
      !669
      
      (cherry picked from commit 6d8293a4)
      2a692a03
    • Marco Trevisan's avatar
      tests: Add "accept_take_focus" command · 288ab54c
      Marco Trevisan authored
      When used it setups an X11 event monitor that replies to WM_TAKE_FOCUS
      ClientMessage's with a XSetInputFocus request.
      
      It can only be used by x11 clients on windows that have WM_TAKE_FOCUS atom set
      and that does not accept input.
      
      !669
      
      (cherry picked from commit b80250e4)
      288ab54c
    • Marco Trevisan's avatar
      test-client: Add x11 events GSource handler · 0733f22b
      Marco Trevisan authored
      When using gtk under X11 some WM related events are always filtered and not
      delivered when using the gdk Window filters.
      
      So, add a new one with higher priority than the GTK events one so that we can
      pick those events before than Gtk itself.
      
      !669
      
      
      (cherry picked from commit bd0f1bd3)
      0733f22b
    • Marco Trevisan's avatar
      stack: Add a function to get a sorted list of focus candidates · 60ea3233
      Marco Trevisan authored
      Use a static function if a window can be the default focus window, and use such
      function to return a filtered list of the stack.
      
      !669
      
      (cherry picked from commit 2439255f)
      60ea3233
    • Marco Trevisan's avatar
      window-x11: Accept any focusable window as fallback focus · 03d880ad
      Marco Trevisan authored
      As per commit f71151a5 we were ignoring WM_TAKE_FOCUS-only windows as focus
      targets, however this might end-up in an infinite loop if there are multiple
      non-input windows stacked.
      
      So, accept any focusable window as fallback focus target even if it's a
      take-focus one (that might not reply to the request).
      
      Added a stacking test to verify this.
      
      Closes: #660
      !669
      
      (cherry picked from commit c327b2df)
      03d880ad
    • Marco Trevisan's avatar
      window-x11: Don't double-check for unmanaging windows · bee55a27
      Marco Trevisan authored
      When looking for the best fallback focus window, we ignore it if it is in the
      unmanaging state, but meta_stack_get_default_focus_window() does this is check
      for us already.
      
      So, ignore the redundant test.
      
      !669
      
      
      (cherry picked from commit 9aee47da)
      bee55a27
    • Marco Trevisan's avatar
      Makefile-tests: Fix paths for stacking metatests · 4349e682
      Marco Trevisan authored
      In commit 29ffaa6f and commit 8abd1b00 were added stacking tests with wrong
      paths.
      
      Fix them.
      
      Realated to: !307
      
      # Conflicts:
      #	src/Makefile-tests.am
      4349e682
  4. 28 Jun, 2019 5 commits
    • Marco Trevisan's avatar
      surface-actor-x11: Bind the surface actor resources to window actor life · 9f98743c
      Marco Trevisan authored
      X11 actors need to release the server data (pixmap and damage) before the
      display is closed.
      During the close phase all the windows are unmanaged and this causes the window
      actors to be removed from the compositor, unsetting their actor surface.
      
      However, in case a window is animating the surface might not be destroyed until
      the animation is completed and a reference to it kept around by gjs in the shell
      case. By the way, per commit 7718e67f all window actors (even the animating
      ones) are destroyed before the display is closed, but this is not true for the
      child surface, because the parent window will just unref it, leaving it around
      if reffed somewhere else. This is fine for wayland surfaces, but not for X11
      ones which are bound to server-side pixmaps.
      
      So, connect to the parent MetaWindowActor "destroy" signal, releasing the x11
      resources that implies detaching the pixmap (unsetting the texture) and removing
      the damages.
      
      Closes: #629
      !660
      
      (cherry picked from commit de97b545)
      9f98743c
    • Marco Trevisan's avatar
      surface-actor-x11: Assign X11 Display only if we have resources · d4759df5
      Marco Trevisan authored
      free_damage and detach_pixmap functions are called inside dispose and an object
      can be disposed multiple times, even when the display is already closed.
      
      So, don't try to deference a possibly null-pointer, assigning the xdisplay too
      early, as if the X11 related resources have been unset, the server might not be
      open anymore. In fact, we assume that if we have a damage or a pixmap set,
      the display is still open.
      
      !660
      
      (cherry picked from commit d7d97f24)
      d4759df5
    • Marco Trevisan's avatar
      window-actor: Set actor as compositor private in window before the surface · ffa4279a
      Marco Trevisan authored
      In MetaWindowActor creation we're setting the compositor private (i.e. the
      window actor itself) of a window before creating the surface actor, and so
      passing to the it a window without its compositor side set.
      
      Since the surface actor might use the parent actor, set this before updating
      the surface.
      
      !660
      
      (cherry picked from commit 7776941b)
      ffa4279a
    • Marco Trevisan's avatar
      window-x11: Add lost definition for TAKE_FOCUS_FALLBACK_DELAY_MS · a51188f8
      Marco Trevisan authored
      In commit 8abd1b00 (cherry-pick to gnome-3-30 of commit f71151a5) the
      definition of TAKE_FOCUS_FALLBACK_DELAY_MS was not properly merged.
      
      Include this back to fix the build failure.
      
      !307
      a51188f8
    • Marco Trevisan's avatar
      window: Emit an error and return when trying to activate an unmanaged · a9322c81
      Marco Trevisan authored
      If something (i.e. gnome-shell or an extension) tries to activate an unmanaged
      window, we should warn about this and avoid to perform further actions as this
      could lead to a crash of mutter, since the window has not valid flags (like
      workspace) set anymore at this stage.
      
      Fixes #580
      
      !564
      
      
      (cherry picked from commit a6fc656e)
      a9322c81
  5. 24 Jun, 2019 9 commits
  6. 20 Jun, 2019 1 commit
  7. 13 Jun, 2019 1 commit
    • Emil Velikov's avatar
      renderer/native: add missing eglTerminate in EGLDevice error path · 6dbd057e
      Emil Velikov authored
      Currently the EGLDevice code gets the display and calls eglInitialize.
      As a follow-up it checks the required EGL extensions - technically it
      could check the EGL device extensions earlier.
      
      In either case, eglTerminate is missing. Thus the connection to the
      display was still bound.
      
      This was highlighted with Mesa commit d6edccee8da ("egl: add
      EGL_platform_device support") + amdgpu.
      
      In that case, since the eglTerminate is missing, we end up reusing the
      underlying amdgpu_device due to some caching in libdrm_amdgpu. The
      latter in itself being a good solution since it allows buffer sharing
      across primary and render node of the same device.
      
      Note: we should really get this in branches all the way back to 3.30.
      
      !619
      
      Fixes: 934184e2 ("MetaRendererNative: Add EGLDevice based rendering support")
      Cc: Jonas Ådahl <jadahl@gmail.com>
      Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      
      
      (cherry picked from commit 92135748)
      6dbd057e
  8. 27 May, 2019 3 commits
  9. 05 May, 2019 1 commit
  10. 03 May, 2019 2 commits
    • Marco Trevisan's avatar
      compositor: Disconnect from stage signals on destruction · 1d8c4285
      Marco Trevisan authored
      From this point there's not any need for the compositor to listen to signals
      so we can disconnect from the stage ones we are connected to.
      
      !556
      
      
      (cherry picked from commit 3ba79961)
      1d8c4285
    • Marco Trevisan's avatar
      compositor: Destroy window actors list on destruction · ffe94b0d
      Marco Trevisan authored
      When the compositor is destroyed we should cleanup the list of window actors we
      created and destroy them.
      Since all the actors are added to the window_group or top_window_group we can
      just destroy these containers (together with the feedback_group), and simply
      free the windows list.
      
      This is particularly needed under X11 because before we destroy the display, we
      might do some cleanups as detaching the surface pixmaps and freeing the damages
      and if this happens at later point (for example when triggered by garbage
      collector in gnome-shell), we might crash because the x11 dpy reference is
      already gone.
      
      Destroying the window actors instead, ensures we avoid any further call to X11
      related functions and that we release the actors XServer resources.
      
      Fixes #576
      
      
      (cherry picked from commit 7718e67f)
      ffe94b0d
  11. 30 Apr, 2019 1 commit
    • Andrea Azzarone's avatar
      clutter/x11: Consider remapped keys when guessing the keycode from the keysym · 0f7c35b9
      Andrea Azzarone authored
      Since e3e933c4 a keyval can be temporarily remapped to an unused keycode. Due to
      some limitations in XTestFakeKeyEvent, the remapping has to be done in the first
      xkb group/layout. In case there are two or more keyboard layouts enabled and the
      selected keyboard layout is not the first, clutter_keymap_x11_keycode_for_keyval
      will fail to retrieve the correct keycode for a remapped keyval. Let's use the
      reserved_keycodes map in order to retrieve the correct keycode if needed.
      
      Fixes: #443
      
      
      (cherry picked from commit e0811ce1)
      0f7c35b9
  12. 28 Mar, 2019 1 commit
  13. 21 Mar, 2019 1 commit
    • Olivier Fourdan's avatar
      clutter/evdev: Fix toggling accessibility features from keyboard · 6be39612
      Olivier Fourdan authored
      Enabling keyboard accessibility features on Wayland from the keyboard
      was wrongly assumed to be controlled by the "togglekeys" setting,
      whereas it should be simply controlled by the "enable" setting.
      
      As "togglekeys" is off by default and doesn't have a UI option to
      enable, that would prevent turning on or off the keyboard accessibility
      features using the keyboard.
      
      !501
      6be39612
  14. 30 Jan, 2019 1 commit
    • Jonas Ådahl's avatar
      monitor-manager: Don't use switch-config when ensuring configuration · 7260ba5d
      Jonas Ådahl authored
      Switch-configs are only to be used in certain circumstances (see
      meta_monitor_manager_can_switch_config()) so when ensuring
      configuration and attempting to create a linear configuration, use the
      linear configuration constructor function directly without going via the
      switch config method, otherwise we might incorrectly fall back to the
      fallback configuration (only enable primary monitor).
      
      This is a regression introduced by 6267732b.
      
      Fixes: #342
      
      
      (cherry picked from commit 149e4d69)
      7260ba5d
  15. 28 Jan, 2019 1 commit
    • Jonas Ådahl's avatar
      screen-cast: Fix monitor recording on HiDPI · 1c57a584
      Jonas Ådahl authored
      It scaled the logical monitor rect with scale to get the stream
      dimensions, but that is only valid when having
      'scale-monitor-framebuffers' enabled. Even when it was, it didn't work
      properly, as clutter_stage_capture_into() doesn't work properly with
      scaled monitor framebuffers yet.
      
      !415
      
      
      (cherry picked from commit 3fa6a92c)
      1c57a584
  16. 24 Jan, 2019 2 commits
  17. 23 Jan, 2019 1 commit
    • Daniel van Vugt's avatar
      clutter-offscreen-effect: Disable if no texture · c6223ffe
      Daniel van Vugt authored
      If texture allocation fails (e.g. on an old GPU with size limit 2048)
      then `update_fbo` would return `FALSE` but leaves `priv->offscreen`
      as non-NULL. So the next paint will try to use the offscreen with a
      `NULL` texture and crashes. The solution is simply to ensure that
      `priv->offscreen` is NULL if there is no `priv->texture`, so the default
      (non-offscreen) paint path gets used instead.
      
      Bug reported and fix provided by Gert van de Kraats.
      
      https://launchpad.net/bugs/1795774
      
      
      (cherry picked from commit f31cf0c3)
      
      (cherry picked from commit 1b78ca8c)
      c6223ffe