Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to use gdk_threads_add_idle instead of gdk_threads_enter/leave #505

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

trupples
Copy link

PR Description

  • Please replace this comment with a summary of your changes, and add any context
    necessary to understand them. List any dependencies required for this change.
  • To check the checkboxes below, insert a 'x' between square brackets (without
    any space), or simply check them after publishing the PR.
  • If you changes include a breaking change, please specify dependent PRs in the
    description and try to push all related PRs simultaneously.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have followed the coding standards and guidelines
  • I have conducted a self-review of my own code changes
  • I have commented new code, particulary complex or unclear areas
  • I have checked in CI output that no new warnings/errors got introduced
  • I have updated documentation accordingly (GitHub Pages, READMEs, etc)

Copy link
Contributor

@dNechita dNechita Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach seems fine. There are some calls to gdk_threads_enter()/leave() in this file but it's probably due to this PR still being WIP.
My advice is to test this functionality on Windows as well.

Copy link
Contributor

@nunojsa nunojsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM... As @dNechita pointed out, we need to make sure it works on all supported OSes and to remove all the calls to gdk_threads_enter()/leave() also in the plugins (in a patch per plugin)


static void set_calibration_progress(GtkProgressBar *pbar, float fraction)
{
struct set_calibration_progress_params *params = malloc(sizeof(struct set_calibration_progress_params));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: sizeof(*params)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants