1. 24 Apr, 2018 2 commits
    • Alexander Larsson's avatar
      a329de63
    • Benjamin Otte's avatar
      gdk: Add Cairo context implementations for all backends · 813e9c95
      Benjamin Otte authored
      And make the GdkCairoContext as abstract.
      
      The idea of this and thje following commits is to get rid of all
      Cairo code in gdksurface.c (and $backend/gdksurface-$backend.c)
      by moving that code into the Cairo context files.
      In particular, the GdkSurfaceClass.begin_frame/end_frame()
      functions (which are currently exclusively used by the Cairo code
      should end up being moved to GdkDrawContextClass.begin/end_frame().
      
      This has multiple benefits:
      
      1. It unifies code between the different drawing contexts.
         GL lives in GLContext, Vulkan in VulkanContext and Cairo in
         CairoContext. In turn, this makes it way easier to reason about
         what's going on in surface-specific code. Currently pretty much
         all backends do things wrong when they want to sync to drawing
         or to the frame clock.
      
      2. It makes the API of GdkSurface smaller. No drawing code (apart
         from creating the contexts) needs to remain.
      
      3. It confines Cairo to the Drawcontext, thereby making it way
         more obvious when backends are still using it in situations
         where it may now conflict with OpenGL (like when doing the dnd
         failed animation or in the APIs that I'm removing in this
         branch).
      
      4. We have 2 very different types of Cairo contexts: The X/win32
         model, where we have a natively supported Cairo backend but do
         double buffering ourselves and use similar surfaces and the
         Wayland/Broadway model where we use image surfaces without any
         Cairo backend support and have to submit the buffers manually.
         By not sharing code between those 2 versions, we can make the
         actual code way smaller. We also get around the need to create
         1x1 image surfaces in the Wayland backend where we pretend
         there's a native Cairo surface.
      813e9c95
  2. 05 Apr, 2018 1 commit
    • Benjamin Otte's avatar
      broadway: Improve error message · f1f27ce0
      Benjamin Otte authored
      This error message is printed into the journal if a GTK app can't
      connect to eithre Wayland or X11. Make it at least mention who is not
      capable of connecting to a server.
      
      Unrelated, we might want to improve our error reporting when a GTK app
      can't start, so that debugging issues with system startup / login get
      easier to resolve.
      f1f27ce0
  3. 20 Mar, 2018 2 commits
    • Alexander Larsson's avatar
      GdkSurface: Rename various functions and variables · 9a7e7211
      Alexander Larsson authored
      This is an automatic rename of various things related
      to the window->surface rename.
      
      Public symbols changed by this is:
       GDK_MODE_WINDOW
       gdk_device_get_window_at_position
       gdk_device_get_window_at_position_double
       gdk_device_get_last_event_window
       gdk_display_get_monitor_at_window
       gdk_drag_context_get_source_window
       gdk_drag_context_get_dest_window
       gdk_drag_context_get_drag_window
       gdk_draw_context_get_window
       gdk_drawing_context_get_window
       gdk_gl_context_get_window
       gdk_synthesize_window_state
       gdk_surface_get_window_type
       gdk_x11_display_set_window_scale
       gsk_renderer_new_for_window
       gsk_renderer_get_window
       gtk_text_view_buffer_to_window_coords
       gtk_tree_view_convert_widget_to_bin_window_coords
       gtk_tree_view_convert_tree_to_bin_window_coords
      
      The commands that generated this are:
      
      git sed -f g "GDK window" "GDK surface"
      git sed -f g window_impl surface_impl
      (cd gdk; git sed -f g impl_window impl_surface)
      git sed -f g WINDOW_IMPL SURFACE_IMPL
      git sed -f g GDK_MODE_WINDOW GDK_MODE_SURFACE
      git sed -f g gdk_draw_context_get_window gdk_draw_context_get_surface
      git sed -f g gdk_drawing_context_get_window gdk_drawing_context_get_surface
      git sed -f g gdk_gl_context_get_window gdk_gl_context_get_surface
      git sed -f g gsk_renderer_get_window gsk_renderer_get_surface
      git sed -f g gsk_renderer_new_for_window gsk_renderer_new_for_surface
      
      (cd gdk; git sed -f g window_type surface_type)
      git sed -f g gdk_surface_get_window_type gdk_surface_get_surface_type
      
      git sed -f g window_at_position surface_at_position
      git sed -f g event_window event_surface
      git sed -f g window_coord surface_coord
      git sed -f g window_state surface_state
      git sed -f g window_cursor surface_cursor
      git sed -f g window_scale surface_scale
      git sed -f g window_events surface_events
      git sed -f g monitor_at_window monitor_at_surface
      git sed -f g window_under_pointer surface_under_pointer
      (cd gdk; git sed -f g for_window for_surface)
      git sed -f g window_anchor surface_anchor
      git sed -f g WINDOW_IS_TOPLEVEL SURFACE_IS_TOPLEVEL
      git sed -f g native_window native_surface
      git sed -f g source_window source_surface
      git sed -f g dest_window dest_surface
      git sed -f g drag_window drag_surface
      git sed -f g input_window input_surface
      
      git checkout NEWS* po-properties po docs/reference/gtk/migrating-3to4.xml
      9a7e7211
    • Alexander Larsson's avatar
      GdkWindow -> GdkSurface initial type rename · 391727bd
      Alexander Larsson authored
      This renames the GdkWindow class and related classes (impl, backend
      subclasses) to surface. Additionally it renames related types:
      GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType,
      GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge
      
      This is an automatic conversion using the below commands:
      
      git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass
      
      git sed -f g GdkWindow GdkSurface
      git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing
      git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING
      git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2"
      git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE
      git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo
      
      git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE"
      git sed -f g "broadway_window" "broadway_surface"
      git sed -f g "BroadwayWindow" "BroadwaySurface"
      git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE"
      git sed -f g "wayland_window" "wayland_surface"
      git sed -f g "WaylandWindow" "WaylandSurface"
      git sed -f g "X11_WINDOW" "X11_SURFACE"
      git sed -f g "x11_window" "x11_surface"
      git sed -f g "X11Window" "X11Surface"
      git sed -f g "WIN32_WINDOW" "WIN32_SURFACE"
      git sed -f g "win32_window" "win32_surface"
      git sed -f g "Win32Window" "Win32Surface"
      git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE"
      git sed -f g "quartz_window" "quartz_surface"
      git sed -f g "QuartzWindow" "QuartzSurface"
      
      git checkout NEWS* po-properties
      391727bd
  4. 17 Jan, 2018 1 commit
    • Matthias Clasen's avatar
      gdk: Drop some unused cursor apis · 77bab4e0
      Matthias Clasen authored
      The query function for cursor sizes and capabilities
      are not very interesting. At least, they are not used
      in GTK+, and all backends but X11 just hardcode
      made-up values anyway. So, lets drop them.
      77bab4e0
  5. 14 Dec, 2017 2 commits
  6. 13 Dec, 2017 3 commits
  7. 30 Nov, 2017 3 commits
  8. 25 Nov, 2017 1 commit
  9. 23 Nov, 2017 2 commits
  10. 17 Nov, 2017 2 commits
  11. 15 Nov, 2017 1 commit
    • Benjamin Otte's avatar
      selection: Remove #ifdef WAYLAND · fb94f790
      Benjamin Otte authored
      Instead, turn the functions into backend API:
        gdk_broadway_display_add_selection_targets()
        gdk_broadway_display_clear_selection_targets()
      Remove the old per-backend functions, too.
      fb94f790
  12. 07 Nov, 2017 1 commit
  13. 06 Nov, 2017 1 commit
  14. 05 Nov, 2017 1 commit
  15. 03 Nov, 2017 2 commits
  16. 02 Nov, 2017 1 commit
    • Matthias Clasen's avatar
      t Remove gdk_cursor_new_for_display · 2a609281
      Matthias Clasen authored
      The preferred api to create cursors is by name, and the
      GdkCursorType enumeration can directly trace its ancestry
      to the horrible X cursor font. So lets stop using it.
      2a609281
  17. 01 Nov, 2017 4 commits
  18. 30 Oct, 2017 1 commit
  19. 23 Nov, 2016 1 commit
  20. 29 Oct, 2016 1 commit
    • Benjamin Otte's avatar
      API: screen: Remove gdk_screen_is_composited() · d249e77b
      Benjamin Otte authored
      Switch code to use gdk_display_is_composited() instead.
      
      The new code also doesn't use a vfunc to query the property but rather
      requires the backend to call set_composited()/set_rgba() to change the
      value.
      d249e77b
  21. 25 Oct, 2016 1 commit
  22. 16 Oct, 2016 1 commit
  23. 28 Apr, 2016 1 commit
  24. 29 Feb, 2016 3 commits
  25. 16 Dec, 2015 1 commit