1. 16 Apr, 2019 28 commits
  2. 15 Apr, 2019 2 commits
    • Olivier Fourdan's avatar
      wayland/output: Set user data of xdg_output resource · 2c1a951b
      Olivier Fourdan authored
      mutter would randomly crash in `send_xdg_output_events()` when changing
      the fractional scaling:
      
        wl_resource_post_event ()
        zxdg_output_v1_send_logical_size ()
        send_xdg_output_events ()
        wayland_output_update_for_output ()
        meta_wayland_compositor_update_outputs ()
        on_monitors_changed ()
        g_closure_invoke ()
        signal_emit_unlocked_R ()
        g_signal_emit_valist ()
        _signal_emit ()
        meta_monitor_manager_notify_monitors_changed ()
        meta_monitor_manager_rebuild ()
      
      This is because the xdg-output resource got freed but wasn't removed
      from the list of resources.
      
      Fix this by setting the user data of the xdg-output resource to the
      corresponding `MetaWaylandOutput` so that the xdg-output resource
      destructor can remove it from the list of resources.
      
      !538
      2c1a951b
    • verdre's avatar
      keybindings: Stop keybinding if a touch happens while Super is pressed · 6ec330cc
      verdre authored
      We use the combination of pressing Super and clicking+moving the mouse
      to drag windows around and we also support pressing Super and using the
      touchscreen to drag windows.
      
      Since we don't want to show the overview when the Super key was used to
      initiate a window drag, prevent showing the overview in case a
      TOUCH_BEGIN or TOUCH_END event happened during the key was pressed.
      
      Fixes #228
      
      !495
      6ec330cc
  3. 12 Apr, 2019 1 commit
    • Daniel van Vugt's avatar
      cogl-winsys-glx: Fix frame notification race/leak · 20c1295a
      Daniel van Vugt authored
      If a second `set_{sync,complete}_pending` was queued before the idle
      handler had flushed the first then one of them would be forgotten.
      It would stay queued forever and never emitted as a notification.
      
      This could happen repeatedly causing a slow leak. But worse still,
      `clutter-stage-cogl` would then have `pending_swaps` permanently stuck
      above zero preventing the presentation timing logic from being used.
      
      The problem is that a boolean can only count to one, but in some cases
      (triple buffering, whether intentional or accidental #334) we need it to
      count to two. So just change booleans to integers and count properly.
      
      !216
      20c1295a
  4. 11 Apr, 2019 4 commits
    • Olivier Fourdan's avatar
      clutter/evdev: Toggle accessibility features from keyboard · fa4a7873
      Olivier Fourdan authored
      The keyboard accessibility setting "enable" is actually even more
      misleading that initially anticipated, as it does not control the
      entire keyboard accessibility feature, but just the "enable by
      keyboard" feature, i.e. being able to enable or disable stickykeys
      or slowkeys using various keyboard actions.
      
      Yet the accessibility features should still work even if the "enable"
      setting is unset, those can be controlled by the accessibility menu in
      GNOME Shell for example.
      
      Change the clutter/evdev implementation to match that behavior as found
      in the x11 backend, so both backends are now consistent.
      
      !531
      fa4a7873
    • Olivier Fourdan's avatar
      clutter/device-manager: Small code cleanup · 85b734fd
      Olivier Fourdan authored
      Use a `memcmp()` instead of checking every field in the structure to be
      equal, it's both faster and less error prone.
      
      !531
      85b734fd
    • Pekka Paalanen's avatar
      renderer/native: Check primary GPU supports EGL · 28419cde
      Pekka Paalanen authored
      Since "renderer/native: make EGL initialization failure not fatal" it is
      possible, under specific failure conditions, to end up with a primary GPU whose
      EGL initialization failed. That cannot work.
      
      !521
      28419cde
    • Pekka Paalanen's avatar
      renderer/native: Make EGL initialization failure not fatal · 3b46a8cd
      Pekka Paalanen authored
      The failure to initialize EGL does not necessarily mean the KMS device cannot
      be used. The device could still be used as a "secondary GPU" with the CPU copy
      mode.
      
      If meta_renderer_native_create_renderer_gpu_data () fails,
      meta_renderer_native_get_gpu_data () will return NULL, which may cause crashes.
      This patch removes most of the failures, but does not fix the NULL dereferences
      that will still happen if creating gpu data fails.
      
      This patch reorders create_renderer_gpu_data_gbm () so that it fails hard only
      if GBM device cannot be created, and otherwise always returns an initialized
      gpu data structure. Users of the gpu data structure are responsible for
      checking egl_display validity.
      
      The GBM device creation failure is a hard failure because presumably GBM is
      necessary for cursors.
      
      Fixes: #542
      !521
      3b46a8cd
  5. 02 Apr, 2019 5 commits
    • Jonas Ådahl's avatar
      renderer-native: Freeze frames while retrying to page flip · b2d0184c
      Jonas Ådahl authored
      We're currently always waiting for unfinished page flips before flipping
      again. This is awkward when we are in an asynchronous retry-page-flip
      loop, as we can synchronously wait for any KMS page flip event.
      
      To avoid ending up with such situations, just freeze the frame clock
      while we're retrying, then thaw it when we succeded.
      
      !506
      b2d0184c
    • Jonas Ådahl's avatar
    • Jonas Ådahl's avatar
      backend: Add API to freeze/thaw frame clock · 88e4ff74
      Jonas Ådahl authored
      It's just a thin wrapper around the ClutterStage API, with the intention
      to hide the awkward nest of interdependent backends.
      
      !506
      88e4ff74
    • Jonas Ådahl's avatar
      renderer-native: Fake page flipping slower when power saving · 3cc3b752
      Jonas Ådahl authored
      We rely on the frame clock to compress input events, thus if the frame
      clock stops, input events are not dispatched. At the same time, there
      is no reason to redraw at a full frame rate, as nothing will be
      presented anyway, so slow down to 10Hz (compared to the most common
      60Hz). Note that we'll only actually reach 10Hz if there is an active
      animation being displayed, which won't happen e.g. if there is a screen
      shield in the way.
      
      !506
      3cc3b752
    • Jonas Ådahl's avatar
      renderer-native: Fake page flipped if power saving when retrying · 53b59d8b
      Jonas Ådahl authored
      When we're in a page-flip retry loop due to the FIFO being full
      (drmModePageFlip() failing with EBUSY), we should not continue to try
      when starting to power save, as that means we're blocking new frames,
      which itself blocks input events due to them being compressed using the
      frame clock.
      
      We'd also hit an assert assuming we only try to page flip when not power
      saving.
      
      Thus, fake we flipped if we ended up reaching a power saving state while
      retrying.
      
      Fixes: #509
      
      !506
      53b59d8b