Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G gtkmm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 19
    • Issues 19
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gtkmm
  • Merge requests
  • !19

Gdk::Cursor|Window: Fix leaks/docs. Replace/deprecate methods using Cairo::Surface that should use ImageSurface

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Daniel Boles requested to merge wip/dboles/Gdk_ImageSurface into gtkmm-3-24 Jun 15, 2019
  • Overview 11
  • Commits 2
  • Pipelines 0
  • Changes 2

This would close #30

Note that

  • this is currently based on gtkmm-3-24 but of course should wait until we branch to gtkmm-3-26 - and indeed assumes that in its newin annotations
  • others may want to make alternative proposals for the names of the new functions or how I wrote the deprecation notices

commit 3ec71b5eed8fd016c02b139533adb46e58da36a9 (HEAD -> wip/dboles/Gdk_ImageSurface, origin/wip/dboles/Gdk_ImageSurface)
Author: Daniel Boles <dboles.src@gmail.com>
Date:   Thu Jun 20 18:37:14 2019 +0100

    Cursor: Add replacements with correct ImageSurface
    
    create() and get_surface() should've taken and returned
    RefPtr<ImageSurface>, but they used RefPtr<Surface> instead.
    
    Deprecate the old versions, and add new ones that replace them, by
    overloading create() and renaming get_surface() to get_image_surface().
    
    https://gitlab.gnome.org/GNOME/gtkmm/issues/30

commit 9e100a52b133b635a7197608418e7a4726cc9d72
Author: Daniel Boles <dboles.src@gmail.com>
Date:   Thu Jun 20 18:37:10 2019 +0100

    GdkWindow: Fix create_similar_image_surface return
    
    This should return a Cairo::ImageSurface, but it returned just a Surface
    
    We can't change the return type of the existing function in 3 because
    that would break ABI, but we can add a new function suffixed _derived
    that returns the correct RefPtr type and deprecate the older symbol.
    
    https://gitlab.gnome.org/GNOME/gtkmm/issues/30

commit 265be45408d2b5a8ace4e091b8a6c36851eb635c (wip/dboles/Gdk_ImageSurface_refs)
Author: Daniel Boles <dboles.src@gmail.com>
Date:   Thu Jun 20 18:49:05 2019 +0100

    Window: Do not add 2nd ref to new Cairo::Surface
    
    The C functions already return a newly allocated objected that the
    caller owns, so if we pass `false` as Cairo's `has_reference`, then we
    add another on the gtkmm side, so we will end up leaking that object.
    
    https://gitlab.gnome.org/GNOME/gtkmm/merge_requests/19#note_535429

commit 769933b202813b35b7f0448e850d4823f3fbd8aa
Author: Daniel Boles <dboles.src@gmail.com>
Date:   Thu Jun 20 18:38:44 2019 +0100

    Cursor: Fix meaning of comment about Cairo ref arg
    
    Cairo::Object takes a has_reference parameter, not take_copy with
    inverted meaning as in glibmm/gtkmm.
    
    Say "do not take ref" like e.g. window.hg already did, which is a bit
    clearer than has_reference (when does it get that? before or after us?)
    
    https://gitlab.gnome.org/GNOME/gtkmm/merge_requests/19#note_535429
    https://gitlab.gnome.org/GNOME/gtkmm/merge_requests/19#note_536603
Edited Jun 20, 2019 by Daniel Boles
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/dboles/Gdk_ImageSurface