1. 19 Feb, 2020 13 commits
    • Jonas Ådahl's avatar
      gdk/surface: Replace move_to_rect() with GdkPopupLayout based API · ca71119a
      Jonas Ådahl authored
      Replace the gdk_surface_move_to_rect() API with a new GdkSurface
      method called gdk_surface_present_popup() taking a new GdkPopupLayout
      object describing how they should be laid out on screen.
      The layout properties provided are the same as the ones used with
      gdk_surface_move_to_rect(), except they are now set up using
      Calling gdk_surface_present_popup() will either show the popup at the
      position described using the popup layout object and a new unconstrained
      size, or reposition it accordingly.
      In some situations, such as when a popup is set to autohide, presenting
      may immediately fail, in case the grab was not granted by the display
      After a successful present, the result of the layout can be queried
      using the following methods:
       * gdk_surface_get_position() - to get the position relative to its
       * gdk_surface_get_width() - to get the current width
       * gdk_surface_get_height() - to get the current height
       * gdk_surface_get_rect_anchor() - to get the anchor point on the anchor
         rectangle the popup was effectively positioned against given
         constraints defined by the environment and the layout rules provided
         via GdkPopupLayout.
       * gdk_surface_get_surface_anchor() - the same as the one above but for
         the surface anchor.
      A new signal replaces the old "moved-to-rect" one -
      "popup-layout-changed". However, it is only intended to be emitted when
      the layout changes implicitly by the windowing system, for example if
      the monitor resolution changed, or the parent window moved.
    • Jonas Ådahl's avatar
      gdk/surface: Reset position after hiding · 37f4c644
      Jonas Ådahl authored
      The x and y position of GdkSurface is only valid when visible, so reset
      them to their inital state after hiding.
    • Jonas Ådahl's avatar
      wayland: Simplify logic deciding whether to use xdg_popup · 46d40cd4
      Jonas Ådahl authored
      From a handful of hueristics and guess-work, to a single
      `surface->surface_type == GDK_SURFACE_POPUP`.
    • Jonas Ådahl's avatar
      wayland: Fix top-most-popup check · 11dbc384
      Jonas Ådahl authored
      We can map a non-grabbing popup wherever, it's just the grabbing
      popup-chain that needs to be ensured not to break any ordering rules.
      Fix this by managing two lists; one of open popups, and another for
      grabbing ones.
    • Jonas Ådahl's avatar
    • Jonas Ådahl's avatar
      gdk: Move GdkGravity to gdktypes.h · 339a04da
      Jonas Ådahl authored
    • Jonas Ådahl's avatar
      x11: Make gdk_surface_get_position() return relative position · 40693412
      Jonas Ådahl authored
      The returned position should be relative to the parent surface, but
      GdkSurface::x,y were only managed properly for O-R windows. This makes
      it correct for regular windows too.
    • Jonas Ådahl's avatar
      wayland: Simplify popup parent discovery · 2bb0eddf
      Jonas Ådahl authored
      Now popups surfaces are always created with the parent set, so we don't
      need to implement vorious guess work to try to find what the parent
      might be. Remove that code and just use GdkSurface::parent which is
      where the parent set during construction ends up at.
    • Jonas Ådahl's avatar
      wayland: Remove old "gdk-attached-grab-surface" hackery · 49fcbc27
      Jonas Ådahl authored
      The corresponding code in gtk/ is long gone, so it's luckly unused these
    • Jonas Ådahl's avatar
      wayland/surface: Add per surface configuration event queues · 7fafa513
      Jonas Ådahl authored
      Add event queues specifically for surface configuration events
      (xdg_surface.configure, xdg_toplevel.configure, xdg_popup.configure etc)
      so that a configuration can be completed without having side effects on
      other surfaces. This will be used to synchronously configure specific
      GdkSurfaces, as is needed by the Gtk layout mechanisms.
    • Jonas Ådahl's avatar
      gdk/wayland/surface: Use dedicated bool for frame callback freezing · 0d086872
      Jonas Ådahl authored
      The freezing is conditioned on various state, so lets make the thawing a
      bit more robust. Without this there was a risk that we'd thaw too many
      times if there was a frame callback requested while the conditions for
      the freezing were not met.
    • Jonas Ådahl's avatar
      wayland: Remove position method split · f284e1d4
      Jonas Ådahl authored
      Position can only be done via gdk_surface_queue_relayout(); the legacy
      way is no longer possible, so remove the legacy positioning code.
    • Jonas Ådahl's avatar
      gdk/surface: Use enum type for surface type · 4e78dd2a
      Jonas Ådahl authored
  2. 15 Feb, 2020 3 commits
  3. 14 Feb, 2020 1 commit
  4. 13 Feb, 2020 3 commits
    • David Hogan's avatar
      Fixed OpenGL extension detection for extensions promoted to OpenGL core. · c4111dad
      David Hogan authored
      For a given OpenGL context, macOS in particular does not support enumeration / detection of OpenGL features that have been promoted to core OpenGL functionality. It is possible other drivers are the same. This change assumes support for GL_ARB_texture_non_power_of_two with OpenGL 2.0+, GL_ARB_texture_rectangle with OpenGL 3.1+ and GL_EXT_framebuffer_blit with OpenGL 3.0+. I failed to find definitive information on whether GL_GREMEDY_frame_terminator has been promoted to OpenGL core, or whether GL_ANGLE_framebuffer_blit or GL_EXT_unpack_subimage have been promoted to core in OpenGL ES. This change results in a significant GtkGLArea performance boost on macOS.
      Closes #2428
    • Emmanuele Bassi's avatar
      Add a notify function to GdkContentProvider · cdd7e4c5
      Emmanuele Bassi authored
      The callback-based content providers need a GDestroyNotify function to
      free the data passed to them on construction, otherwise they are going
      to leak.
    • Benjamin Otte's avatar
      gdk: Remove gdk_cairo_get_clip_rectangle() · 052d0f6e
      Benjamin Otte authored
      The function is fundamentally broken for unbounded surfaces.
      If a surface is unbounded, we cannot represent this as a
      cairo_rectangle_int_t, and using the return value doesn't work because
      it's already used for something else.
      In GTK3, unbounded surfaces aren't a problem, but GTK4 uses recording
      So better remove that function before we keep using it and using it
  5. 12 Feb, 2020 10 commits
  6. 11 Feb, 2020 5 commits
  7. 10 Feb, 2020 3 commits
  8. 09 Feb, 2020 2 commits