1. 19 Feb, 2020 15 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
      GdkPopupLayout.
      
      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
      server.
      
      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
         parent
       * 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.
      ca71119a
    • 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.
      37f4c644
    • 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`.
      46d40cd4
    • 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.
      11dbc384
    • Jonas Ådahl's avatar
      ebd3ee98
    • Jonas Ådahl's avatar
      gdk: Move GdkGravity to gdktypes.h · 339a04da
      Jonas Ådahl authored
      339a04da
    • 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.
      40693412
    • 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.
      2bb0eddf
    • 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
      days.
      49fcbc27
    • 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.
      7fafa513
    • 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.
      0d086872
    • 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.
      f284e1d4
    • Jonas Ådahl's avatar
      gdk/surface: Use enum type for surface type · 4e78dd2a
      Jonas Ådahl authored
      4e78dd2a
    • Jonas Ådahl's avatar
      6eaeadb3
    • Jonas Ådahl's avatar
      popover: Unrealize when autohide prop changes · f43717a4
      Jonas Ådahl authored
      Changing the autohide property means the popover needs to be remapped.
      Remapping may need user interaction, so lets just unrealize the popover
      if the property changes, forcing the application to remap it should it
      be shown again.
      f43717a4
  2. 18 Feb, 2020 2 commits
  3. 17 Feb, 2020 2 commits
  4. 16 Feb, 2020 2 commits
  5. 15 Feb, 2020 19 commits