1. 17 Jan, 2019 2 commits
    • Jonas Ådahl's avatar
      menu: Force resize when remapping · 3e586a82
      Jonas Ådahl authored
      A menu will be clamped to the work area as a side effect of the
      move_to_rect() logic if the resize anchor flags was set. For it to work
      a second time, the initial size needs to be the actual menu size before
      being clamped again. Achieve this by forcing a size recalculation before
      showing the menu.
      3e586a82
    • Jonas Ådahl's avatar
      menu: Don't constrain initial menu size · 00486efd
      Jonas Ådahl authored
      Don't constrain the initial menu size by the work area of some monitor;
      instead let the move_to_rect() logic in the backend do the constraining.
      This fixes two things:
      
      1) The anchor delta provided to the backend will not be invalid. The
      delta is calculated by looking at the active menu item, calculating the
      offset given that, but since we clamped the window size before showing
      the window, the delta became invalid. This caused visible issues when
      the delta was large enough to make the initially calculated popup window
      geometry to be placed outside the geometry of the parent window, which
      is a violation of the Wayland protocol.
      
      2) The scroll offset to be correct when receiving the positioning
      feedback. While the scroll offset was based on the pre-clamped window
      size, the feedback, which was used to calculate the new offset, was not,
      causing the scroll offset to be clamped as well.
      00486efd
  2. 28 Jul, 2016 1 commit
    • Matthias Clasen's avatar
      Put window exporting behind a display protocol agnostic API · 18aa0511
      Matthias Clasen authored
      Introduce a private API meant for abstracting how to get a handle
      of a window that can be shared with other processes. The API is
      async, since some implementations will require that. Currently,
      only X11 is supported, which doesn't.
      
      Based on a patch by Jonas Adahl.
      18aa0511
  3. 03 Nov, 2015 1 commit
  4. 12 Sep, 2015 1 commit
  5. 06 Jul, 2015 1 commit
    • Carlos Garnacho's avatar
      gtkwindow: Only allow unrestricted positioning to text handle popovers · 7f57f63e
      Carlos Garnacho authored
      This behavior has been made optional on add_popover() time, text handles
      will keep being able to overflow the window, in order to allow text
      selection on views too close to the window edge.
      
      Regular GtkPopovers are reinstaurated to the previous size positioning
      logic though, that is, limited by the visible area of the window.
      7f57f63e
  6. 17 Jun, 2015 1 commit
  7. 01 Sep, 2014 1 commit
  8. 26 Aug, 2014 1 commit
  9. 09 Jun, 2014 1 commit
    • Matthias Clasen's avatar
      Allow csd for override-redirect windows · bde4e863
      Matthias Clasen authored
      This commit makes it possible to use client-side decorations for
      override-redirect windows by calling _gtk_window_request_csd()
      before realizing the window. Since the wm won't do interactive
      resizing for us in this case anyway, don't bother creating
      the border windows we use for this purpose on regular toplevels.
      
      To make this accessible to themes, we set a "csd" style class
      on client-side decorated windows. With this, .window-frame.csd.menu
      can be used to define the shadow for csd menus, and .menu can be
      used to define a border for menus under non-composited wms.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=731187
      bde4e863
  10. 04 Jun, 2014 1 commit
  11. 13 May, 2014 1 commit
  12. 11 May, 2014 1 commit
  13. 24 Jan, 2014 1 commit
  14. 22 Jan, 2014 2 commits
  15. 14 Jan, 2014 1 commit
  16. 13 Jan, 2014 1 commit
    • Matthias Clasen's avatar
      Redo csd window-dragging · 2232430a
      Matthias Clasen authored
      The window-dragging code had a number of issues: The code was
      starting a drag on every button press, never bothering to cancel
      them. This leads to the odd hand cursor occurring between the two
      clicks to maximize. We relied on GDK's multi-click detection, which
      gives us triple-clicks when we really want sequences of double-clicks.
      Lastly, we didn't propery restrict double-click handling to the primary
      button, so e.g. if you had a window on an empty workspace, double-right
      click on the titlebar would maximize it, which is not intended.
      
      This commit solves all three problem by a doing our own double-click
      detection, and only starting a drag when the pointer goes out of
      'double-click range'. We change the way dragging is implemented for
      menubars and toolbars to just letting events bubble up, so they
      get the same behaviour as the titlebar. To make this work, we
      have to select for pointer motion events in a few more places.
      2232430a
  17. 10 Jan, 2014 1 commit
  18. 13 Dec, 2013 1 commit
  19. 16 Nov, 2013 2 commits
  20. 09 Nov, 2013 1 commit
  21. 15 Oct, 2013 1 commit
    • Allison Karlitskaya's avatar
      GtkApplication: a new approach to accels · 9a6ee36e
      Allison Karlitskaya authored
      Rework how accels are handled on GtkApplicationWindow.
      
      Instead of having GtkApplication fill the GtkAccelMap which is then used
      by GtkApplicationWindow to create a GtkAccelGroup filled with closures
      that is then associated with the window, do it directly.
      
      GtkApplication now keeps a list of accels and their actions.
      Accelerators on a GtkApplicationWindow ask GtkApplication to execute the
      appropriate action.
      
      This saves a fair bit of complexity and memory use (due to not having to
      create all those closures and accelmap entries).  The new approach also
      supports multiple accels per action (although there is not yet a public
      API for it).
      
      This patch (and the ones before) Reviewed and ACK'd by Matthias Clasen.
      9a6ee36e
  22. 21 Apr, 2013 1 commit
    • Matthias Clasen's avatar
      csd: Drop content_window · 1507ba79
      Matthias Clasen authored
      Instead of reparenting the content, use input-only windows to
      set cursors and capture clicks on the window frame. This avoids
      some of the problems that were introduced by content_window, such
      as black flashes and non-working opacity.
      1507ba79
  23. 09 Apr, 2013 1 commit
  24. 02 Apr, 2013 1 commit
  25. 27 Mar, 2013 1 commit
  26. 17 Mar, 2013 1 commit
    • Rob Bradford's avatar
      window: Allow _gtk_window_set_allocation to return a modified allocation · 55a98da4
      Rob Bradford authored
      Update the documentation and users of this function to handle
      the future case that that we have some internal decorations to the window and
      useable allocation is thus smaller.
      
      By having a separate out parameter there is no need to have an in/out function
      and allows for greater robustness.
      
      The current implementation simply returns the allocation provided.
      55a98da4
  27. 01 Sep, 2012 1 commit
  28. 27 Feb, 2012 1 commit
  29. 20 Jan, 2012 1 commit
  30. 01 Feb, 2011 1 commit
  31. 28 Jan, 2011 3 commits
  32. 18 Dec, 2010 1 commit
    • Matthias Clasen's avatar
      Hide GtkWindowGroup members · 7b665316
      Matthias Clasen authored
      In the process of removing all sealed members from headers.
      At the same time, add a gtkwindowprivate.h header and move
      all internal functions from gtkwindow.h there.
      7b665316