1. 07 Jun, 2019 3 commits
    • Jonas Ådahl's avatar
      cursor-renderer: Align OpenGL cursor rect to physical pixel grid · 178b975d
      Jonas Ådahl authored
      When stage views are scaled with fractional scales, the cursor rectangle
      won't be aligned with the physical pixel grid, making it potentially
      blurry when positioned in between physical pixels. This can be avoided
      by aligning the drawn rectangle to the physical pixel grid of the stage
      view the cursor is located on.
      
      Fixes: #413
      
      !610
      178b975d
    • Jonas Ådahl's avatar
      wayland/cursor-surface: Update sprite when attaching NULL · 36b36161
      Jonas Ådahl authored
      Attaching a NULL buffer should hide the cursor sprite. In these cases,
      we we'll have neither surface nor buffer damage, so also update when we
      just attached a NULL buffer.
      
      Fixes: #630
      36b36161
    • Jonas Ådahl's avatar
      wayland/surface: Clear texture when attaching NULL · 5eac1d69
      Jonas Ådahl authored
      When 252e64a0 moved the texture
      ownership to MetaWaylandSurface, it failed to handle the case when a
      NULL-buffer is attached, leaving the texture reference in place. This
      caused issues when the surface should have been hidden (e.g. attaching a
      NULL buffer to a cursor surface for hiding the cursor sprite).
      
      Related: #630
      5eac1d69
  2. 06 Jun, 2019 4 commits
    • Marco Trevisan's avatar
      x11-display: Handle mapped XIDs per type · 0487d672
      Marco Trevisan authored
      Starting from commit 7713006f, during X11 disposition we also unmanage the
      windows using the xids hash table values list.
      However, this is also populated by the X11 Meta barrier implementation and then
      contains both Windows and Barriers.
      
      So when going through the values list, check whether we're handling a window or
      a barrier and based on that, unmanage or destroy it.
      
      Fixes #624
      !605
      0487d672
    • Marco Trevisan's avatar
      display: Dispose Stack after Compositor and X11 · e94a0fce
      Marco Trevisan authored
      As per commit 7718e67f, destroying the compositor causes destroying window
      actors and this leads to stack changes, but at this point the stack was already
      disposed and cleared.
      
      So, clear the stack when any component that could use it (compositor, and X11)
      has already been destroyed.
      As consequence, also the stamps should be destroyed at later point.
      
      Fixes #623
      !605
      e94a0fce
    • Olivier Fourdan's avatar
      backends: Add mouse accessibility settings · a3b86447
      Olivier Fourdan authored
      Add support for mouse accessibility settings to set the click assist
      values.
      
      !512
      a3b86447
    • Olivier Fourdan's avatar
      backends: Rename keyboard accessibility settings · c33b3307
      Olivier Fourdan authored
      Naming the keyboard accessibility settings `a11y_settings` wrongly
      assumes there will never be any other type of accessibility settings.
      
      Rename `a11y_settings` to `keyboard_a11y_settings` to avoid future
      confusion.
      
      !512
      c33b3307
  3. 05 Jun, 2019 5 commits
  4. 03 Jun, 2019 2 commits
    • Olivier Fourdan's avatar
      settings: Slack off “xwayland-allow-grabs” setting · c9cc07fd
      Olivier Fourdan authored
      To emulate X11 grabs, mutter as a Wayland compositor would disable its
      own keyboard shortcuts and when the X11 window is an override redirect
      window (which never receives focus), it also forces keyboard focus onto
      that X11 O-R window so that all keyboard events are routed to the
      window, just like an X11 server would.
      
      But that's a bit of a “all-or-nothing” approach which prevents
      applications that would legitimately grab the keyboard under X11 (like
      virtual machine viewers) to work by default.
      
      Change “xwayland-allow-grabs” to control whether the keyboard focus
      should be locked onto override redirect windows in case of an X11 grab.
      
      For stringent needs, careful users can still use the blacklisting
      feature (i.e. a list containing “!*”) to prevent grabs from any X11
      applications to affect other Wayland native applications.
      
      #597
      c9cc07fd
    • Olivier Fourdan's avatar
      settings: Remove space characters · f6eb2a8c
      Olivier Fourdan authored
      Small code style cleanup.
      
      #597
      f6eb2a8c
  5. 31 May, 2019 5 commits
  6. 29 May, 2019 5 commits
    • Marco Trevisan's avatar
      compositor: Emit 'grab-op-end' signal after ungrab happened · 60170cff
      Marco Trevisan authored
      We're currently emitting the 'grab-op-end' signal when the grab prerequisites
      are met, but when display->grab_op is still set to a not-NONE value and thus
      meta_display_get_grab_op() would return that in the signal callback.
      And more importantly when this is emitted, devices are still grabbed.
      
      Instead, emit this signal as soon as we've unset all the grab properties and
      released the devices.
      
      Helps with gnome-shell#1326
      
      !596
      60170cff
    • Marco Trevisan's avatar
      display: Emit 'grab-op-end' signal after ungrab happened · e2bea480
      Marco Trevisan authored
      We're currently emitting the 'grab-op-end' signal when the grab prerequisites
      are met, but when display->grab_op is still set to a not-NONE value and thus
      meta_display_get_grab_op() would return that in the signal callback.
      And more importantly when this is emitted, devices are still grabbed.
      
      Instead, emit this signal as soon as we've unset all the grab properties and
      released the devices.
      
      Helps with gnome-shell#1326
      
      !596
      e2bea480
    • Carlos Garnacho's avatar
      wayland: Honor startup sequence workspace on .request_focus · bbfaf820
      Carlos Garnacho authored
      We handle this in backend specific code for x11, so do the wayland
      bits here. We can only honor this on applications that request focus
      on a surface after a startup request, as we do need an explicit
      surface to apply the workspace on (and we don't have additional clues
      like WMCLASS on X11). Notably, gtk_shell1.notify_startup doesn't suffice.
      
      Another gotcha is that the .request_focus happens when the surface is
      already "mapped". Due to the way x11 and the GDK api currently work (first
      reply on the startup id, then map a window, then request focus on that
      window). This means the surface will ignore at this point
      window->initial_workspace, so it must be actively changed.
      
      !544
      Closes: gnome-shell#674
      bbfaf820
    • Carlos Garnacho's avatar
      wayland: Unset DnD selection on wl_data_offer destruction · b3e19ee6
      Carlos Garnacho authored
      On a successful DnD operation we may expect the wl_data_source and
      wl_data_offer to live long enough to finish the data transfer, despite the
      grab operation (and other supporting data) being gone.
      
      When that happens, the compositor expects a wl_data_offer.finish request to
      notify that it finished. However the client may still chose not to send that
      and destroy the wl_data_offer instead, resulting in the MetaSelectionSource
      owner for the DnD selection not being unset.
      
      When that happens, the DnD MetaSelectionSource still exists but it's
      detached from any grab operation, so will not be unset if eg. the drag
      source client destroys the wl_data_source. This may result in crashes when
      the next drag operation tries to replace the owner DnD MetaSelectionSource.
      
      Check explicitly for this case, in order to ensure the DnD owner is unset
      after such operations.
      
      Closes: #591
      b3e19ee6
    • Pekka Paalanen's avatar
      renderer/native: Refactor into secondary_gpu_get_next_dumb_buffer · 21453339
      Pekka Paalanen authored
      Extract the next buffer -logic into a new function. This allows to
      simplify copy_shared_framebuffer_cpu () making it more readable.
      
      This change is a pure refactoring, no functional changes.
      
      !593
      21453339
  7. 28 May, 2019 5 commits
  8. 27 May, 2019 7 commits
  9. 24 May, 2019 4 commits
    • Carlos Garnacho's avatar
      wayland: Drop -terminate argument to Xwayland · b1ea7689
      Carlos Garnacho authored
      This argument instructs Xwayland to exit when there are no further
      client connections. However we eventually want to handle restarts
      ourselves (where, notably, mutter's will be at least the last client
      connection).
      
      This behavior could also induce race conditions on startup with clients
      that quickly open and close a display, which is a more pressing issue.
      
      Also, add -noreset back (which was also removed in commit 054c25f6 that
      added -terminate). We don't want to reset the X server to a pristine state
      in that situation either.
      
      !420
      b1ea7689
    • Carlos Garnacho's avatar
      wayland: Drop error trap · ea9d8a89
      Carlos Garnacho authored
      Code underneath seems to handle errors properly, or be x11-agnostic
      entirely, this is apparently here to save a few XSync()s on X11. Just
      drop this windowing dependent bit to make things cleaner.
      
      !420
      ea9d8a89
    • Carlos Garnacho's avatar
      compositor: Drop error trap · 38432da3
      Carlos Garnacho authored
      Code underneath seems to handle errors properly, and this is apparently
      here to save a few XSync()s on X11. Just drop this windowing dependent
      bit to make things cleaner.
      
      !420
      38432da3
    • Carlos Garnacho's avatar
      wayland: Split Xwayland initialization in 2 steps · 430f354c
      Carlos Garnacho authored
      It is now separated into meta_xwayland_start(), which picks an unused
      display and sets up the sockets, and meta_xwayland_init_xserver(), which
      does the actual exec of Xwayland and MetaX11Display initialization.
      
      This differentiation will be useful when Mutter is able to launch Xwayland
      lazily, currently the former calls into the latter.
      
      !420
      430f354c