Skip to content

Conversation

@masterpiga
Copy link
Contributor

This change adds two buttons to the 2nd darkroom window, making this functionality more generally useful:

  1. A "pin" button to keep the 2nd window focused on the currently developed images. Changing images in the darktable main window does not affect the content of the 2nd window. This is useful to use the 2nd window as a reference, e.g., for style matching or color grading.

  2. A "keep on top" button, which keeps the 2nd window on top of the main one. This is especially useful for macOS users, as the OS does not implement this functionality natively.

The two changes are bundled together because on macOS pinning the image without being able to keep it in on top greatly reduces its usefulness. Additionally, the code footprint of (2) is negligible.

The change was proposed and discussed on Pixls, and the community seemed to welcome it.

The implementation discussed on Pixls was taking a full-size snapshot of the image. Following @dterrahe's suggestions, I reimplemented it to use a separate pixelpipe for the 2nd window.

When the image is pinned, the current pipe is duplicated and the view of 2nd window updated to point to insist on the new pipe. When the image is unpinned, the 2nd pipe is destroyed and the main darkroom pipe is restored.

See demo video below:

Screen.Recording.2025-12-21.at.13.56.27.mp4

You will see a lot of examples with composite (overlay) and watermark, as the changes introduced in develop.c to be able to reuse the pipe had broken that functionality. It took me quite a bit to track down the issue and fix it. The problematic bit is documented in the code.

I tested extensively opening and closing the 2nd window, pinning and unpinning repeatedly while the main image is still being rendered, which led me to fix some issues with the 2nd window cleanup code.

I am quite confident that the logic is sound now, but I am not familiar with the pixelpipe code so a close inspection from more expert eyes is very welcome. Everything seems to work as expected, but you never know.

@TurboGit TurboGit added this to the 5.6 milestone Dec 21, 2025
@wpferguson
Copy link
Member

wpferguson commented Dec 21, 2025

The change was proposed and discussed on Pixls, and the community seemed to welcome it.

In the future you might want to raise an issue in the darktable issue tracker to propose your idea. That way you get the views of a different community and make the devs whose areas you're going to touch aware. They may offer suggestions and/or help that could save you time, frustration, etc.

The reason I suggest this is what is because of what is happening with the tone equalizer PR. It started the same way (on pixls) and is currently mired in controversy.


Now for the PR. You mention MacOS a lot and your images are from there. Did you test on Windows or Linux?

@ralfbrown ralfbrown added feature: new new features to add scope: UI user interface and interactions labels Dec 21, 2025
@masterpiga masterpiga force-pushed the pin-photo-in-2nd-window branch from 98dcbfa to 6d5efb4 Compare December 22, 2025 08:12
@masterpiga
Copy link
Contributor Author

masterpiga commented Dec 22, 2025

In the future you might want to raise an issue in the darktable issue tracker to propose your idea. That way you get the views of a different community and make the devs whose areas you're going to touch aware. They may offer suggestions and/or help that could save you time, frustration, etc.

Thanks, that is good advice.

Now for the PR. You mention MacOS a lot and your images are from there. Did you test on Windows or Linux?

I tested on a virtualized Fedora and it works as intended. See video below:

Screen.Recording.2025-12-22.at.10.20.02.mp4

The video also shows how you can pin at any point in history, not just at the current edit state.

I have no way of testing on Windows unfortunately, the last time that I used windows was when XP came out.

@masterpiga
Copy link
Contributor Author

One small addition. The layout of the two buttons in the 2nd window currently is hard coded. I would argue that it would make sense to make this more customizable, but I would prefer to do that in a follow up PR.

Also, I would like to attach actions to the two toggle buttons so that they can controlled via keyboard shortcuts. I had started doing that but then I noticed that the "quick shortcut" overlay does not work on the 2nd window, so it probably requires more work. I would also leave that for a follow up, in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: new new features to add scope: UI user interface and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants