1. 22 Jul, 2021 4 commits
    • Matthias Clasen's avatar
      Add more sysprof marks · a10b1b73
      Matthias Clasen authored
      Add a few more marks during gtk_init to figure out where
      our startup time goes, and avoid the sysprof initialization
      from distorting the first mark.
      a10b1b73
    • Benjamin Otte's avatar
      gl: Move vfunc · 9f1d6e1f
      Benjamin Otte authored
      Instead of
        Display::make_gl_context_current()
      we now have
        GLContext::clear_current()
        GLContext::make_current()
      
      This fits better with the backends (we can actually implement
      clearCurrent on macOS now) and makes it easier to implement different GL
      backends for backends (like EGL/GLX on X11).
      
      We also pass a surfaceless boolean to make_current() so the calling code
      can decide if a surface needs to be bound or not, because the backends
      were all doing whatever, which was very counterproductive.
      9f1d6e1f
    • Benjamin Otte's avatar
      gdk: Add GdkDisplay::init_gl vfunc · 430b6f8f
      Benjamin Otte authored
      The vfunc is called to initialize GL and it returns a "base" context
      that GDK then uses as the context all others are shared with. So the GL
      context share tree now looks like:
      
      + context from init_gl
        - context1
        - context2
        ...
      
      So this is a flat tree now, the complexity is gone.
      
      The only caveat is that backends now need to create a GL context when
      initializing GL so some refactoring was needed.
      
      Two new functions have been added:
      
      * gdk_display_prepare_gl()
        This is public API and can be used to ensure that GL has been
        initialized or if not, retrieve an error to display (or debug-print).
      * gdk_display_get_gl_context()
        This is a private function to retrieve the base context from
        init_gl(). It replaces gdk_surface_get_shared_data_context().
      430b6f8f
    • Benjamin Otte's avatar
      gdk: Add a private struct to GdkDisplay · 581e01b2
      Benjamin Otte authored
      ... and move some members from the GdkDisplay struct.
      
      We've always wanted to add one to isolate the display from the backends
      a bit more, but so far it's never happened.
      
      Now that I'm about to add more data to GdkDisplay, it's a good excuse to
      start.
      581e01b2
  2. 05 Jun, 2021 1 commit
  3. 22 May, 2021 1 commit
  4. 20 May, 2021 1 commit
  5. 11 Mar, 2021 2 commits
  6. 17 Oct, 2020 1 commit
  7. 08 Oct, 2020 1 commit
    • Matthias Clasen's avatar
      gdk: Drop some unused private api · ba108f26
      Matthias Clasen authored
      No users of gdk_display_peek_event, gdk_display_has_pending
      _gdk_display_event_data_copy or _gdk_display_event_data_free,
      so drop all of these, and related vfuncs.
      ba108f26
  8. 12 Sep, 2020 1 commit
    • Matthias Clasen's avatar
      Clean up lots of GTK+ -> GTK · 929a56e5
      Matthias Clasen authored
      Replace most remaining uses of GTK+ in the docs and
      user-visible strings by GTK. Also remove some leftover
      "Was added in 3.x" sentences from the docs.
      929a56e5
  9. 21 Aug, 2020 1 commit
  10. 05 Aug, 2020 1 commit
  11. 31 Jul, 2020 1 commit
    • Carlos Garnacho's avatar
      gdk: Fix toplevel calculation on pointer grab switch · 9564cba4
      Carlos Garnacho authored
      This check used to read if (grab || device_type != GDK_DEVICE_TYPE_PHYSICAL),
      the grab check was only reserved to physical devices, which the current
      pointer device definitely doesn't act like. So the condition was "fixed" the
      wrong way around, and the latter check is now moot, so the condition should
      really go away. We always want to check the new toplevel under the pointer
      here.
      
      Fixes: #2970
      9564cba4
  12. 30 Jul, 2020 4 commits
  13. 28 Jul, 2020 2 commits
  14. 24 Jul, 2020 2 commits
  15. 23 Jun, 2020 1 commit
  16. 18 Jun, 2020 1 commit
    • Emmanuele Bassi's avatar
      Rename master and slave device · 1c856a20
      Emmanuele Bassi authored
      We already use the "logical/virtual" and "physical" names in the
      documentation, there's no reason to use loaded terms just because X11
      uses them.
      1c856a20
  17. 31 May, 2020 2 commits
    • Christoph Reiter's avatar
      Drop fallback-c89.c · 2d5cf2b4
      Christoph Reiter authored
      We require a C compiler supporting C99 now. The main purpose of
      these fallbacks was for MSVC. From what I can see this is now all supported
      by MSVC 2015+ anyway.
      
      The only other change this includes is to replace isnanf() with the
      (type infering) C99 isnan() macro, because MSVC doesn't provide isnanf().
      2d5cf2b4
    • Emmanuele Bassi's avatar
      docs: Fix annotations · 43e5ca9a
      Emmanuele Bassi authored
       - Use the same name for the argument in the declaration, definition,
         and documentation
       - Use "optional" instead of the deprecated "allow-none"
      43e5ca9a
  18. 29 May, 2020 1 commit
  19. 28 May, 2020 2 commits
  20. 19 May, 2020 1 commit
  21. 18 May, 2020 3 commits
  22. 17 May, 2020 2 commits
  23. 15 May, 2020 1 commit
  24. 13 May, 2020 2 commits
  25. 16 Apr, 2020 1 commit
    • Emmanuele Bassi's avatar
      Restructure the GdkEvent type hierarchy · f28aa1ba
      Emmanuele Bassi authored
      GdkEvent has been a "I-can't-believe-this-is-not-OOP" type for ages,
      using a union of sub-types. This has always been problematic when it
      comes to implementing accessor functions: either you get generic API
      that takes a GdkEvent and uses a massive switch() to determine which
      event types have the data you're looking for; or you create namespaced
      accessors, but break language bindings horribly, as boxed types cannot
      have derived types.
      
      The recent conversion of GskRenderNode (which had similar issues) to
      GTypeInstance, and the fact that GdkEvent is now a completely opaque
      type, provide us with the chance of moving GdkEvent to GTypeInstance,
      and have sub-types for GdkEvent.
      
      The change from boxed type to GTypeInstance is pretty small, all things
      considered, but ends up cascading to a larger commit, as we still have
      backends and code in GTK trying to access GdkEvent structures directly.
      Additionally, the naming of the public getter functions requires
      renaming all the data structures to conform to the namespace/type-name
      pattern.
      f28aa1ba