1. 01 Feb, 2019 5 commits
    • 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.
      
      !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.
      
      !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
  2. 31 Jan, 2019 1 commit
  3. 30 Jan, 2019 18 commits
  4. 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
  5. 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
  6. 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.
      
      GNOME/mutter!415
      3fa6a92c
  7. 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.
      
      GNOME/mutter#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.
      
      #447
      de41f3ea
  8. 24 Jan, 2019 3 commits
    • Florian Müllner's avatar
      cogl: Fix builds with G_DISABLE_ASSERT · 5c3ec27b
      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
      5c3ec27b
    • Daniel van Vugt's avatar
      clutter: Fix offscreen-effect painting of clones · 8655bc5d
      Daniel van Vugt authored
      `ClutterOffscreenEffect` had been getting the wrong bounding box in the
      case of clones and descendents of clones, causing visibly incorrect
      clipping. This was due to `clutter_actor_get_paint_box` only ever being
      given the source actor during a paint (which is correct) and not the clone.
      Even if we weren't painting a clone but an offscreened descendent of a
      clone (like in gnome-shell's desktop zoom), we would get the wrong result.
      
      Fortunately we don't need to know the actual clone/actor being painted so
      don't need to call the problematic `clutter_actor_get_paint_box` at all.
      The solution is to only keep untransformed rendering in the FBO and leave
      the correct transformation for later. The correct clone/actor's
      transformation is already set for us as the current cogl modelview matrix
      by `clutter_actor_paint`.
      
      Bonus optimization: This all means we don't need to keep `last_matrix_drawn`
      or force a full repaint every time some part of the transformation changes.
      Because the FBO contents are no longer affected by transformations. As it
      should be. In other words, offscreen-effected actors can now move around
      on screen without themselves being repainted.
      
      Special thanks to Mai Lavelle for identifying the cause of the problem.
      
      Fixes:
      https://bugzilla.gnome.org/show_bug.cgi?id=789050,
      https://bugzilla.gnome.org/show_bug.cgi?id=659523#c9,
      #196,
      #282,
      gnome-shell#387,
      https://launchpad.net/bugs/1767648,
      https://launchpad.net/bugs/1779615
      8655bc5d
    • Iain Lane's avatar
      meta, startup-notification: Make type declarations public · 2e53ce8e
      Iain Lane authored
      Shell is using these, which was revealed by
      1bbb5c81 breaking its build when
      generating its introspection due to meta_startup_notification_get_type()
      not being found.
      
      We keep the class structs private, so in practice MetaStartupSequence
      and MetaBackend can't be derived from (the are semi-private).
      2e53ce8e
  9. 23 Jan, 2019 4 commits
    • Jonas Ådahl's avatar
      gitlab-ci.yml: Change build step build type to debugoptimized · 2528a397
      Jonas Ådahl authored
      We will catch -Wmaybe-uninitialized errors this way.
      2528a397
    • Marco Trevisan's avatar
      meta: Hide libmutter symbols by default and selectively export them · e02fef8e
      Marco Trevisan authored
      Make meson link libmutter using -fvisibility=hidden, and introduce META_EXPORT
      and META_EXPORT_TEST defines to mark a symbols as visible.
      The TEST version is meant to be used to flag symbols that are only used
      internally by mutter tests, but that should not be considered public API.
      
      This allows us to be more precise in selecting what is exported and what is
      not, without the need of a version-script file that would be more complicated
      to maintain.
      
      !395
      e02fef8e
    • Marco Trevisan's avatar
      MonitorManager: Use composition instead of inheriting from dbus skeleton · e3520118
      Marco Trevisan authored
      MonitorManager was inheriting from MetaDBusDisplayConfigSkeleton, this was
      causing introspection to see this like a GDBus skeleton object exposing to
      clients methods that were not required.
      
      Also, this required us to export meta_dbus_* symbols to the library, while
      these should be actually private.
      
      So, make MetaMonitorManager to be just a simple GObject holding a skeleton
      instance, and connect to its signals reusing most of the code with just few
      minor changes.
      
      !395
      e3520118
    • Marco Trevisan's avatar
      meson: Don't list libraries private dependencies in pc files · 7f551ba7
      Marco Trevisan authored
      pkg-config files for mutter are generated using *_pkg_deps as requires, but
      programs linked with libmutter doesn't need most of these private dependencies
      which are only needed for building and linking mutter and its subprojects.
      
      So list packages needed only by mutter itself inside *_pkg_private_deps and
      don't expose such packages to pkg-config, but only use them at build time.
      
      https://gitlab.gnome.org/GNOME/mutter/merge_requests/3955
      7f551ba7