1. 04 Feb, 2019 5 commits
  2. 03 Feb, 2019 1 commit
    • Josh Triplett's avatar
      Don't include potentially sensitive window titles in logs · b4ae6cdd
      Josh Triplett authored
      For various error and warning messages, mutter includes a description of
      the window, and that description includes a snippet of the title of the
      window. Those snippets find their way into system logs, which then means
      they can potentially find their way into bug reports and similar. Remove
      the window title information to eliminate this potential privacy issue.
      b4ae6cdd
  3. 01 Feb, 2019 6 commits
    • Georges Basile Stavracas Neto's avatar
      clutter/paint-nodes: Push/pop framebuffer · 317414ab
      Georges Basile Stavracas Neto authored
      Unfortunately, many parts of GNOME Shell and Mutter and Clutter
      still use the implicit Cogl1 API. As such, it as a transition
      between the old and new APIs, it is important to keep the
      implicit draw framebuffer updated.
      
      ClutterRootNode does not keep it updated though, and it might
      lead to problems when rendering offscreen textures.
      
      Fix that by pushing and popping the root node framebuffer on
      pre- and post-draw, respectively.
      
      GNOME/mutter!405
      317414ab
    • Georges Basile Stavracas Neto's avatar
      clutter/paint-nodes: Expose ClutterRootNode · b63e1045
      Georges Basile Stavracas Neto authored
      The ClutterRootNode paint node is theoretically the
      top-most node of a paint nodes tree, except that we
      are not in the point of having full rendering trees
      in Clutter (all rendering performed by paint nodes
      is still local and immediate).
      
      When controlling the rendering tree, MetaShapedTexture
      may need to paint into an offscreen framebuffer under
      some circumstations.
      
      Expose ClutterRootNode so that MetaShapedTexture can
      use it to render to offscreen framebuffers.
      
      GNOME/mutter!405
      b63e1045
    • Georges Basile Stavracas Neto's avatar
      clutter/paint-node: Expose clutter_paint_node_paint() · 02b184bf
      Georges Basile Stavracas Neto authored
      When painting to an offscreen framebuffer, MetaShapedTexture will
      need to have full control of the painting routines of paint nodes.
      As such, expose clutter_paint_node_paint() to allow forcing a
      paint nodes paint from MetaShapedTexture.
      
      GNOME/mutter!405
      02b184bf
    • Georges Basile Stavracas Neto's avatar
      clutter/paint-node: Add multitexture API · d8c75839
      Georges Basile Stavracas Neto authored
      The multitexture API is not a shortcut for multiple calls
      to the single texture API. It is meant to wrap calls to
      cogl_framebuffer_draw_multitexture_rectangle(), which
      uses the passed texture coordinates at different layers of
      the pipeline.
      
      GNOME/mutter!405
      d8c75839
    • Georges Basile Stavracas Neto's avatar
      clutter/image: Also invalidate size · 25f36b38
      Georges Basile Stavracas Neto authored
      ClutterImage is a ClutterContent implementation that
      has an internally managed CoglTexture. This texture
      is recreated when new image data is set.
      
      ClutterContent implementations may have control over
      the allocation of the widgets they're attached to,
      through CLUTTER_REQUEST_CONTENT_SIZE. On those cases,
      if the new image data differs in size from the previous
      data, it is important to notify those actors about the
      size change. However, currently ClutterImage does not
      notify them.
      
      With the introduction of clutter_content_invalidate_size(),
      it is possible to report the size changes to attached
      actors.
      
      Adapt ClutterImage to invalidate_size() when image data
      has different sizes.
      
      GNOME/mutter!405
      25f36b38
    • Georges Basile Stavracas Neto's avatar
      clutter/content: Add clutter_content_invalidate_size() · 0f0b411f
      Georges Basile Stavracas Neto authored
      ClutterContent has the ability to dictate the layout of any
      given actor, through the CLUTTER_REQUEST_CONTENT_SIZE request
      mode.
      
      However, there is no way for ClutterContent implementations
      to notify their attached actors that the content size changed.
      
      Add a new optional ClutterContent.invalidate_size() vfunc and
      clutter_content_invalidate_size().
      
      GNOME/mutter!405
      0f0b411f
  4. 31 Jan, 2019 1 commit
  5. 30 Jan, 2019 18 commits
    • Florian Müllner's avatar
      ui: Remove fallback app menu · de760743
      Florian Müllner authored
      The app menu is in the process of being retired[0], and the shell
      stopped displaying it while applications are in the process of
      dropping it. It therefore doesn't make sense to always show a
      fallback menu in server-side decorations, applications that still
      set the menu can rely on GTK+'s own fallback instead.
      
      [0] https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
      
      GNOME/gnome-shell#624
      de760743
    • Marco Trevisan's avatar
      gitlab-ci: Define exported global variables once · f63b69bb
      Marco Trevisan authored
      Don't redefine XDG runtime and gsettings schema paths multiple times, just
      export the variables once and reuse them.
      
      !408
      f63b69bb
    • Marco Trevisan's avatar
    • Marco Trevisan's avatar
      gitlab-ci: Use artifacts to keep built data and reuse in test · 7a941138
      Marco Trevisan authored
      Make test to be dependent on build phase, saving artifacts for some time in
      order to just run the tests without performing any rebuild.
      
      GNOME/mutter!408
      7a941138
    • Jonas Ådahl's avatar
      screen-cast-stream: Don't broadcast PipeWireStreamAdded signal · 2c540453
      Jonas Ådahl authored
      The helper function from gdbus-codegen broadcasts the signal emission,
      but we really only care about sending it to the specific peer that
      created the session. Thus, only emit the signal to the particular peer
      that owns the session.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=784199
      2c540453
    • Piotr Drąg's avatar
      Update POTFILES.skip · be259117
      Piotr Drąg authored
      be259117
    • Pekka Paalanen's avatar
      renderer/native: fix missing GPU copy egl ext error · 6932b3cb
      Pekka Paalanen authored
      If the extension is missing, the GPU copy path would not work. The code sets
      the error, but forgets to return a failure. Fix this.
      
      While adding the necessary return FALSE, also destroy the EGL context we just
      created. Code refactoring shares the destroying code.
      
      Found by reading code.
      
      GNOME/mutter!416
      6932b3cb
    • Emilio Pozuelo Monfort's avatar
      backends/native: Don't use software renderer for GPU copy · b76bf200
      Emilio Pozuelo Monfort authored
      If the GPU copy path would use a software renderer, fall back to the CPU
      copy path. The CPU copy path is possibly faster and avoids screen
      corruption issues that were observed on an Intel Haswell desktop. The
      corruption was likely due to texturing from an unfinished rendering or
      memory caching issues.
      
      !325
      b76bf200
    • Pekka Paalanen's avatar
      renderer/native: Debug print chosen secondary FB format · a62dbc66
      Pekka Paalanen authored
      Print the pixel format chosen for an output on a secondary GPU for
      debugging. Knowing the format can aid in debugging e.g. red/blue channel
      swaps and CPU copy performance issues.
      
      This adds a DRM format printing helper in meta-crtc-kms.h. This header
      is included in most native backend files making it widely available,
      while DRM formats are specific to the native backend. It could be shared
      with Wayland bits, DRM format codes are used there too.
      
      The helper makes the pixel format much more readable than a "%x".
      
      GNOME/mutter!341
      a62dbc66
    • Pekka Paalanen's avatar
      renderer/native: Valid formats for secondary dumb buffers · 442dcc78
      Pekka Paalanen authored
      When setting up an output on a secondary GPU with the CPU copy mode,
      allocate the dumb buffers with a DRM format that is advertised supported
      instead of hardcoding a format.
      
      Particularly, DisplayLink devices do not quite yet support the hardcoded
      DRM_FORMAT_XBGR8888. The proprietary driver stack actually ignores the
      format assuming it is DRM_FORMAT_XRGB8888 which results the display
      having red and blue channels swapped. This patch fixes the color swap
      right now, while taking advantage if the driver adds support for XBGR
      later.
      
      The preferred_formats ordering is somewhat arbitrary. Here it is written
      from glReadPixels point of view, based on my benchmarks on Intel Haswell
      Desktop machine. This ordering prefers the format that was hardcoded
      before.
      
      !341
      442dcc78
    • Pekka Paalanen's avatar
      crtc/kms: Add primary plane format list accessors · 23e7a0a0
      Pekka Paalanen authored
      These functions allow inspecting which pixel formats a CRTC's primary
      plane supports. Future patches will inspect the supported formats and
      pick a framebuffer format accordingly instead of hardcoding a format.
      
      The copy list function will be used to initialize a formats list, and
      the supports format function will be used to intersect that list against
      another CRTC's supported formats.
      
      GNOME/mutter!341
      23e7a0a0
    • Pekka Paalanen's avatar
      crtc/kms: Document meta_crtc_kms_get_modifiers · 7f2dbb6c
      Pekka Paalanen authored
      It has some details that may not be obvious from the function signature.
      
      GNOME/mutter!341
      7f2dbb6c
    • Pekka Paalanen's avatar
      crtc/kms: Add fallback primary plane formats · 8a0d0ce9
      Pekka Paalanen authored
      This avoids having to hardcode the same fallbacks elsewhere multiple
      times when determining what formats might be suitable for a set of
      CRTCs. The formats_modifiers hash table is now guaranteed to be
      populated with at least something, so future code will not need to
      handle it being empty.
      
      The hardcoded fallback formats are a minimal set probably supported by
      most hardware. XRGB8888 is the format that, according to ancient lore,
      all DRM devices should support, especially if they don't have the
      capability to advertise otherwise. Mutter also hardcodes XRGB8888 as the
      GBM surface format, so it is already required on primary GPUs.
      
      XBGR8888 matches the most common OpenGL format, sans alpha channel since
      scanout hardware has not traditionally supported alpha. XBGR8888 is here
      also because Mutter hardcodes that format for secondary GPU outputs when
      using the CPU copy path.
      
      !341
      8a0d0ce9
    • Pekka Paalanen's avatar
      crtc/kms: Use plane formats if no IN_FORMATS · 0789c3fb
      Pekka Paalanen authored
      If the IN_FORMATS property is not found, copy the formats from the DRM
      plane instead. This is the fallback for getting a list of formats the
      primary plane supports when DRM universal planes capability is enabled.
      
      GNOME/mutter!341
      0789c3fb
    • Pekka Paalanen's avatar
      crtc/kms: Remove unused field formats_prop_id · 31d99c51
      Pekka Paalanen authored
      It was set but never used.
      
      GNOME/mutter!341
      31d99c51
    • Pekka Paalanen's avatar
      crtc/kms: Parse and store IN_FORMATS in full · 30550ef6
      Pekka Paalanen authored
      Rather than picking just one format, parse and store all the formats and
      their modifiers.
      
      This gives us a list of supported formats (and modifiers) on a CRTC
      primary plane. Later I will be using this list to choose a framebuffer
      format instead of hardcoding it.
      
      GNOME/mutter!341
      30550ef6
    • Olivier Fourdan's avatar
      clutter/evdev: Set the backend keymap before using it · b04cca9e
      Olivier Fourdan authored
      The device manager evdev assumes the keymap is set, so better set it
      before its creation.
      
      Closes: #451
      Fixes: 6de81b05 "evdev: Implement ClutterKeymap"
      b04cca9e
    • Daniel van Vugt's avatar
      clutter: Avoid redundant margin changes · e0fd7a6d
      Daniel van Vugt authored
      When profiling gnome-shell it was found that one of the main triggers
      of `clutter_actor_queue_relayout` during animations was
      `clutter_actor_set_margin_internal` continuously setting the same
      zero margins. That's obviously pointless and also expensive. So just
      avoid redundant margin changes.
      
      This helps to further improve performance in:
      GNOME/mutter#233,
      GNOME/gnome-shell#349
      
      This change previously landed as 59acb389 and then got reverted because
      it was found to make gnome-shell#517 worse. However that bug now has a
      proper fix and this branch isn't really directly related so is being
      reproposed...
      e0fd7a6d
  6. 29 Jan, 2019 3 commits
    • Carlos Garnacho's avatar
      clutter: Add ClutterKeymap getter · 923751aa
      Carlos Garnacho authored
      It is fetched from the ClutterBackend so far.
      923751aa
    • Carlos Garnacho's avatar
      evdev: Implement ClutterKeymap · 6de81b05
      Carlos Garnacho authored
      Just move the minimal bits to this ClutterKeymapEvdev object. Much
      of the functionality of a keymap is spread along ClutterSeatEvdev,
      ClutterDeviceManagerEvdev and ClutterVirtualInputDevice. Future
      refactors are due here.
      
      Also, ideally keymaps are per-seat objects (at least keyboard state
      is). We don't expose much info about seats altogether outside the
      evdev device manager implementation. We just poke the main seat at
      places, but eventually seats should be public.
      6de81b05
    • Carlos Garnacho's avatar
      clutter: Add generic ClutterKeymap object · 7ae69879
      Carlos Garnacho authored
      We thus far have similar objects/code internal to backends. Expose the
      minimum API necessary to cater for gnome-shell as a generic object.
      So far only the X11 backend has an actual GObject for it, and was made
      to be a subclass right away.
      7ae69879
  7. 28 Jan, 2019 1 commit
    • Robert Mader's avatar
      clutter-box-layout: Use floats and assert on denormal numbers · 72692b11
      Robert Mader authored
      `distribute_natural_allocation` expects an input >= 0 of type `gint`. In
      `get_preferred_size_for_opposite_orientation` it is used with an unchecked
      variable `size` of type `gfloat`, which in case it is `Infinity`, gets
      passed on in the macro `MAX (0, size)`. `Infinity` becomes `G_MININT`
      when implicitly casted to `gint` in `distribute_natural_allocation`,
      triggering the assertion `extra_space >= 0`.
      
      The resulting warning in the log is counter intuitive and not very
      helpful.
      
      Use `float` in `distribute_natural_allocation` instead of `gint` and
      assert on denormal values so we can more easily identify bugs.
      
      Additionally change some types while at it and add a even more
      expressive warning referencing the actor at one point.
      
      !375
      72692b11
  8. 26 Jan, 2019 3 commits
    • Carlos Garnacho's avatar
      wayland: Implement window activation and focus stealing prevention · 177b4df2
      Carlos Garnacho authored
      This is done through gtk-shell ATM. If a window requests focus with
      an invalid startup ID, just the demands-attention flag will be set.
      The "did user interaction happen in between" checks are left to
      meta_window_activate_full/meta_window_focus, by passing the timestamp
      of the original launch request.
      177b4df2
    • Carlos Garnacho's avatar
      wayland: Update gtk-shell protocol to v3 · a08d7cf4
      Carlos Garnacho authored
      This version has 2 new requests:
      - gtk_shell1.notify_launch notifies the compositor that the requesting
        client shall launch another application. The given ID is expected to
        be unique.
      - gtk_surface1.request_focus notifies the compositor that a surface
        requests focus due to it being activated. The given ID is passed to
        this process through undetermined means, if it corresponds with a
        current startup ID and there was no user interaction in between the
        surface will be focused, otherwise it will demand attention.
      a08d7cf4
    • Jonas Ådahl's avatar
      screen-cast: Fix monitor recording on HiDPI · 3fa6a92c
      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
      3fa6a92c
  9. 25 Jan, 2019 2 commits
    • Florian Müllner's avatar
      Fix builds with G_DISABLE_ASSERT · d5a7bbd0
      Florian Müllner authored
      Commit 25f416c1 added additional compilation warnings, including
      -Werror=return-type. There are several places where this results
      in build failures if `g_assert_not_reached()` is disabled at compile
      time and the compiler misses a return value.
      
      #447
      d5a7bbd0
    • Florian Müllner's avatar
      clutter: Fix builds with G_DISABLE_ASSERT · de41f3ea
      Florian Müllner authored
      Commit 25f416c1 added additional compilation warnings, including
      -Werror=return-type. There are several places where this results
      in build failures if `g_assert_not_reached()` is disabled at compile
      time and the compiler misses a return value.
      
      GNOME/mutter#447
      de41f3ea